RenasAP

[SA:MP]RandomVehicleSpawns for Bičas.

Jun 14th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.59 KB | None | 0 0
  1. /*
  2.     RandomVehicleSpawns
  3.     for Bičas.
  4.     SA:MP.
  5.     by Renas.
  6.  
  7.  
  8. */
  9. #define MAX_VEHICLES_SPAWNS     4
  10.                 // 4 - x,y,z,a (0,1,2,3)
  11. new const Float:RandomVehicleSpawns[MAX_VEHICLE_SPAWNS] [4] = {
  12.     {x,y,z,a},
  13.     {x,y,z,a},
  14.     {x,y,z,a},
  15.     {x,y,z,a}
  16.  
  17. };
  18.  
  19. // Panaudojimas kažkur
  20. new randomSpawnForVehicle = random(sizeof(RandomVehicleSpawns));
  21. SetVehiclePos(GetPlayerVehicleID(playerid),RandomVehicleSpawns[randomSpawnForVehicle][0],RandomVehicleSpawns[randomSpawnForVehicle][1],RandomVehicleSpawns[randomSpawnForVehicle][2]);
  22. SetVehicleZPos(playerid,RandomVehicleSpawns[randomSpawnForVehicle][3]);
Advertisement
Add Comment
Please, Sign In to add comment