NPC Help
#1

Delete
Reply
#2

(With ZCMD)
pawn Код:
CMD:test(playerid,params[])
    {
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(npcid,X,Y,Z);
    if(IsPlayerInRangeOfPoint(playerid,5.0,X,Y,Z))
        {
        // The player is near the specified NPC, do your stuff here.
        }
    return 1;
    }
Of course range can be whatever you want it to be, I just set it to 5.0 here for the example.
Needless to say you need to know the player id of the NPC, denoted as 'npcid' in the example above.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)