npc log
#1

Any suggestions how to log npc bot? It disconnects after ~4-10hours after server start. It doesn't disconnect if there's no players in server.. Can't find solution for years...
Reply
#2

You can use IsPlayerNPC.

Put some debug for NPCs in callbacks.

Here's a piece of code that will tell you the reason of the NPC disconnect:
pawn Код:
public OnPlayerDisconnect(playerid, reason) {
    if(IsPlayerNPC(playerid)) printf("NPC %i disconnected (reason: %i).", playerid, reason);
    // proceed with normal code
    return 1;
}
If the reason is kick/ban, check your "Kick" and "Ban(Ex)" codes.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)