26.09.2009, 11:08
This has been bugging me for the past 2 days, so here comes the "ask-on-the-SA:MP-forum" time again ...
Is it possible to control NPCs through a gamemode or a filterscript. I can't use Stop/Start/Pause/ResumeRecordingPlayback, because they only work in the NPCs' script.
I have tried with a timer in the NPC script, which checks if a variable is set to a value, and then plays the playback, and I DID set the value to that amount in the gamemode, and then I tried with an include, which I have included in both, gamemode and the NPC script.
Both gave the same result; nothing happened.
I have put debug messages on the beggining and the end to test if the script gets called or if it freezes. None of them got called.
So my guess is that variables and includes don't work, any ideas how I could get this to work?
Is it possible to control NPCs through a gamemode or a filterscript. I can't use Stop/Start/Pause/ResumeRecordingPlayback, because they only work in the NPCs' script.
I have tried with a timer in the NPC script, which checks if a variable is set to a value, and then plays the playback, and I DID set the value to that amount in the gamemode, and then I tried with an include, which I have included in both, gamemode and the NPC script.
Both gave the same result; nothing happened.
I have put debug messages on the beggining and the end to test if the script gets called or if it freezes. None of them got called.
So my guess is that variables and includes don't work, any ideas how I could get this to work?