15.01.2010, 20:51
Hi there, ![Smiley](images/smilies/smile.png)
With a friend of mine we made a nice police car chase record that goes around the town.
I made two simple NPC scripts basing on the well known tutorial on this forum.![Smiley](images/smilies/smile.png)
But sadly those recordings aint perfectly synchronised; one lasts about a second longer than the other one, so if i get them looped each one separately, like
They get desynchronised after few runs.
I was looking for any global/common variable/function scope for those filterscripts, but couldn't find much.
A friend of mine suggested me to use CallRemoteFunction(); stuff which seemed pretty logical solution, so i did it like that:
The chasing NPC has:
and the run-away NPC don't have OnRecordingPlaybackEnd() callback at all, but it has:
The run-away NPC compiles perfectly, but when it comes to the chasing one... it fails.
I just cant call CallRemoteFunction() from inside an NPC script.
I keep getting the standard error 017: undefined symbol "CallRemoteFunction" if my includes go that way:
Wheter i try to reverse the order and include a_samp before a_npc, i get hell load of NPC callback related errors, like the a_npc was never included at all.
Any clues on that will be really appreciated
![Smiley](images/smilies/smile.png)
With a friend of mine we made a nice police car chase record that goes around the town.
I made two simple NPC scripts basing on the well known tutorial on this forum.
![Smiley](images/smilies/smile.png)
But sadly those recordings aint perfectly synchronised; one lasts about a second longer than the other one, so if i get them looped each one separately, like
Код:
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
I was looking for any global/common variable/function scope for those filterscripts, but couldn't find much.
A friend of mine suggested me to use CallRemoteFunction(); stuff which seemed pretty logical solution, so i did it like that:
The chasing NPC has:
Код:
public OnRecordingPlaybackEnd() { CallRemoteFunction("NPC_RunAway"); StartRecordingPlayback(RECORDING_TYPE, RECORDING); }
Код:
forward NPC_RunAway(); public NPC_RunAway() { StartRecordingPlayback(RECORDING_TYPE, RECORDING); }
I just cant call CallRemoteFunction() from inside an NPC script.
I keep getting the standard error 017: undefined symbol "CallRemoteFunction" if my includes go that way:
Код:
#include <a_npc> #include <a_samp>
Any clues on that will be really appreciated
![Smiley](images/smilies/smile.png)