SA-MP Forums Archive
NPC - 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: NPC (/showthread.php?tid=449789)



NPC - nor15 - 10.07.2013

I connected my NPC , but the problem is thet it doesn't do what in OnPlayerSpawn

PHP код:
if(IsPlayerNPC(playerid))
    {
        if(
strcmp(PlayerName(playerid), "BodyGuard") == 0)
        {
            
IsSpawned[playerid] =1;
            
SetPlayerSkin(playerid,163);
            
SetPlayerColor(playerid,COLOR_PINK);
            
SetPlayerPos(playerid1248.5563,-765.9691,92.2022);
            
ApplyAnimation(playerid"OTB""wtchrace_loop"4.1,1,0,0,1,1); // Crossed arms
            
print("[NPC SPAWN] BodyGuard 1 has beed spawned.");
        }
        return 
1;
    } 
I found it spawned at SFPD


Re: NPC - nor15 - 10.07.2013

anyone please ?!


Re: NPC - nor15 - 10.07.2013

anyone ?!


Re: NPC - Red_Dragon. - 11.07.2013

Do you mean it doesn't spawn at the place you desired? Check your coordinates again.


Re: NPC - nor15 - 11.07.2013

I checked and changed them to the right places , but it spawn in SFPD and then after some hours it leaves