16.05.2012, 07:16
Not sure if is working,not tested but try it.
Put it to OnPlayerDisconect so will be called just if the npc leaves the game.
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
}
}