Advertisement
Guest User

Untitled

a guest
May 15th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.96 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. PlayerInfo[playerid][pOverdose] = 0;
  4.  
  5. new string[128];
  6. // Anti-Fake Kill by Neonman
  7. if(PlayerInfo[playerid][pAdmin] < 2)
  8. {
  9. new time = gettime();
  10. switch(time - LastDeath[playerid])
  11. {
  12. case 0..3:
  13. {
  14. DeathSpam[playerid]++;
  15. if(DeathSpam[playerid] == 3) // The maximum spam of deaths after the cheater will get banned.
  16. {
  17. new IP[128];
  18. GetPlayerIp(playerid, IP, sizeof(IP));
  19. format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s has been automatically kicked for death spamming.", GetPlayerNameEx(playerid), playerid);
  20. ABroadCast(COLOR_YELLOW, string, 2);
  21.  
  22. format(string, sizeof(string), "[Death Spam] %s has been kicked for death spam. (IP: %s)",GetPlayerNameEx(playerid), playerid, IP);
  23. Log("logs/fakedeath.log", string);
  24.  
  25. ShowPlayerDialog(playerid, DIALOG_SHOW_INFO, DIALOG_STYLE_MSGBOX, "{FFFFFF}Kicked from server", "You have been kicked from the server for fake kill.", "Ok", "Cancel");
  26. SetTimerEx("SendToKick", 300, 0, "i", playerid);
  27. }
  28. return 1;
  29. }
  30. default: DeathSpam[playerid] = 0;
  31. }
  32. LastDeath[playerid] = time;
  33. }
  34. if(IsPlayerConnected(killerid))
  35. {
  36. new hour,minute,second, weaponname[32];
  37. gettime(hour,minute,second);
  38. FixHour(hour);
  39. hour = shifthour;
  40. GetWeaponName(reason, weaponname, sizeof(weaponname));
  41. format(PlayerInfo[playerid][pKillLog9], 256, "%s", PlayerInfo[playerid][pKillLog8]);
  42. format(PlayerInfo[playerid][pKillLog8], 256, "%s", PlayerInfo[playerid][pKillLog7]);
  43. format(PlayerInfo[playerid][pKillLog7], 256, "%s", PlayerInfo[playerid][pKillLog6]);
  44. format(PlayerInfo[playerid][pKillLog6], 256, "%s", PlayerInfo[playerid][pKillLog5]);
  45. format(PlayerInfo[playerid][pKillLog5], 256, "%s", PlayerInfo[playerid][pKillLog4]);
  46. format(PlayerInfo[playerid][pKillLog4], 256, "%s", PlayerInfo[playerid][pKillLog3]);
  47. format(PlayerInfo[playerid][pKillLog3], 256, "%s", PlayerInfo[playerid][pKillLog2]);
  48. format(PlayerInfo[playerid][pKillLog2], 256, "%s", PlayerInfo[playerid][pKillLog1]);
  49. format(PlayerInfo[playerid][pKillLog1], 256, "%s", PlayerInfo[playerid][pKillLog0]);
  50. format(PlayerInfo[playerid][pKillLog0], 256, "(%d:%d:%d) %s killed me with %s", hour,minute,second,GetPlayerNameEx(killerid), weaponname);
  51.  
  52. format(PlayerInfo[killerid][pKillLog9], 256, "%s", PlayerInfo[killerid][pKillLog8]);
  53. format(PlayerInfo[killerid][pKillLog8], 256, "%s", PlayerInfo[killerid][pKillLog7]);
  54. format(PlayerInfo[killerid][pKillLog7], 256, "%s", PlayerInfo[killerid][pKillLog6]);
  55. format(PlayerInfo[killerid][pKillLog6], 256, "%s", PlayerInfo[killerid][pKillLog5]);
  56. format(PlayerInfo[killerid][pKillLog5], 256, "%s", PlayerInfo[killerid][pKillLog4]);
  57. format(PlayerInfo[killerid][pKillLog4], 256, "%s", PlayerInfo[killerid][pKillLog3]);
  58. format(PlayerInfo[killerid][pKillLog3], 256, "%s", PlayerInfo[killerid][pKillLog2]);
  59. format(PlayerInfo[killerid][pKillLog2], 256, "%s", PlayerInfo[killerid][pKillLog1]);
  60. format(PlayerInfo[killerid][pKillLog1], 256, "%s", PlayerInfo[killerid][pKillLog0]);
  61. format(PlayerInfo[killerid][pKillLog0], 256, "(%d:%d:%d) Killed %s with %s", hour,minute,second,GetPlayerNameEx(playerid), weaponname);
  62. if(GetPVarInt(killerid, "IsInArena") == 0) PlayerInfo[killerid][pDMKills]++;
  63. }
  64. pTazer[playerid] = 0;
  65. InsideShamal[playerid] = INVALID_VEHICLE_ID;
  66. DeletePVar(playerid, "SpeedRadar");
  67. DeletePVar(playerid, "UsingSprunk");
  68. if(arr_Wrecking[playerid] != INVALID_VEHICLE_ID)
  69. {
  70. //UnwreckVehicle(arr_Wrecking[playerid], 1);
  71. arr_Wrecking[playerid] = INVALID_VEHICLE_ID;
  72. }
  73. DestroyDynamicObject(GetPVarInt(playerid, "neon"));
  74. DestroyDynamicObject(GetPVarInt(playerid, "neon1"));
  75. DeletePVar(playerid, "neon0");
  76. DeletePVar(playerid, "neon1");
  77. KillTimer(GetPVarInt(playerid, "firstaid5"));
  78. DeletePVar(playerid, "usingfirstaid");
  79. DeletePVar(playerid, "usingbandage");
  80. if(GetPVarInt(playerid, "MovingStretcher") != -1)
  81. {
  82. KillTimer(GetPVarInt(playerid, "TickEMSMove"));
  83. DeletePVar(GetPVarInt(playerid, "MovingStretcher"), "OnStretcher");
  84. SetPVarInt(playerid, "MovingStretcher", -1);
  85. }
  86. if(GetPVarInt(playerid, "runningRadar") >= 1)
  87. {
  88. new vehid = gLastCar[playerid];
  89. if(CheckingSpeed[vehid] > 0)
  90. {
  91. KillTimer(CheckingSpeed[vehid]);
  92. CheckingSpeed[vehid] = 0;
  93. }
  94. PlayerTextDrawDestroy(playerid, RadarHud);
  95. PlayerTextDrawDestroy(playerid, SpeedAndModel);
  96. DeletePVar(playerid, "runningRadar");
  97. Radars -= 1;
  98. }
  99. new caller = Mobile[playerid];
  100. if(IsPlayerConnected(Mobile[playerid]))
  101. {
  102. SendClientMessageEx(caller, COLOR_GRAD2, "The line went dead.");
  103. format(string, sizeof(string), "* %s puts away their cellphone.", GetPlayerNameEx(caller));
  104. ProxDetector(30.0, caller, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  105. CellTime[caller] = 0;
  106. KillTimer(VmailTmer[caller]);
  107. KillTimer(VmailTmer[playerid]);
  108. Mobile[caller] = INVALID_PLAYER_ID;
  109. }
  110. Mobile[playerid] = INVALID_PLAYER_ID;
  111. CellTime[playerid] = 0;
  112. KillTimer(VmailTmer[playerid]);
  113. KillTimer(VmailTmer[caller]);
  114. RingTone[playerid] = 0;
  115.  
  116. foreach(Player, i)
  117. {
  118. if(EMSAccepted[i] < 999)
  119. {
  120. if(EMSAccepted[i] == playerid)
  121. {
  122. EMSAccepted[i] = 999;
  123. GameTextForPlayer(i, "~w~EMS Caller~n~~r~Has Died", 5000, 1);
  124. EMSCallTime[i] = 0;
  125. DisablePlayerCheckpoint(i);
  126. }
  127. }
  128. }
  129.  
  130. if( GetPVarInt(playerid, "SpecOff" ) == 1 )
  131. {
  132. SpawnPlayer(playerid);
  133. return 1;
  134. }
  135.  
  136. if(GetPVarInt(playerid, "Injured") == 1)
  137. {
  138. foreach(new i: Player)
  139. {
  140. if(EMSAccepted[i] == playerid)
  141. {
  142. EMSAccepted[i] = INVALID_PLAYER_ID;
  143. GameTextForPlayer(i, "~w~EMS Caller~n~~r~Has Died", 5000, 1);
  144. EMSCallTime[i] = 0;
  145. DisablePlayerCheckpoint(i);
  146. }
  147. }
  148. SendClientMessageEx(playerid, COLOR_WHITE, "You appear to be stuck in limbo, medics are trying to revive you.");
  149. KillEMSQueue(playerid);
  150. ResetPlayerWeaponsEx(playerid);
  151. return 1;
  152. }
  153. if(GetPVarInt(playerid, "IsOnFire"))
  154. {
  155. TogglePlayerBurning(playerid, false);
  156. return 1;
  157. }
  158. new Float:px,Float:py,Float:pz;
  159. if(GetPVarInt(playerid, "EventToken") == 0)
  160. {
  161. if(GetPVarInt(playerid, "IsInArena") == -1)
  162. {
  163. SetPVarInt(playerid, "Injured", 1);
  164.  
  165. new Float:mX, Float:mY, Float:mZ;
  166. GetPlayerPos(playerid, mX, mY, mZ);
  167.  
  168. SetPVarFloat(playerid, "MedicX", mX);
  169. SetPVarFloat(playerid, "MedicY", mY);
  170. SetPVarFloat(playerid, "MedicZ", mZ);
  171. SetPVarInt(playerid, "MedicVW", GetPlayerVirtualWorld(playerid));
  172. SetPVarInt(playerid, "MedicInt", GetPlayerInterior(playerid));
  173. }
  174. }
  175. gPlayerSpawned[playerid] = 0;
  176. if(GetPVarInt(playerid, "IsInArena") >= 0)
  177. {
  178. if(GetPVarInt(playerid, "AOSlotPaintballFlag") != -1)
  179. {
  180. switch(PlayerInfo[playerid][pPaintTeam])
  181. {
  182. case 1:
  183. {
  184. DropFlagPaintballArena(playerid, GetPVarInt(playerid, "IsInArena"), 2);
  185. }
  186. case 2:
  187. {
  188. DropFlagPaintballArena(playerid, GetPVarInt(playerid, "IsInArena"), 1);
  189. }
  190. }
  191. }
  192. if(reason >= 0 && reason <= 46)
  193. {
  194. new weapon[24];
  195. PlayerInfo[killerid][pKills] += 1;
  196. PlayerInfo[playerid][pDeaths] += 1;
  197. if(PlayerInfo[killerid][pPaintTeam] == 1)
  198. {
  199. if(PlayerInfo[killerid][pPaintTeam] == PlayerInfo[playerid][pPaintTeam])
  200. {
  201. PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTeamRedKills] -= 1;
  202. PaintBallArena[GetPVarInt(playerid, "IsInArena")][pbTeamBlueKills] += 1;
  203. SetPlayerHealth(killerid, 0);
  204. PlayerInfo[killerid][pKills] -= 2;
  205. PlayerInfo[killerid][pDeaths] += 1;
  206. PlayerInfo[playerid][pDeaths] -= 1;
  207. SendClientMessageEx(killerid, COLOR_WHITE, "You have been warned, do not team-kill!");
  208. }
  209. else
  210. {
  211. PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTeamRedKills] += 1;
  212. PaintBallArena[GetPVarInt(playerid, "IsInArena")][pbTeamBlueDeaths] += 1;
  213. }
  214. }
  215. if(PlayerInfo[killerid][pPaintTeam] == 2)
  216. {
  217. if(PlayerInfo[killerid][pPaintTeam] == PlayerInfo[playerid][pPaintTeam])
  218. {
  219. PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTeamBlueKills] -= 1;
  220. PaintBallArena[GetPVarInt(playerid, "IsInArena")][pbTeamRedKills] += 1;
  221. SetPlayerHealth(killerid, 0);
  222. PlayerInfo[killerid][pKills] -= 2;
  223. PlayerInfo[killerid][pDeaths] += 1;
  224. PlayerInfo[playerid][pDeaths] -= 1;
  225. SendClientMessageEx(killerid, COLOR_WHITE, "You have been warned, do not team-kill!");
  226. }
  227. PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTeamBlueKills] += 1;
  228. PaintBallArena[GetPVarInt(playerid, "IsInArena")][pbTeamRedDeaths] += 1;
  229. }
  230. GetWeaponName(reason,weapon,sizeof(weapon));
  231. if(reason == 0)
  232. {
  233. if(PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTimeLeft] < 12)
  234. {
  235. GivePlayerCash(killerid, 1000);
  236. format(string,sizeof(string),"[Paintball Arena] %s has earned $1000 bonus for a sudden death kill!",GetPlayerNameEx(killerid));
  237. SendPaintballArenaMessage(GetPVarInt(killerid,"IsInArena"), COLOR_YELLOW, string);
  238. }
  239. format(string,sizeof(string),"[Paintball Arena] %s has killed %s with their bare hands!",GetPlayerNameEx(killerid),GetPlayerNameEx(playerid));
  240. }
  241. else
  242. {
  243. if(PaintBallArena[GetPVarInt(killerid, "IsInArena")][pbTimeLeft] < 12)
  244. {
  245. GivePlayerCash(killerid, 1000);
  246. format(string,sizeof(string),"[Paintball Arena] %s has earned $1000 bonus for a sudden death kill!",GetPlayerNameEx(killerid));
  247. SendPaintballArenaMessage(GetPVarInt(killerid,"IsInArena"), COLOR_YELLOW, string);
  248. }
  249. format(string,sizeof(string),"[Paintball Arena] %s has killed %s with a %s.",GetPlayerNameEx(killerid),GetPlayerNameEx(playerid),weapon);
  250. }
  251. }
  252. else
  253. {
  254. PlayerInfo[playerid][pDeaths] += 1;
  255. format(string,sizeof(string),"[Paintball Arena] %s has died.",GetPlayerNameEx(playerid));
  256. }
  257. SendPaintballArenaMessage(GetPVarInt(playerid,"IsInArena"), COLOR_RED, string);
  258. }
  259. PlayerInfo[playerid][pLocal] = 255;
  260. GetPlayerPos(playerid, px, py, pz);
  261.  
  262. if(GetPVarInt(playerid, "Injured") == 0)
  263. {
  264. if( GetPVarInt(playerid, "EventToken") >= 1 || GetPVarInt(playerid, "IsInArena") >= 0)
  265. {
  266. ResetPlayerWeapons(playerid);
  267. }
  268. else
  269. {
  270. ResetPlayerWeaponsEx(playerid);
  271. }
  272. }
  273. if(PlayerInfo[killerid][pAdmin] < 2)
  274. {
  275. if(reason == 49)
  276. {
  277. format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has possibly just car-parked the shit out of %s (ID %d) to death.", GetPlayerNameEx(killerid), killerid, GetPlayerNameEx(playerid), playerid);
  278. ABroadCast(COLOR_YELLOW, string, 2);
  279. print(string);
  280.  
  281. }
  282. if(reason == 50)
  283. {
  284. if(IsAHelicopter(GetPlayerVehicleID(killerid)))
  285. {
  286. format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has possibly just blade-killed the shit out of %s (ID %d).", GetPlayerNameEx(killerid), killerid, GetPlayerNameEx(playerid), playerid);
  287. ABroadCast(COLOR_YELLOW, string, 2);
  288. print(string);
  289. }
  290. else
  291. {
  292. if(GetPlayerWeapon(killerid) != 32 || GetPlayerWeapon(killerid) != 28 || GetPlayerWeapon(killerid) != 29)
  293. {
  294. format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has possibly just car-parked the shit out of %s (ID %d) to death.", GetPlayerNameEx(killerid), killerid, GetPlayerNameEx(playerid), playerid);
  295. ABroadCast(COLOR_YELLOW, string, 2);
  296. print(string);
  297. }
  298. else
  299. {
  300. format(string, sizeof(string), "{AA3333}AdmWarning{FFFF00}: %s (ID %d) has possibly just driver-shot the shit out of %s (ID %d) to death.", GetPlayerNameEx(killerid), killerid, GetPlayerNameEx(playerid), playerid);
  301. ABroadCast(COLOR_YELLOW, string, 2);
  302. print(string);
  303. }
  304. }
  305. }
  306. }
  307. if (gPlayerCheckpointStatus[playerid] > 4 && gPlayerCheckpointStatus[playerid] < 11)
  308. {
  309. DisablePlayerCheckpoint(playerid);
  310. gPlayerCheckpointStatus[playerid] = CHECKPOINT_NONE;
  311. }
  312. if(HaveGPS[playerid])
  313. {
  314. KillTimer(GPSTimer[playerid]);
  315. HaveGPS[playerid] = false;
  316. GPSTimer[playerid] = 0;
  317. }
  318.  
  319. ClearCrime(playerid);
  320. if(PlayerInfo[playerid][pHeadValue] >= 1)
  321. {
  322. if(IsPlayerConnected(killerid))
  323. {
  324. if(GoChase[killerid] == playerid)
  325. {
  326. new killer[MAX_PLAYER_NAME],
  327. name[MAX_PLAYER_NAME], ID;
  328.  
  329. new takemoney = PlayerInfo[playerid][pHeadValue] / 4 * 2;
  330. name = GetPlayerNameEx(playerid);
  331. killer = GetPlayerNameEx(killerid);
  332. GivePlayerCash(killerid, takemoney);
  333. sscanf(PlayerInfo[playerid][pContractBy],"u",ID);
  334. if(!IsPlayerConnected(ID))
  335. {
  336. OnPlayerOfflineLogin(PlayerInfo[playerid][pContractBy]);
  337. PlayerInfo[MAX_PLAYERS][pAccount] -= takemoney;
  338. OnPlayerOfflineSave(PlayerInfo[playerid][pContractBy]);
  339. }
  340. else
  341. {
  342. format(string, sizeof(string), "Hitman %s has fulfilled the contract on %s and you have paid them $%d.",killer,name,takemoney);
  343. SendClientMessageEx(ID, COLOR_YELLOW, string);
  344. GivePlayerCash(ID, -takemoney);
  345. }
  346. format(string,128,"Hitman %s has fulfilled the contract on %s and collected $%d.",killer,name,PlayerInfo[playerid][pHeadValue] / 4 * 2);
  347. SendFamilyMessage(8, COLOR_YELLOW, string);
  348. format(string,128,"You have been critically injured by a hitman.",takemoney);
  349. ResetPlayerWeaponsEx(playerid);
  350. // SpawnPlayer(playerid);
  351. SendClientMessageEx(playerid, COLOR_YELLOW, string);
  352. // KillEMSQueue(playerid);
  353. PlayerInfo[playerid][pHeadValue] = 0;
  354. PlayerInfo[killerid][pCHits] += 1;
  355. GotHit[playerid] = 0;
  356. GetChased[playerid] = 999;
  357. GoChase[killerid] = 999;
  358. }
  359. }
  360. }
  361. if(IsPlayerConnected(killerid))
  362. {
  363. if(GoChase[playerid] == killerid)
  364. {
  365. new killer[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME];
  366. new takemoney = PlayerInfo[playerid][pHeadValue] / 4 * 2;
  367. GivePlayerCash(killerid, takemoney);
  368. name = GetPlayerNameEx(playerid);
  369. killer = GetPlayerNameEx(killerid);
  370. format(string,128,"Hitman %s has failed the contract on %s and lost $%d.",name,killer,PlayerInfo[killerid][pHeadValue] / 4 * 2);
  371. SendFamilyMessage(8, COLOR_YELLOW, string);
  372. GivePlayerCash(playerid, -takemoney);
  373. format(string,128,"You have just killed a hitman and gained $%d, removing the contact on your head.",PlayerInfo[killerid][pHeadValue] / 4 * 2);
  374. SendClientMessageEx(killerid, COLOR_YELLOW, string);
  375. PlayerInfo[killerid][pHeadValue] = 0;
  376. PlayerInfo[playerid][pFHits] += 1;
  377. GotHit[playerid] = 0;
  378. GetChased[killerid] = 999;
  379. GoChase[playerid] = 999;
  380. }
  381. }
  382. killerid = INVALID_PLAYER_ID;
  383. SetPlayerColor(playerid,TEAM_HIT_COLOR);
  384. return 1;
  385. }
  386.  
  387. public OnVehicleDeath(vehicleid)
  388. {
  389. new Float:X, Float:Y, Float:Z;
  390. new Float:XB, Float:YB, Float:ZB;
  391. VehicleStatus{vehicleid} = 1;
  392.  
  393. foreach(Player, i)
  394. {
  395. //TextDrawHideForPlayer(i, FuelText[i]);
  396.  
  397. if(IsATrailer(vehicleid))
  398. {
  399. if(PlayerTruckJob[i][pTDTrailer] == vehicleid)
  400. {
  401. new string[128];
  402. new lostrand = random(10000);
  403. ClearTruckJob(i);
  404. SendClientMessageEx(i, COLOR_RED, " * Your trailer has been destroyed, the Trucking Delivery has been canceled.");
  405. format(string, sizeof(string), " * Failing this delivery has cost you $%d.", lostrand);
  406. SendClientMessageEx(i, COLOR_RED, string);
  407. GivePlayerCash(i, -lostrand);
  408. gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
  409. }
  410. }
  411.  
  412. if(InsideShamal[i] == vehicleid)
  413. {
  414. GetVehiclePos(InsideShamal[i], X, Y, Z);
  415. SetPlayerPos(i, X-4, Y-2.3, Z);
  416. GetVehiclePos(InsideShamal[i], XB, YB, ZB);
  417. if(ZB > 50.0)
  418. {
  419. PlayerInfo[i][pAGuns][GetWeaponSlot(46)] = 46;
  420. GivePlayerValidWeapon(i, 46, 1);
  421. }
  422. PlayerInfo[i][pVW] = 0;
  423. SetPlayerVirtualWorld(i, 0);
  424. PlayerInfo[i][pInt] = 0;
  425. SetPlayerInterior(i, 0);
  426. InsideShamal[i] = INVALID_VEHICLE_ID;
  427. SendClientMessageEx(i, COLOR_WHITE, "The airplane has been damaged, you cannot be inside of it");
  428. }
  429. if(NeonON[vehicleid] == 1)
  430. {
  431. DestroyDynamicObject(GetPVarInt(i, "neon"));
  432. DestroyDynamicObject(GetPVarInt(i, "neon1"));
  433. NeonON[vehicleid]=0;
  434. }
  435. if(arr_Wrecking[i] == vehicleid)
  436. {
  437. //UnwreckVehicle(vehicleid, 1);
  438. arr_Wrecking[i] = INVALID_VEHICLE_ID;
  439. }
  440. if(GetPVarInt(i, "NGPassengerVeh") == vehicleid)
  441. {
  442. TogglePlayerSpectating(i, 0);
  443. }
  444. }
  445. arr_Engine{vehicleid} = 0;
  446. DObject2(obj[vehicleid]);
  447. DObject3(obj[vehicleid]);
  448. DObject6(obj[vehicleid]);
  449. if(IsValidDynamicObject(obj1[vehicleid]) || IsValidDynamicObject(obj2[vehicleid]) || IsValidDynamicObject(obj3[vehicleid]) ||
  450. IsValidDynamicObject(obj4[vehicleid]) || IsValidDynamicObject(obj5[vehicleid]) || IsValidDynamicObject(obj6[vehicleid]) ||
  451. IsValidDynamicObject(obj7[vehicleid]) || IsValidDynamicObject(obj8[vehicleid]) || IsValidDynamicObject(obj9[vehicleid])) {
  452. DestroyDynamicObject(obj1[vehicleid]), DestroyDynamicObject(obj2[vehicleid]), DestroyDynamicObject(obj3[vehicleid]),
  453. DestroyDynamicObject(obj4[vehicleid]), DestroyDynamicObject(obj5[vehicleid]), DestroyDynamicObject(obj6[vehicleid]),
  454. DestroyDynamicObject(obj7[vehicleid]), DestroyDynamicObject(obj8[vehicleid]), DestroyDynamicObject(obj9[vehicleid]);
  455. }
  456. if(CheckingSpeed[vehicleid] > 0)
  457. {
  458. KillTimer(CheckingSpeed[vehicleid]);
  459. CheckingSpeed[vehicleid] = 0;
  460. Radars -= 1;
  461. }
  462. return 1;
  463. }
  464.  
  465. public OnPlayerSpawn(playerid)
  466. {
  467. if(PlayerInfo[playerid][pLoggedIn] != 1)
  468. {
  469. SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!");
  470. Kick(playerid);
  471. }
  472. if(strlen(PlayerInfo[playerid][pEmail]) < 3)
  473. {
  474. SendClientMessageEx(playerid, COLOR_GRAD2, " We have no email on file for this account, please enter your email below for Password Reset Purposes.");
  475. ShowPlayerDialog(playerid, DIALOG_SET_EMAIL, DIALOG_STYLE_INPUT, "{FFFFFF}Enter Email", "Please enter your Email address into the box.", "Ok", "Cancel");
  476. }
  477. if(PlayerInfo[playerid][pHelper] > 1) SetPVarInt(playerid, "AdvisorDuty", 1); Advisors += 1;
  478. if(turfWarsRadar[playerid] == 0) {
  479. ShowTurfWarsRadar(playerid);
  480. }
  481. if(!gPlayerLogged{playerid})
  482. {
  483. SendClientMessageEx(playerid, COLOR_WHITE, "ERROR: You are not logged in!");
  484. Kick(playerid);
  485. return 1;
  486. }
  487. Streamer_Update(playerid);
  488. if(GetPVarInt(playerid, "WreckingGate"))
  489. {
  490. DestroyObject(GetPVarInt(playerid, "WreckingGate"));
  491. DeletePVar(playerid, "WreckingGate");
  492. return 1;
  493. }
  494. if(GetPVarInt(playerid, "NGPassenger") == 1)
  495. {
  496. new Float:X, Float:Y, Float:Z;
  497. GetVehiclePos(GetPVarInt(playerid, "NGPassengerVeh"), X, Y, Z);
  498. SetPlayerPos(playerid, (X-2.557), (Y-3.049), Z);
  499. SetPlayerWeaponsEx(playerid);
  500. GivePlayerValidWeapon(playerid, 46, 1);
  501. SetPlayerSkin(playerid, GetPVarInt(playerid, "NGPassengerSkin"));
  502. SetPlayerHealth(playerid, GetPVarFloat(playerid, "NGPassengerHP"));
  503. SetPlayerArmour(playerid, GetPVarFloat(playerid, "NGPassengerArmor"));
  504. DeletePVar(playerid, "NGPassenger");
  505. DeletePVar(playerid, "NGPassengerVeh");
  506. DeletePVar(playerid, "NGPassengerArmor");
  507. DeletePVar(playerid, "NGPassengerHP");
  508. DeletePVar(playerid, "NGPassengerSkin");
  509. return 1;
  510. }
  511. if(InsideShamal[playerid] != INVALID_VEHICLE_ID)
  512. {
  513. SetPlayerPos(playerid, GetPVarFloat(playerid, "air_Xpos"), GetPVarFloat(playerid, "air_Ypos"), GetPVarFloat(playerid, "air_Zpos"));
  514. SetPlayerFacingAngle(playerid, GetPVarFloat(playerid, "air_Rpos"));
  515. SetPlayerHealth(playerid, GetPVarFloat(playerid, "air_HP"));
  516. SetPlayerArmour(playerid, GetPVarFloat(playerid, "air_Arm"));
  517. SetPlayerWeaponsEx(playerid);
  518. SetPlayerToTeamColor(playerid);
  519. SetPlayerSkin(playerid, PlayerInfo[playerid][pModel]);
  520.  
  521. DeletePVar(playerid, "air_Xpos");
  522. DeletePVar(playerid, "air_Ypos");
  523. DeletePVar(playerid, "air_Zpos");
  524. DeletePVar(playerid, "air_Rpos");
  525. DeletePVar(playerid, "air_HP");
  526. DeletePVar(playerid, "air_Arm");
  527.  
  528. SetCameraBehindPlayer(playerid);
  529. SetPlayerVirtualWorld(playerid, InsideShamal[playerid]);
  530. return SetPlayerInterior(playerid, 1);
  531. }
  532. SyncPlayerTime(playerid);
  533. if(IsPlayerNPC(playerid)) return 1;
  534. SetPlayerWantedLevel(playerid, PlayerInfo[playerid][pWantedLevel]);
  535. STDPlayer[playerid] = 0;
  536. KillTimer(TimerATACH[playerid]);
  537. gTeam[playerid] = PlayerInfo[playerid][pTeam];
  538.  
  539. if(!gPlayerLogged{playerid}) return Kick(playerid);
  540.  
  541. SetPlayerSpawn(playerid);
  542. SetPlayerWeapons(playerid);
  543. SetPlayerToTeamColor(playerid);
  544.  
  545. PlayerTextDrawShow(playerid, ServerTips);
  546. PlayerTextDrawShow(playerid, MessagesTD);
  547. PlayerTextDrawShow(playerid, ServerBanner);
  548.  
  549. CheckPH(playerid);
  550. SetWeaponSkills(playerid);
  551.  
  552. return 1;
  553. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement