[Problem]NPC has left the server
#1



OnGameModeInit
pawn Код:
ConnectNPC("Bolnica_Doktor","Bolnica_Doktor");
ConnectNPC("Bolnicak_Bot","Bolnicak_Bot");
OnPlayerSpawn
pawn Код:
if(IsPlayerNPC(playerid))
    {
        new npc_name[24];
        GetPlayerName(playerid,npc_name,sizeof(npc_name));
        if(!strcmp(npc_name,"Bolnica_Doktor",false))
        {
            SetPlayerSkin(playerid, 70);
            ApplyAnimation(playerid, "PED", "IDLE_CHAT", 1, 0, 0, 0, 0, 1000, 1);
            ApplyAnimation(playerid, "PED", "IDLE_CHAT", 1, 0, 0, 0, 0, 1000, 1);
        }
        if(!strcmp(npc_name,"Bolnicak_Bot",false))
        {
            SetPlayerSkin(playerid, 146);
            ApplyAnimation(playerid,"CRACK","crckdeth2",4.1,1,1,1,1,1,1);
            ApplyAnimation(playerid,"CRACK","crckdeth2",4.1,1,1,1,1,1,1);
        }
        return 1;
    }
Reply
#2

NOTE: If you are using a login system, make sure you are allowing the NPC through it.

pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid)) return 1;
    //rest of onplayerconnect here
    return 1;
}
Reply
#3

doesn't work, the same, npc has left.....
Reply
#4

bump, please, i need this...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)