SA-MP Forums Archive
Teleport - 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: Teleport (/showthread.php?tid=171651)



Teleport - Libra_PL - 27.08.2010

Well, I need a script, when I teleport, I randomly teleport to one of 5 locations...

Lib


Re: Teleport - Jeffry - 27.08.2010

pawn Код:
if (strcmp("/teleport", cmdtext, true) == 0)
{
    new tmp; tmp=random(5);
    switch(tmp)
    {
        case 0: { SetPlayerPos(playerid, 0,0,0); SetPlayerFacingAngle(playerid, 0); }   //Just change the coords.
        case 1: { SetPlayerPos(playerid, 5,5,5); SetPlayerFacingAngle(playerid, 2); }
        case 2: { SetPlayerPos(playerid, 7,2,3); SetPlayerFacingAngle(playerid, 11); }
        case 3: { SetPlayerPos(playerid, 99.9,2,2); SetPlayerFacingAngle(playerid, 999); }
        case 4: { SetPlayerPos(playerid, 11,11,1); SetPlayerFacingAngle(playerid, 11); }
    }
    //Anything else what you want here. A message or something. Dunno^^
    return 1;
}
I hope this helps you.


Re: Teleport - Libra_PL - 27.08.2010

Awww, thanks


Re: Teleport - Jeffry - 27.08.2010

Quote:
Originally Posted by Libra_PL
Посмотреть сообщение
Awww, thanks
Have fun.
Thanks for the feedback.


Re: Teleport - FireCat - 27.08.2010

libra arnt you from awesome stuntages? im [AS]firecat