#1

I download this https://sampforum.blast.hk/showthread.php?tid=412666 , the NPC join but it leave again

OnPlayerSpawn
PHP код:
if(IsPlayerRNPC(playerid))
    {
        if(
strcmp(PlayerName(playerid), "BodyGuard") == 0)
        {
            
SetRNPCPos(playerid1241.5619,-766.9536,92.1005);
            
ApplyAnimation(playerid,"PAULNMAC""wank_loop"1.8000011001600);
            
IsSpawned[playerid] =1;
            
SetPlayerSkin(playerid,163);
            
SetPlayerColor(playerid,COLOR_PINK);
            print(
"[NPC SPAWN] BodyGuard 1 has beed spawned.");
        }
        return 
1;
    } 
server logs

PHP код:
[07:38:35]  ARNPC DebugOnPlayerDisconnect hook called for NPC
[07:38:35] [npc:partBodyGuard has left the server (1:0
Reply
#2

Always allow NPCs to spawn without any conflicts such as locking spawn request at OnPlayerRequestSpawn, showing dialogs for example account systems do, and etc.
Reply
#3

As you see the OnPlayerSpawn is fine

OnPlayerConnect , OnPlayerRequestSpawn , OnPlayerRequestClass , I added under every one of them this >>
PHP код:
if(IsPlayerRNPC(playerid)) return 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)