SA-MP Forums Archive
Help me pls xD - 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: Help me pls xD (/showthread.php?tid=343053)



Help me pls xD - miley1 - 16.05.2012

How do i make this that poeple can only use it when they are near it

PHP код:
{
    if (
strcmp("/teleportme"cmdtexttrue10) == 0)
    {
        
SetPlayerPos(playerid396.7123,-3308.4155,7);
        return 
1;
    }
    return 
0;




Re: Help me pls xD - ViniBorn - 16.05.2012

Use IsPlayerInRangeOfPoint

pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, 2.0, 396.7123,-3308.4155,7.0))
    return SendClientMessage(playerid, -1, "You aren't near the teleport.");