12.08.2018, 16:44
I hope I will help you by that example code:
I will be grateful if you + my reputation (in case if I helped you..)
PHP код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfActor(playerid, actorid))
SendClientMessage(playerid, -1, "You are near actor");
return 1;
}
stock IsPlayerInRangeOfActor(playerid, actorid, Float:radius = 5.0)
{
new
Float:x,
Float:y,
Float:z;
GetActorPos(actorid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, radius, x, y, z) && GetPlayerVirtualWorld(playerid) == GetActorVirtualWorld(actorid))
return 1;
return 0;
}
