Advertisement
Ygal_Idan

Spawn Rand

Jan 11th, 2015
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.49 KB | None | 0 0
  1. new SpawnS[MAX_PLAYERS];
  2.  
  3. new Float:Spawns[6][3] =
  4. {
  5. {-1648.4087,95.7513,-11.1931},
  6. {-960.3566,979.8118,34.5781},
  7. {-846.6107,999.4467,24.5883},
  8. {-1899.1678,1016.9435,40.5593},
  9. {2238.4832,2428.8569,10.8203},
  10. {-1753.7567,961.5361,24.8828}
  11. };
  12.  
  13.  
  14. public OnPlayerSpawn(playerid)
  15. {
  16.  
  17. if(SpawnS[playerid] == 1)
  18. {
  19. new rand = random(sizeof(Spawns));
  20. SetPlayerPos(playerid, Spawns[rand][0], Spawns[rand][1], Spawns[rand][2]);
  21. SetPlayerInterior(playerid,0);
  22. SetPlayerVirtualWorld(playerid, 0);
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement