SA-MP Forums Archive
1 more help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: 1 more help (/showthread.php?tid=247437)



1 more help - Cenation - 09.04.2011

How can i create Random spawn on 1 player like 1st is Medic he will spawn in random places and 2nd Medic will spawn in other places...?


Re: 1 more help - Shelby - 09.04.2011

pawn Код:
//top of mode
new Float:MedicSpawns[4][3] = {
{COORDX,COORDY,COORDZ},
{COORDX,COORDY,COORDZ},
{COORDX,COORDY,COORDZ},
{COORDX,COORDY,COORDZ}
};

//in onplayerspawn
new rand;
rand = random(sizeof(MedicSpawns));
SetPlayerPos(playerid, MedicSpawns[rand][0], MedicSpawns[rand][1], MedicSpawns[rand][2]);