ARNPC - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: ARNPC (
/showthread.php?tid=449777)
ARNPC -
nor15 - 10.07.2013
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(playerid, 1241.5619,-766.9536,92.1005);
ApplyAnimation(playerid,"PAULNMAC", "wank_loop", 1.800001, 1, 0, 0, 1, 600);
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 Debug: OnPlayerDisconnect hook called for NPC
[07:38:35] [npc:part] BodyGuard has left the server (1:0)
AW: ARNPC -
BigETI - 10.07.2013
Always allow NPCs to spawn without any conflicts such as locking spawn request at OnPlayerRequestSpawn, showing dialogs for example account systems do, and etc.
Re: ARNPC -
nor15 - 10.07.2013
As you see the OnPlayerSpawn is fine
OnPlayerConnect , OnPlayerRequestSpawn , OnPlayerRequestClass , I added under every one of them this >>
PHP код:
if(IsPlayerRNPC(playerid)) return 1;