PDA

View Full Version : [Npc Mode Scripts] - Some callback's aren't called?


Donya
18/07/2011, 06:24 PM
OnNPCModeInit
OnNPCModeExit
OnNPCConnect
OnNPCDisconnect
OnNPCEnterVehicle
OnNPCExitVehicle
OnClientMessage

aren't called for some reason? there are prints in the callbacks, no prints are called

I load 7 different bots, 6 are the default trains and airplane bots that came with the sa-mp package, and one bot that does nothing. In the default npcmodes, there are prints in each of those callbacks... none seem to be called

also nothing works in Main()

lolumadd_
18/07/2011, 06:43 PM
Yeah I posted this in Scripting Discussion, this really is a major problem

Donya
18/07/2011, 06:44 PM
yep, you reminded me of this. I knew this a long time ago but it seems to be a big problem for scripters now, so it's time to post about it :D

any other callback's that don't work?

lolumadd_
18/07/2011, 06:45 PM
^OnClientMessage

dugi
18/07/2011, 07:07 PM
The print statements will not show up in sa-mp server and server log because they are run in a separate program, you can use DebugView to see those print statements: http://technet.microsoft.com/pl-pl/sysinternals/bb896647

The callbacks are being called in the NPC modes, if they wouldn't, the NPCs included with the server package wouldn't work.

Donya
18/07/2011, 07:10 PM
oh yea.. the sa-mp-npc.exe's

Thanks, someone should put that in the wiki