Advertisement
Guest User

Untitled

a guest
Sep 14th, 2018
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.68 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. PrintVehicles()
  4. {
  5.     for(new i = 1; i <= MAX_VEHICLES; ++i)
  6.     {
  7.         new model = GetVehicleModel(i);
  8.         if(model)
  9.         {
  10.             printf("Model: %d - ID: %d", model, i);
  11.         }
  12.     }
  13.     print(" ");
  14. }
  15.  
  16. public OnGameModeInit()
  17. {
  18.     // create 4 dummy vehicles
  19.     new v = AddStaticVehicle(400, 0.0, 0.0, 0.0, 0.0, 0, 0);
  20.     AddStaticVehicle(401, 0.0, 0.0, 0.0, 0.0, 0, 0);
  21.     AddStaticVehicle(402, 0.0, 0.0, 0.0, 0.0, 0, 0);
  22.     AddStaticVehicle(403, 0.0, 0.0, 0.0, 0.0, 0, 0);
  23.    
  24.     PrintVehicles();
  25.    
  26.     DestroyVehicle(v); // destroy the first vehicle created
  27.     AddStaticVehicle(538, 0.0, 0.0, 0.0, 0.0, 0, 0); // create a train (+3 trailers internally)
  28.    
  29.     PrintVehicles();
  30.     return 1;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement