NPC Keeps leaving
#1

I made NPC, it keeps leaving every-time i turn the server on. I have login/register dialog type system. Is this affecting the npc if so how can i solve this problem
Reply
#2

pawn Код:
if(IsPlayerNpc(playerid))return 0;
At the top of all the callbacks which could be effecting it.
Reply
#3

'Bump' It couldn't help any ideas it keeps leaving the server
Reply
#4

pawn Код:
public OnPlayerConnect(..)
{
    if(IsPlayerNPC(playerid)) return 1;

    // Rest of code..
    return 1;
}
Reply
#5

pawn Код:
public OnPlayerConnect(..)
{
    if(IsPlayerNPC(playerid))
    {
           SpawnPlayer(playerid)
           return 1;
    }
     return 1;
}
Also set your server.cfg max_npcs to 1 or w/e.
Reply
#6

It worked guys thanks alot luv ya
Reply
#7

Do you have any idea why an yellow dot is appearing on my minimap of that NPC , how can i remove it that npc is appearing as yellow beacon or marker on the map
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)