28.09.2011, 12:54
pawn Код:
public onplayerupdate(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerNPC(i)
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X, Y, Z);
if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
{
//Your function here when a player is near a npc
}
}
}
}
return 1;
}
sorry for report this topic