SA-MP Forums Archive
NPC problem... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NPC problem... (/showthread.php?tid=212254)



NPC problem... - MrIncredible - 16.01.2011

Ok, i made an NPC now when it spawns it picks the first team which is found at "OnPlayerRequestClass", now as made a team balancer, that will mess things up, now how to not let the npc go through requestplayerclass, and spawn directly as it connects?


Re: NPC problem... - Krx17 - 16.01.2011

Check if the playerid is a NPC in OnPlayerRequestClass and return 1.


Respuesta: NPC problem... - [M]xFire - 16.01.2011

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    if(IsPlayerNPC(playerid))
    {
        return 1;
    }
    else {
        //code
    }
    return 1;
}