PlayerToPoint - 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: PlayerToPoint (
/showthread.php?tid=89509)
PlayerToPoint -
klavins - 02.08.2009
how can I use this so something happends to everybody in 20.0 radius when I type the command? I think it should be something like this, but how can I make that it will happen to everybody in that radius?
Код:
if (PlayerToPoint(20.0, playerid, -1833.1802,-65.2277,15.1094))
{
SetPlayerPos(playerid, x,y,z);
}
Re: PlayerToPoint -
James_Alex - 02.08.2009
juste try this
pawn Код:
// put this in OnGameModeInit
SetTimer("ChangePos, 100, true);
forward ChangePos();
public ChangePos()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i)
{
if (PlayerToPoint(20.0, i, -1833.1802,-65.2277,15.1094))
{
SetPlayerPos(playerid, x,y,z);
}
}
}
}
Re: PlayerToPoint -
klavins - 02.08.2009
tested it and it worked, thanx