Advertisement
Guest User

Untitled

a guest
Nov 7th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. public OnPlayerConnect(playerid) {
  2.  
  3. CrateTD = CreatePlayerTextDraw(playerid, 323.333129, 192.488830, "~r~Crate System~w~~h~n~~n~~Crate Step: 30/30~n~Won: ~g~$500,000");
  4. PlayerTextDrawLetterSize(playerid, CrateTD, 0.400000, 1.600000);//0.291666, 1.479703
  5. PlayerTextDrawTextSize(playerid, CrateTD, 0.000000, 120.000000);//0.000000, 141.000000
  6. PlayerTextDrawAlignment(playerid, CrateTD, 2);
  7. PlayerTextDrawColor(playerid, CrateTD, -1);
  8. PlayerTextDrawUseBox(playerid, CrateTD, 1);
  9. PlayerTextDrawBoxColor(playerid, CrateTD, 3553631);
  10. PlayerTextDrawSetShadow(playerid, CrateTD, 0);
  11. PlayerTextDrawSetOutline(playerid, CrateTD, 1);
  12. PlayerTextDrawBackgroundColor(playerid, CrateTD, 105);
  13. PlayerTextDrawFont(playerid, CrateTD, 2);
  14. PlayerTextDrawSetProportional(playerid, CrateTD, 1);
  15. PlayerTextDrawSetShadow(playerid, CrateTD, 0);
  16.  
  17. EnablePlayerCameraTarget(playerid, 1);
  18. GameTextForPlayer(playerid, "~w~Checking your account~n~~r~Please wait...!", 20000, 4);
  19.  
  20. QuestDeelay[playerid] = 0;
  21. TradeID[playerid] = -1;
  22. SetPlayerColor(playerid, COLOR_GREY);
  23. SetPlayerScore(playerid, 0);
  24.  
  25. DeletePVar(playerid, "LocationEnter");
  26. RemovePet(playerid);
  27. SetTimerEx("Camera", 500, 0, "d", playerid);
  28. GetPlayerName(playerid, PlayerInfo[playerid][pUsername], MAX_PLAYER_NAME);
  29. ResetVariables(playerid);
  30.  
  31. if(CountIP(GetIP(playerid)) >= 4 && strcmp(GetIP(playerid), "127.0.0.1", true) != 0) {
  32. SCM(playerid, COLOR_WARNING, "Sunt permise doar 3 conexiuni per IP!");
  33. KickEx(playerid);
  34. return 1;
  35. }
  36.  
  37. foreach(Player, i) {
  38. if(IsPlayerConnected(i) && i != playerid) {
  39. if(strcmp(GetName(playerid), GetName(i), true) == 0) KickEx(playerid);
  40. }
  41. }
  42.  
  43. new szString[180];
  44. if(FaceReclama(PlayerInfo[playerid][pUsername])) {
  45. SCM(playerid, COLOR_WARNING, "Ai primit kick deoarece numele tau contine numele unei comunitati!");
  46. Ban(playerid);
  47. return 1;
  48. }
  49.  
  50. RemoveMaps(playerid);
  51.  
  52. SetPlayerWorldBounds(playerid, 3579.6602, -4298.7334, 3971.8860, -3909.0200);
  53. TimerAtuPlayer[playerid] = SetTimerEx("UpdatePlayer", 2000, true, "d", playerid);
  54. SetPlayerColor(playerid,COLOR_GRAD2);
  55. ClearWanted(playerid);
  56. //ShowBarStats(playerid);
  57.  
  58. // Login
  59. format(szString,sizeof(szString),"SELECT * FROM users WHERE `name`='%s'",GetName(playerid));
  60. mysql_query(SQL,szString);
  61. mysql_store_result();
  62. if(mysql_num_rows()) PlayerAccount[playerid] = 1;
  63. else PlayerAccount[playerid] = 0;
  64. mysql_free_result();
  65.  
  66. login[playerid] = SetTimerEx("LoginTimer", 30000, false,"d", playerid);
  67. CheckClassIP(playerid);
  68.  
  69. return 1;
  70. }
  71.  
  72. function DestroyWoodObject(playerid) {
  73. for(new i = 0; i < 7; i++) {
  74. if(WoodObject[playerid][i] != 0) DestroyDynamicObject(WoodObject[playerid][i]), WoodObject[playerid][i] = 0;
  75. }
  76. return 1;
  77. }
  78.  
  79. function GameModeInitExitFunc() {
  80. foreach(Player,i) {
  81. if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) {
  82. DisablePlayerCheckpointEx(i);
  83. gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
  84. SetPlayerCameraPos(i, 1460.0, -1324.0, 287.2);
  85. SetPlayerCameraLookAt(i,1374.5, -1291.1, 239.0);
  86. IsPlayerLogged[i] = 0;
  87. }
  88. }
  89. SetTimer("GameModeExitFunc", 4000, 0);
  90. return 1;
  91. }
  92.  
  93. function GameModeExitFunc() {
  94. KillTimer(synctimer);
  95. KillTimer(svtimer);
  96. KillTimer(globaltimer);
  97. KillTimer(cartimer);
  98. KillTimer(checkgastimer);
  99. KillTimer(productiontimer);
  100. KillTimer(spectatetimer);
  101. KillTimer(stoppedvehtimer);
  102. GameModeExit();
  103. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement