SA-MP Forums Archive
Massive teleporting - 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)
+--- Thread: Massive teleporting (/showthread.php?tid=388963)



Massive teleporting - jap_D-Jap - 31.10.2012

Hey guys, How to make a command, when player writes this command he and all who is near he will be teleported somewhere? Please help me, cus I don't know how to make it


Re: Massive teleporting - RajatPawar - 31.10.2012

I think a combination of IsPlayerInRangeOf and SetPlayerPos will do the trick.


Re: Massive teleporting - PrawkC - 31.10.2012

This is how I'd do it.
pawn Код:
CMD:radiustele(playerid, params[])
{
    new Float:radius = 10.0, Float:pos[3];
    GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
   
    foreach(Players, p)
    {
        if(IsPlayerInRangeOfPoint(p, radius, pos[0], pos[1], pos[2]))
        {
            SetPlayerPos(p, 0, 0, 0); // Location
        }
    }
    return 1;
}