Advertisement
Guest User

ffff

a guest
Aug 9th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.22 KB | None | 0 0
  1. public OnPlayerDeath(playerid, killerid, reason)
  2. {
  3. Alive[playerid] = 0;
  4. CheckDelay[playerid] = 10;
  5. TextDrawHideForPlayer(playerid, Status[playerid]);
  6. new vehicleid = GetPlayerVehicleID(playerid);
  7. if(vehicleVariables[vehicleid][vVehicleJob] == 7)
  8. {
  9. format(szMessage, sizeof(szMessage), "Job failed.");
  10. SCM(playerid, COLOR_NOB, szMessage);
  11. SetVehicleToRespawnEx(vehicleid);
  12. KillTimer(mowertimer[playerid]);
  13. MowerMoney[playerid] = 0;
  14. TextDrawHideForPlayer(playerid,Mower[playerid]);
  15. playerVariables[playerid][pFarmerMoney] = 0;
  16.  
  17. }
  18. if(PlayerPaintballing[playerid] != 0)
  19. {
  20. foreach(Player, x)
  21. {
  22. if((PlayerPaintballing[playerid] != 0 && PlayerPaintballing[killerid] != 0) && PlayerPaintballing[x])
  23. {
  24. SendDeathMessageToPlayer(x, killerid, playerid, reason);
  25. }
  26. }
  27. new string[500];
  28.  
  29.  
  30. new pinfo[128];
  31. KillP[killerid]++;
  32. DeathP[playerid]++;
  33.  
  34. format(string, sizeof(string), "You have killed %s. You now have %d kills.",GetName(playerid), KillP[killerid]);
  35. SendClientMessage(killerid, COLOR_GENANNOUNCE, string);
  36.  
  37. format(string, sizeof(string), "You have been killed by %s.",GetName(killerid));
  38. SendClientMessage(playerid, COLOR_GENANNOUNCE, string);
  39.  
  40. PlayerPaintballScore[killerid] = KillP[killerid];
  41. if(PlayerPaintballScore[killerid] > PaintballWinnerScore)
  42. {
  43. PaintballWinner = killerid;
  44. PaintballWinnerScore = PlayerPaintballScore[killerid];
  45. foreach(Player,i)
  46. {
  47. if(IsPlayerConnected(i))
  48. {
  49. if(PlayerPaintballing[i] != 0)
  50. {
  51. format(pinfo,sizeof(pinfo),"%s is now in lead with %d kills.",GetName(PaintballWinner),PaintballWinnerScore);
  52. SCM(i, COLOR_YELLOW, pinfo);
  53. }
  54. }
  55. }
  56. }
  57. return 1;
  58. }
  59. KillTimer(mowertimer[playerid]);
  60. if(playerVariables[playerid][pHeadValue] > 0)
  61. {
  62. if(IsPlayerConnected(killerid))
  63. {
  64. if(playerVariables[killerid][pGroup] == 12)
  65. {
  66. if(GoChase[killerid] == playerid)
  67. {
  68. new string[256];
  69. new killer[MAX_PLAYER_NAME];
  70. new name[MAX_PLAYER_NAME];
  71. GetPlayerName(killerid, killer, sizeof(killer));
  72. GetPlayerName(playerid, name, sizeof(name));
  73. playerVariables[killerid][pMoney] += playerVariables[playerid][pHeadValue];
  74. format(string,128,"%s has succesfully completed the contract on %s for $%d, distance: %.0fm.",killer,name,playerVariables[playerid][pHeadValue], GetDistanceBetweenPlayers(killerid, playerid));
  75. SendToGroup(12, COLOR_HIT, string);
  76. playerVariables[playerid][pHeadValue] = -1;
  77. GotHit[playerid] = 0;
  78. GetChased[playerid] = 999;
  79. GoChase[killerid] = 999;
  80. }
  81. }
  82. }
  83. }
  84. new turfkiller, turfplayerid;
  85. for(new i = 0; i <= sizeof(TurfInfo); i++)
  86. {
  87. if(IsPlayerInTurf(playerid, i) == 1)
  88. {
  89. turfplayerid = i;
  90. break;
  91. }
  92. }
  93. for(new i = 0; i <= sizeof(TurfInfo); i++)
  94. {
  95. if(IsPlayerInTurf(killerid, i) == 1)
  96. {
  97. turfkiller = i;
  98. break;
  99. }
  100. }
  101. new string[256];
  102. if(WarInfo[turfplayerid][wTime] > 0 && WarInfo[turfkiller][wTime] > 0)
  103. {
  104. if(turfplayerid == turfkiller)
  105. {
  106. if(playerVariables[playerid][pGroup] == WarInfo[turfplayerid][wAttacker] && playerVariables[killerid][pGroup] == WarInfo[turfplayerid][wFaction])
  107. {
  108. playerVariables[playerid][pWarDeaths] += 1;
  109. format(string, sizeof(string), "You have been killed by %s (%i)", playerVariables[killerid][pNormalName], killerid);
  110. SCM(playerid, COLOR_GENANNOUNCE, string);
  111.  
  112. groupVariables[WarInfo[turfkiller][wFaction]][gScore] += 1;
  113. playerVariables[killerid][pWarScore] += 1;
  114. format(string, sizeof(string), "You have killed %s (%i).", playerVariables[playerid][pNormalName], playerid);
  115. SCM(killerid, COLOR_GENANNOUNCE, string);
  116.  
  117. foreach(Player, x)
  118. {
  119. if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction])
  120. {
  121. SendDeathMessageToPlayer(x, killerid, playerid, reason);
  122. }
  123. }
  124. SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in the HQ.");
  125. }
  126. else if(playerVariables[killerid][pGroup] == WarInfo[turfkiller][wAttacker] && playerVariables[playerid][pGroup] == WarInfo[turfkiller][wFaction])
  127. {
  128. playerVariables[playerid][pWarDeaths] += 1;
  129. format(string, sizeof(string), "You have been killed by %s (%i).", playerVariables[killerid][pNormalName], killerid);
  130. SCM(playerid, COLOR_GENANNOUNCE, string);
  131.  
  132. groupVariables[WarInfo[turfplayerid][wAttacker]][gScore] += 1;
  133. playerVariables[killerid][pWarScore] += 1;
  134. format(string, sizeof(string), "You have killed %s (%i).", playerVariables[playerid][pNormalName], playerid);
  135. SCM(killerid, COLOR_GENANNOUNCE, string);
  136.  
  137. foreach(Player, x)
  138. {
  139. if(playerVariables[x][pGroup] == WarInfo[turfplayerid][wAttacker] || playerVariables[x][pGroup] == WarInfo[turfplayerid][wFaction])
  140. {
  141. SendDeathMessageToPlayer(x, killerid, playerid, reason);
  142. }
  143. }
  144. SCM(playerid, COLOR_LIGHTBLUE, "You will be spawned in group HQ.");
  145. }
  146. }
  147. }
  148. if((WarInfo[turfkiller][wTime] != 0 && (WarInfo[turfkiller][wAttacker] == playerVariables[playerid][pGroup] || WarInfo[turfkiller][wFaction] == playerVariables[playerid][pGroup]) && playerVariables[playerid][pGroup] != 0) || (playerVariables[killerid][pGroup] == 1
  149. || playerVariables[killerid][pGroup] == 2 || playerVariables[killerid][pGroup] == 3 || playerVariables[killerid][pGroup] == 5) || (playerVariables[playerid][pGroup] == 1 || playerVariables[playerid][pGroup] == 2 || playerVariables[playerid][pGroup] == 3 || playerVariables[playerid][pGroup] == 5) || (playerVariables[playerid][pGroup] == playerVariables[killerid][pGroup]) || (PlayerPaintballing[killerid] >= 1))
  150. {
  151.  
  152. }
  153. else
  154. {
  155. WantedID[playerid] = killerid;
  156. SCM(playerid, COLOR_GENANNOUNCE, "You have been attacked by another player. You have 60 seconds to call the police to report this crime. Use /call 112.");
  157. WantedIDTime[playerid] = 60;
  158. }
  159. //SetTimerEx("Spawn", 3999, 0, "d", playerid);
  160. SetPlayerHealth(playerid, 0);
  161. killerid = INVALID_PLAYER_ID;
  162. return 1;
  163. }
  164. stock savePlayerData(const playerid)
  165. {
  166. if(playerVariables[playerid][pStatus] >= 1 || playerVariables[playerid][pStatus] == -1)
  167. {
  168. new saveQuery[1000];
  169. if(playerVariables[playerid][pStatus] == -1) playerVariables[playerid][pStatus] = 0;
  170.  
  171. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerBanned = '%d', playerSeconds = '%d', playerSkin = '%d', playerMoney = '%d', playerBankMoney = '%d', playerHouse = '%d', playerBusiness = '%d' WHERE playerID = '%d'",
  172. playerVariables[playerid][pBanned], playerVariables[playerid][pSeconds], playerVariables[playerid][pSkin], playerVariables[playerid][pMoney], playerVariables[playerid][pBankMoney], playerVariables[playerid][pHouse], playerVariables[playerid][pBusiness],playerVariables[playerid][pInternalID]);
  173. mysql_tquery(handle,saveQuery);
  174. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerColor = '%d', playerInterior = '%d', playerVirtualWorld = '%d', playerHealth = '%f', playerArmour = '%f', playerBoatLic = '%d' WHERE playerID = '%d'",
  175. playerVariables[playerid][pColor], playerVariables[playerid][pInterior], playerVariables[playerid][pVirtualWorld], playerVariables[playerid][pHealth], playerVariables[playerid][pArmour], playerVariables[playerid][pBoatLicense],playerVariables[playerid][pInternalID]);
  176. mysql_tquery(handle,saveQuery);
  177. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerAdminLevel = '%d', playerJob = '%d', playerWeapon0 = '%d', playerWeapon1 = '%d', playerWeapon2 = '%d', playerWeapon3 = '%d' WHERE playerID = '%d'",
  178. playerVariables[playerid][pAdminLevel], playerVariables[playerid][pJob], playerVariables[playerid][pWeapons][0], playerVariables[playerid][pWeapons][1], playerVariables[playerid][pWeapons][2], playerVariables[playerid][pWeapons][3],playerVariables[playerid][pInternalID]);
  179. mysql_tquery(handle,saveQuery);
  180. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerWeapon4 = '%d', playerWeapon5 = '%d', playerWeapon6 = '%d', playerWeapon7 = '%d', playerWeapon8 = '%d', playerWeapon9 = '%d', playerWeapon10 = '%d' WHERE playerID = '%d'",
  181. playerVariables[playerid][pWeapons][4], playerVariables[playerid][pWeapons][5], playerVariables[playerid][pWeapons][6], playerVariables[playerid][pWeapons][7], playerVariables[playerid][pWeapons][8], playerVariables[playerid][pWeapons][9], playerVariables[playerid][pWeapons][10],playerVariables[playerid][pInternalID]);
  182. mysql_tquery(handle,saveQuery);
  183. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerWeapon11 = '%d', playerWeapon12 = '%d', playerJobSkill2 = '%d', playerMaterials = '%d', playerHours = '%d', playerLevel = '%d' WHERE playerID = '%d'",
  184. playerVariables[playerid][pWeapons][11], playerVariables[playerid][pWeapons][12], playerVariables[playerid][pDonate], playerVariables[playerid][pMaterials], playerVariables[playerid][pPlayingHours], playerVariables[playerid][pLevel],playerVariables[playerid][pInternalID]);
  185. mysql_tquery(handle,saveQuery);
  186. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerWarning1 = '%s', playerWarning2 = '%s', playerWarning3 = '%s', playerHospitalized = '%d', playerFirstLogin = '%d', playerAdminName = '%s', playerPrisonTime = '%d', playerPrisonID = '%d', playerPhoneNumber = '%d' WHERE playerID = '%d'",
  187. playerVariables[playerid][pCarLic], playerVariables[playerid][pFlyLic], playerVariables[playerid][pGunLic], playerVariables[playerid][pHospitalized], playerVariables[playerid][pFirstLogin], playerVariables[playerid][pCrimeReason],
  188. playerVariables[playerid][pPrisonTime], playerVariables[playerid][pPrisonID], playerVariables[playerid][pPhoneNumber],playerVariables[playerid][pInternalID]);
  189. mysql_tquery(handle,saveQuery);
  190.  
  191.  
  192. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarPaintJob = '%d', playerCarLock = '%d', playerStatus = '%d', playerGender = '%d', playerFightStyle = '%d', playerCarWeapon1 = '%d', playerCarWeapon2 = '%d', playerCarWeapon3 = '%d', playerCarWeapon4 = '%d', playerCarWeapon5 = '%d' WHERE playerID = '%d'",
  193. playerVariables[playerid][pCarPaintjob], playerVariables[playerid][pCarLock],
  194. playerVariables[playerid][pStatus], playerVariables[playerid][pGender], playerVariables[playerid][pFightStyle], playerVariables[playerid][pCarWeapons], playerVariables[playerid][pFPunish], playerVariables[playerid][pFWarns], playerVariables[playerid][pSpawnChange], playerVariables[playerid][pPremiumPoints], playerVariables[playerid][pInternalID]);
  195. mysql_tquery(handle,saveQuery);
  196.  
  197.  
  198. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerCarTrunk1 = '%d', playerCarTrunk2 = '%d', playerPhoneCredit = '%d', playerWalkieTalkie = '%d', playerFlyLic = '%d', playerGunLic = '%d' WHERE playerID = '%d'",
  199. playerVariables[playerid][pCarKM], playerVariables[playerid][pDrugs], playerVariables[playerid][pPhoneCredit], playerVariables[playerid][pWalkieTalkie],playerVariables[playerid][pFlyLicense],playerVariables[playerid][pGunLicense],playerVariables[playerid][pInternalID]);
  200. mysql_tquery(handle,saveQuery);
  201. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerPhoneBook = '%d', playerGroup = '%d', playerGroupRank = '%d', playerRope = '%d', playerAdminDuty = '%d', playerCrimes = '%d', playerArrests = '%d', playerWarrants = '%d', playerAge = '%d', playerCarMod7 = '%d', playerCarMod8 = '%d', playerCarMod9 = '%d', playerCarMod10 = '%d', playerCarMod11 = '%d', playerCarMod12 = '%d' WHERE playerID = '%d'",
  202. playerVariables[playerid][pPhoneBook],playerVariables[playerid][pGroup], playerVariables[playerid][pGroupRank], playerVariables[playerid][pDriveLicense], playerVariables[playerid][pRobPoints], playerVariables[playerid][pCrimes], playerVariables[playerid][pArrests], playerVariables[playerid][pWarrants], playerVariables[playerid][pRPoints], playerVariables[playerid][pCarMods1][7], playerVariables[playerid][pCarMods1][8],
  203. playerVariables[playerid][pCarMods1][9], playerVariables[playerid][pCarMods1][10], playerVariables[playerid][pCarMods1][11], playerVariables[playerid][pCarMods1][12], playerVariables[playerid][pInternalID]);
  204. mysql_tquery(handle,saveQuery);
  205. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerHelperLevel = '%d', playerClan = '%d', playerClanRank = '%d', playerPhone = '%d', playerManager = '%d', playerClanTagType = '%d', playerHelpedPlayers = '%d', playerHelperTokens = '%d', playerHouseRented = '%d', playerGlasses = '%d' WHERE playerID = '%d'",
  206. playerVariables[playerid][pHelper],playerVariables[playerid][pClan],playerVariables[playerid][pClanRank],playerVariables[playerid][pPhone],playerVariables[playerid][pManager],playerVariables[playerid][pClanTagType],
  207. playerVariables[playerid][pHelpedPlayers],playerVariables[playerid][pHelperTokens],playerVariables[playerid][pHouseRented],playerVariables[playerid][pGlasses], playerVariables[playerid][pInternalID]);
  208. mysql_tquery(handle,saveQuery);
  209. format(saveQuery, sizeof(saveQuery), "UPDATE playeraccounts SET playerGiftHours = %d, playerHud = '%d', playerInsurance = '%d', playerInsurance2 = '%d', playerInsurance3 = '%d', playerInsurance4 = '%d', playerInsurancePoints = '%d', playerInsurancePoints2 = '%d', playerInsurancePoints3 = '%d', playerInsurancePoints4 = '%d' WHERE playerID = '%d'",
  210. playerVariables[playerid][pGiftHours],playerVariables[playerid][ShowHealth],playerVariables[playerid][pInsurance],playerVariables[playerid][pInsurance2],playerVariables[playerid][pInsurance3],playerVariables[playerid][pInsurance4],playerVariables[playerid][pInsurancePoints],playerVariables[playerid][pInsurancePoints2],playerVariables[playerid][pInsurancePoints3],playerVariables[playerid][pInsurancePoints4], playerVariables[playerid][pInternalID]);
  211. mysql_tquery(handle,saveQuery);
  212.  
  213. }
  214.  
  215. return 1;
  216. }
  217.  
  218. stock doesVehicleExist(const vehicleid)
  219. {
  220. if(GetVehicleModel(vehicleid) >= 400)
  221. {
  222. return 1;
  223. }
  224. return 0;
  225. }
  226.  
  227. public OnPlayerDisconnect(playerid, reason)
  228. {
  229. #if defined DEBUG
  230. printf("[debug] OnPlayerDisconnect(%d, %d)", playerid, reason);
  231. #endif
  232.  
  233. TextDrawDestroy(Status[playerid]);
  234. Distance[playerid] = 0;
  235. Alive[playerid] = 0;
  236. CheckDelay[playerid] = 0;
  237. SpawnTimes[playerid] = 0;
  238.  
  239. ServerNews[playerid] = 0;
  240. playerVariables[playerid][pFarmerMoney] = 0;
  241. PlayerPaintballing[playerid] = 0;
  242. KillTimer(mowertimer[playerid]);
  243. SetPlayerName(playerid, playerVariables[playerid][pNormalName]);
  244. savePlayerData(playerid);
  245. if(GotHit[playerid] != 0)
  246. {
  247. new id = GoChase[playerid];
  248. GotHit[playerid] = 0;
  249. GoChase[playerid] = 999;
  250. GetChased[id] = 999;
  251. format(szMessage, sizeof(szMessage), "Your target has left the game. Use /contracts to see other targets.");
  252. SCM(id, COLOR_TEAL, szMessage);
  253. }
  254. if(GetChased[playerid] != 999)
  255. {
  256. GetChased[playerid] = 999;
  257. }
  258.  
  259.  
  260. new year, month, day, hour, minute, second;
  261. getdate(year, month, day);
  262. gettime(hour, minute, second);
  263. format(playerVariables[playerid][pLastLogin], 20, "%02d.%02d.%d %02d:%02d", day, month, year, hour, minute);
  264. new query[256];
  265. format(query, sizeof(query), "UPDATE playeraccounts SET playerLastLogin = '%s' WHERE playerID = '%d'", playerVariables[playerid][pLastLogin], playerVariables[playerid][pInternalID]);
  266. mysql_tquery(handle,query);
  267. if(playerVariables[playerid][pStatus] >= 1)
  268. {
  269.  
  270. playerVariables[playerid][pStatus] = -1;
  271. foreach(Player, x)
  272. {
  273. if(playerVariables[x][pSpectating] == playerid)
  274. {
  275.  
  276. TextDrawHideForPlayer(x, info[x]);
  277. TextDrawHideForPlayer(x, carspeed[x]);
  278. TextDrawHideForPlayer(x, carinfo[x]);
  279. TextDrawHideForPlayer(x, viata[x]);
  280. TextDrawHideForPlayer(x, wantedjail[x]);
  281. TogglePlayerSpectating(x, 0);
  282. SendClientMessage(x, COLOR_GREY, "The player you were spectating has disconnected.");
  283. }
  284. }
  285. if(TransportDuty[playerid] == 1)
  286. {
  287. TaxiDrivers -= 1;
  288. }
  289. if(TransportDuty[playerid] == 1)
  290. {
  291. TaxiDrivers -= 1;
  292. }
  293. if(TransportDuty[playerid] == 2)
  294. {
  295. BusDrivers -= 1;
  296. }
  297. foreach(Player, i)
  298. {
  299. if(TaxiAccepted[i] < 999)
  300. {
  301. if(TaxiAccepted[i] == playerid)
  302. {
  303. TaxiAccepted[i] = 999;
  304. GameTextForPlayer(i, "~w~Taxi Caller~n~~r~Left the game", 5000, 1);
  305. TaxiCallTime[i] = 0;
  306. DisablePlayerCheckpoint(i);
  307. }
  308. }
  309. if(MedicAccepted[i] < 999)
  310. {
  311. if(MedicAccepted[i] == playerid)
  312. {
  313. MedicAccepted[i] = 999;
  314. GameTextForPlayer(i, "~w~Taxi Caller~n~~r~Left the game", 5000, 1);
  315. MedicCallTime[i] = 0;
  316. DisablePlayerCheckpoint(i);
  317. }
  318. }
  319. }
  320. if(TransportCost[playerid] > 0 && TransportDriver[playerid] < 999)
  321. {
  322. if(IsPlayerConnected(TransportDriver[playerid]))
  323. {
  324. new string[64];
  325. TransportMoney[TransportDriver[playerid]] += TransportCost[playerid];
  326. TransportTime[TransportDriver[playerid]] = 0;
  327. TransportCost[TransportDriver[playerid]] = 0;
  328. format(string, sizeof(string), "~w~Passenger left~n~~g~Earned $%d",TransportCost[playerid]);
  329. GameTextForPlayer(TransportDriver[playerid], string, 5000, 1);
  330. }
  331. }
  332. if(playerVariables[playerid][pPhoneCall] != -1 && playerVariables[playerid][pPhoneCall] < MAX_PLAYERS)
  333. {
  334.  
  335. SendClientMessage(playerVariables[playerid][pPhoneCall], COLOR_WHITE, "Your call has been terminated by the other party.");
  336.  
  337. if(GetPlayerSpecialAction(playerVariables[playerid][pPhoneCall]) == SPECIAL_ACTION_USECELLPHONE)
  338. {
  339. SetPlayerSpecialAction(playerVariables[playerid][pPhoneCall], SPECIAL_ACTION_STOPUSECELLPHONE);
  340. }
  341.  
  342. playerVariables[playerVariables[playerid][pPhoneCall]][pPhoneCall] = -1;
  343. }
  344.  
  345. if(playerVariables[playerid][pAdminLevel] < 1)
  346. {
  347. switch(reason)
  348. {
  349. case 1: format(szMessage, sizeof(szMessage), "%s has left the server.", playerVariables[playerid][pNormalName]);
  350. case 2: format(szMessage, sizeof(szMessage), "%s has been kicked or banned from the server.", playerVariables[playerid][pNormalName]);
  351. default: format(szMessage, sizeof(szMessage), "%s has timed out from the server.", playerVariables[playerid][pNormalName]);
  352. }
  353. nearByMessage(playerid, COLOR_GENANNOUNCE, szMessage);
  354. }
  355.  
  356. if(playerVariables[playerid][pGroup] >= 1)
  357. {
  358. switch(reason)
  359. {
  360. case 0:
  361. {
  362. format(szMessage, sizeof(szMessage), "%s from your group has disconnected (crash).", playerVariables[playerid][pNormalName]);
  363. }
  364. case 1:
  365. {
  366. format(szMessage, sizeof(szMessage), "%s from your group has disconnected (quit).", playerVariables[playerid][pNormalName]);
  367. }
  368. case 2:
  369. {
  370. format(szMessage, sizeof(szMessage), "%s from your group has disconnected (banned/kicked).", playerVariables[playerid][pNormalName]);
  371. }
  372. }
  373. SendToGroup(playerVariables[playerid][pGroup], COLOR_GENANNOUNCE, szMessage);
  374. }
  375. if(playerVariables[playerid][pCarModel1] >= 1)
  376. {
  377. DestroyVehicle(playerVariables[playerid][pCarID1]);
  378. Lock[playerVariables[playerid][pCarID1]] = 0;
  379. systemVariables[vehicleCounts][1]--;
  380. playerVariables[playerid][pCarID1] = -1;
  381.  
  382. }
  383. if(playerVariables[playerid][pCarModel2] >= 1)
  384. {
  385. DestroyVehicle(playerVariables[playerid][pCarID2]);
  386. Lock[playerVariables[playerid][pCarID2]] = 0;
  387. systemVariables[vehicleCounts][1]--;
  388. playerVariables[playerid][pCarID2] = -1;
  389.  
  390. }
  391. if(playerVariables[playerid][pCarModel3] >= 1)
  392. {
  393. DestroyVehicle(playerVariables[playerid][pCarID3]);
  394. Lock[playerVariables[playerid][pCarID3]] = 0;
  395. systemVariables[vehicleCounts][1]--;
  396. playerVariables[playerid][pCarID3] = -1;
  397.  
  398. }
  399. if(playerVariables[playerid][pCarModel4] >= 1)
  400. {
  401. DestroyVehicle(playerVariables[playerid][pCarID4]);
  402. Lock[playerVariables[playerid][pCarID4]] = 0;
  403. systemVariables[vehicleCounts][1]--;
  404. playerVariables[playerid][pCarID4] = -1;
  405.  
  406. }
  407. new mysqlquery[150];
  408. format(mysqlquery, 150, "UPDATE playeraccounts SET playerStatus = 0 WHERE playerID= '%d'", playerVariables[playerid][pInternalID]);
  409. mysql_tquery(handle,mysqlquery);
  410. }
  411. return 1;
  412. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement