garfield

[COD]: Deletar Todos os carros com excessão.

Oct 12th, 2011
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.56 KB | None | 0 0
  1. // Deletar carros com excessão:
  2. // Esta função deleta todos os carros. menos aqueles selecionados*
  3. DestroyAllVehWidthExeption(...)
  4. {
  5.     new sVeh[MAX_VEHICLES] = 0;
  6.     for(new i; i < numargs(); ++i) sVeh[i] =  getarg(i);
  7.    
  8.     for(new sVeg = 0; sVeg < MAX_VEHICLES; ++sVeg)
  9.     {
  10.         if(sVeh[sVeg] != sVeg)
  11.         {
  12.             DestroyVehicle(sVeg);
  13.         }
  14.     }
  15. }
  16.  
  17.  
  18. // Uso
  19. DestroyAllVehWidthExeption(50,150);
  20.  
  21. // Para Deletar todos os carros de todos os players:
  22. for(new i; i < MAX_PLAYERS; ++i)  if(IsPlayerConnected(i)DestroyAllVehWidthExeption(GetVehicleModel(i));
  23.  
  24.  
Advertisement
Add Comment
Please, Sign In to add comment