NPC Leaves my server
#4

Not sure if is working,not tested but try it.
pawn Code:
if (IsPlayerNPC(playerid))
{
        new npcname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, npcname, sizeof(npcname));
        if(!strcmp(npcname, "Name", true))// Your npc name here
        {
                ConnectNPC("NPC","NPC");//conect the npc founded with "Name"
        }
        if(!strcmp(npcname, "Name2", true))// Your second npc here
        {
        // codes
        }
}
Put it to OnPlayerDisconect so will be called just if the npc leaves the game.
Reply


Messages In This Thread
NPC Leaves my server - by Richie© - 15.05.2012, 22:17
Re: NPC Leaves my server - by kaisersouse - 15.05.2012, 22:19
Re: NPC Leaves my server - by Richie© - 16.05.2012, 07:02
Re: NPC Leaves my server - by TzAkS. - 16.05.2012, 07:16

Forum Jump:


Users browsing this thread: 2 Guest(s)