Posts: 1,276
Threads: 6
Joined: Aug 2014
Do a loop.
Get your own position.
Check if people in the loop is within the distance.
Slap them.
Posts: 1,276
Threads: 6
Joined: Aug 2014
PHP код:
CMD:NSlap(playerid, params[])
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
{
if(IsPlayerInRangeOfPoint(i, 5.0, x, y, z))
{
SetPlayerPos(i, x, y, z+3);
SendClientMessage(i, 0xFF000FF, "!Tested!");
}
}
}
return 1;
}
Posts: 43
Threads: 16
Joined: Nov 2015
Reputation:
0
It slaps me instead of others, Anything wrong?