SA-MP Forums Archive
A teleport command that can take you to several random co ordinates - 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: A teleport command that can take you to several random co ordinates (/showthread.php?tid=186733)



A teleport command that can take you to several random co ordinates - Garc1a - 30.10.2010

Exactly what the title says, I want to make a teleport command (which I know how to) but it will be taking the player to a DM arena, which I don't want them to spawn in one place, so I want them to spawn in several place in the arena.


Re: A teleport command that can take you to several random co ordinates - Mike_Peterson - 30.10.2010

I made that... use randomspawns. theres an tutorial out there


Re: A teleport command that can take you to several random co ordinates - TouR - 30.10.2010

First of all take the coordinates of the random spawns
then you can work with cases like

Код:
new locations = random(10);

switch(locations)
{
    case 1: { SetPlayerPos(playerid, firstx , firsty, firstz ); }
    case 2: { SetPlayerPos(playerid, Secondx, Secondy, Secondz);
    case 3: ..........
    ......
   ......
}