Advertisement
Guest User

Untitled

a guest
Apr 9th, 2020
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.59 KB | None | 0 0
  1. // Vérification du propriétaire
  2. new
  3.     string[128],
  4.     bool:delete_vehicle[MAX_VEHICLES_SERVER] = false,
  5.     vCount = 0,
  6.     Cache:result;
  7.  
  8. foreach(new vehid : Vehicles)
  9. {
  10.     if(Vehicle_infos[vehid][v_Clan] != 0)
  11.     {
  12.         mysql_format(mysql, string, sizeof(string),"SELECT `clan_lead` FROM `users` WHERE `id` = '%d' LIMIT 1", playerInfo[playerid][E_LeadClan]);
  13.         result = mysql_query(mysql, string);
  14.  
  15.         if(!cache_num_rows()) {
  16.             delete_vehicle[vehid] = true;
  17.             vCount++;
  18.         }
  19.         cache_delete(result);
  20.     }
  21. }
  22. Loop(vehid, MAX_VEHICLES_SERVER)
  23. {
  24.     if(delete_vehicle[vehid])
  25.         Vehicle_destroy(vehid);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement