NPC Problem
#1

Код:
Something strange is happening to my server, every time I connect NPC server make connection and after few seconds, npc just disconnect from server.
Reply
#2

Do you have a registration/login system that might be preventing your NPC from spawning? If so, make sure you use the function "IsPlayerNPC(playerid)" to bypass these kind of systems, and allow the NPC to spawn without having to login etc.
Reply
#3

I know that:

pawn Код:
public OnPlayerConnect(playerid)
{
    if(IsPlayerNPC(playerid)) return true;
    pLogged[playerid] = false;
    RemoveBuildings(playerid);
    return 1;
}
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) return true;.....


public OnPlayerRequestSpawn(playerid)
{
    if(IsPlayerNPC(playerid)){
        pLogged[playerid] = true;
        return true;
    }
    if(!pLogged[playerid]) return ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login Dialog", "You must login first!\n Type password bellow to login!", "Login", "Close");
    return 1;
}
Reply
#4

The npcs need a valid npc script in the npcmodes diretory, that uses a valid recording file. Else the npcs disconnect because of inactivity.
Take a look at RNPC for a file-free (but yet buggy) alternative.
Reply
#5

I am using RNPC and it is not file free, it uses RNPC file from npcmodes....
Reply
#6

Solved!
Reply
#7

Okay good to know. What was the problem? I know that problem with rnpc, but not sure waht caused it right now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)