Check if any player is near NPC in NPC Mode?
#3

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
Reply


Messages In This Thread
Check if any player is near NPC in NPC Mode? - by Programie - 10.03.2010, 18:53
Re: Check if any player is near NPC in NPC Mode? - by kingforyou - 11.03.2010, 21:24
Re : Check if any player is near NPC in NPC Mode? - by timaoux - 28.09.2011, 12:54
Re: Re : Check if any player is near NPC in NPC Mode? - by SuperViper - 28.09.2011, 14:38

Forum Jump:


Users browsing this thread: 1 Guest(s)