Guest User

Untitled

a guest
Feb 26th, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.94 KB | None | 0 0
  1. public OnPlayerConnect(playerid)
  2. {
  3. AntiF4[playerid] = 0;
  4. NeedCheckTuningAB [playerid] = 0;
  5. CanCheckAirBreak[playerid] = false;
  6. CanCheckABX[playerid] = true;
  7. Prisijunges[playerid] = false;
  8. HouseID[playerid] = -1;
  9. ChoosedPlayer[playerid] = INVALID_PLAYER_ID;
  10. HouseCost[playerid] = 0;
  11. ClearAntiCheatVariables(playerid);
  12. ClearBusDriversVariables(playerid);
  13. ResetPlayerWeaponsEx(playerid);
  14. if(IsPlayerNPC(playerid)) return 1;
  15. if(InvalidNickKick(playerid)) return 1;
  16. AntiAntiBan[playerid] = false;
  17. Clear(playerid);
  18. j_GetPlayerName(playerid);
  19. j_GetPlayerIp(playerid);
  20. RemoveObjectsForPlayer(playerid);
  21. CheckIP(GetPlayerIpEx(playerid));
  22. ClearChat(playerid, 8);
  23. KillTimer(nuomaTimer[playerid]);
  24. CheckPlayersOnlineRecord();
  25. CreatePlayerMapIcons (playerid);
  26.  
  27. SendClientMessage(playerid, -1, "{FF0000}× {cccccc}Sveiki atvykę į {ff0000}testas {cccccc}serverį!");
  28. SendClientMessage(playerid, -1, "{FF0000}× {cccccc}Serverio svetainė : {ff0000}testas{cccccc}!");
  29.  
  30. ClearChat(playerid, 2);
  31.  
  32. new ConnIP[16];
  33. GetPlayerIp(playerid,ConnIP,16);
  34. new compare_IP[16];
  35. new number_IP = 0;
  36. for(new i = 0; i < MAX_PLAYERS; i ++)
  37. {
  38. if(IsPlayerConnected(i))
  39. {
  40. GetPlayerIp(i,compare_IP,16);
  41. if(!strcmp(compare_IP,ConnIP)) number_IP++;
  42. }
  43. }
  44.  
  45. for(new s = 0; s < 5; s++) TextDrawHideForPlayer(playerid, SpeedoText[playerid][s]);
  46. for(new z = 0; z < MAX_ZONES; z++) GangZoneShowForPlayer(playerid, Zone[z], ZONE_COLOR);
  47. TextDrawHideForPlayer(playerid, Text);
  48.  
  49. DestroyProgressBar(DegaluBar[playerid]);
  50. DegaluBar[playerid] = INVALID_BAR_ID;
  51. TextDrawHideForPlayer(playerid, Lasas[playerid]);
  52.  
  53. DestroyProgressBar(VandensBar[playerid]);
  54. VandensBar[playerid] = INVALID_BAR_ID;
  55.  
  56. TimeDateTD[playerid][0] = CreatePlayerTextDraw(playerid, 547.000000, 29.000000, "2012/09/13");
  57. PlayerTextDrawBackgroundColor(playerid, TimeDateTD[playerid][0], 255);
  58. PlayerTextDrawFont(playerid, TimeDateTD[playerid][0], 3);
  59. PlayerTextDrawLetterSize(playerid, TimeDateTD[playerid][0], 0.310000, 1.400000);
  60. PlayerTextDrawColor(playerid, TimeDateTD[playerid][0], -1);
  61. PlayerTextDrawSetOutline(playerid, TimeDateTD[playerid][0], 1);
  62. PlayerTextDrawSetProportional(playerid, TimeDateTD[playerid][0], 1);
  63.  
  64. TimeDateTD[playerid][1] = CreatePlayerTextDraw(playerid, 566.000000, 13.000000, "22:13");
  65. PlayerTextDrawBackgroundColor(playerid, TimeDateTD[playerid][1], 255);
  66. PlayerTextDrawFont(playerid, TimeDateTD[playerid][1], 3);
  67. PlayerTextDrawLetterSize(playerid, TimeDateTD[playerid][1], 0.419999, 1.900000);
  68. PlayerTextDrawColor(playerid, TimeDateTD[playerid][1], -1);
  69. PlayerTextDrawSetOutline(playerid, TimeDateTD[playerid][1], 1);
  70. PlayerTextDrawSetProportional(playerid, TimeDateTD[playerid][1], 1);
  71.  
  72. pCPID[playerid] = -1;
  73.  
  74. for(new cp; cp < MAX_PLAYER_CPS; cp++)
  75. {
  76. pCPPosX[playerid][cp] = 0.0;
  77. pCPPosY[playerid][cp] = 0.0;
  78. pCPPosZ[playerid][cp] = 0.0;
  79. pCPSize[playerid][cp] = 0.0;
  80. pCPShow[playerid][cp] = false;
  81. }
  82.  
  83. return 1;
  84. }
  85.  
  86. stock GetVehicleSpeed( vehicleid )
  87. {
  88. new
  89. Float:x,
  90. Float:y,
  91. Float:z;
  92.  
  93. GetVehicleVelocity( vehicleid, x, y, z );
  94.  
  95. return floatround( floatsqroot( x*x + y*y + z*z ) * 160.0 );
  96. }
  97.  
  98. stock GetSquareDistance (Float: x1, Float: y1, Float: z1, Float: x2, Float: y2, Float: z2)
  99. {
  100. x1 -= x2;
  101. y1 -= y2;
  102. z1 -= z2;
  103. x1 *= x1;
  104. y1 *= y1;
  105. z1 *= z1;
  106. return floatround (x1 + y1 + z1);
  107. }
  108.  
  109. stock IsPlayerInArea(playerid, Float: max_x, Float: min_x, Float: max_y, Float: min_y)
  110. {
  111. new Float: X, Float: Y, Float: Z;
  112. GetPlayerPos(playerid, X, Y, Z);
  113. if(X <= max_x && X >= min_x && Y <= max_y && Y >= min_y) return 1;
  114. return 0;
  115. }
  116.  
  117. stock LoahouseInteriors()
  118. {
  119. new kiek = sizeof(hInterior), str[20];
  120. strcat(IntList, "{ffffff}");
  121. for(new c; c < kiek; c++)
  122. {
  123. format(str, 20, "#%d - $%s\n", c + 1, konvertuoti_pinigus(hInterior[c][Price]));
  124. strcat(IntList, str);
  125. }
  126. return 1;
  127. }
Advertisement
Add Comment
Please, Sign In to add comment