SA-MP Forums Archive
NPC's not calling OnPlayerSpawn on one server - 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's not calling OnPlayerSpawn on one server (/showthread.php?tid=284280)



NPC's not calling OnPlayerSpawn on one server - Redgie - 18.09.2011

I have an identical script running on two servers, on one each NPC spawns and is placed into the relevant vehicle with the relevant skin. On the other server, until today, it did the same. But now they simply spawn at 0.0,0.0,0.0 with the CJ skin and do nothing.

Now to give you an idea of how I know they aren't calling OnPlayerSpawn, I added this:
Код:
public OnPlayerSpawn(playerid)
{
    if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
    {
        printf("NPC Spawning");
(Amongst other code, but this is at the very start of OnPlayerSpawn)
This produces the following on one server:
Quote:

[16:17:52] NPC Spawning
[16:17:52] NPC Spawning
[16:17:52] NPC Spawning
[16:17:52] NPC Spawning
[16:17:52] NPC Spawning
[16:17:52] NPC Spawning

But nothing on the other. Both servers are high end dedicated servers running CentOS. Plus as I say, the server with the issue worked perfectly till today, and I have changed absolutely nothing

Any idea what could be causing this?

I find it hard to believe that it could be script related because both scripts are identical, and because I have changed nothing in the last few days.

I also don't think it's any files under npcmodes, because I uploaded the files from the broken server to the working server and it still worked.


Re: NPC's not calling OnPlayerSpawn on one server - Redgie - 19.09.2011

Was caused by the CrashDetect plugin loading incorrectly (Incompatible with my glib), which is odd as the plugin fails to load on both servers but only affects the NPC's on this one.

Please lock / delete.


Re: NPC's not calling OnPlayerSpawn on one server - Tigerkiller - 19.09.2011

if you use a register/login system then spawn them on connect


Re: NPC's not calling OnPlayerSpawn on one server - =WoR=Varth - 19.09.2011

Quote:
Originally Posted by Redgie
Посмотреть сообщение
Was caused by the CrashDetect plugin loading incorrectly (Incompatible with my glib), which is odd as the plugin fails to load on both servers but only affects the NPC's on this one.

Please lock / delete.
Quote:
Originally Posted by Tigerkiller
Посмотреть сообщение
if you use a register/login system then spawn them on connect
Read before posting.