SA-MP Forums Archive
Little help needed - 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: Little help needed (/showthread.php?tid=339950)



Little help needed - Kukkurloom - 05.05.2012

How to make 1 CMD does multiple entrances.

PHP код:
CMD:enter(playerid ,params[])
{
     
SetPlayerPos(X,Y,Z);
     Return 
1;

And now if I want to make CMD:enter with different positions it says its already defined.


Re: Little help needed - ReneG - 05.05.2012

Use IsPlayerInRangeOfPoint.


pawn Код:
CMD:enter(playerid, params[])
{
    if(IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
    {
        SetPlayerPos(playerid, x, y, z);
        return 1;
    }
    if(IsPlayerInRangeOfPoint(playerid, 2.0, x, y, z))
    {
        SetPlayerPos(playerid, x, y, z);
        return 1;
    }
    // as many as you need here
    return 1;
}



Re: Little help needed - Kukkurloom - 05.05.2012

Thanks!
Ill test it out later, and if it works ill +rep you!