[help] NPCs interacting; CallRemoteFunction() inside NPC filterscript?
#1

Hi there,

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.

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);
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:
Код:
public OnRecordingPlaybackEnd() {
  CallRemoteFunction("NPC_RunAway");
  StartRecordingPlayback(RECORDING_TYPE, RECORDING);
}
and the run-away NPC don't have OnRecordingPlaybackEnd() callback at all, but it has:
Код:
forward NPC_RunAway();
public NPC_RunAway() {

	StartRecordingPlayback(RECORDING_TYPE, RECORDING);
}
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:
Код:
#include <a_npc>
#include <a_samp>
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
Reply


Messages In This Thread
[help] NPCs interacting; CallRemoteFunction() inside NPC filterscript? - by Kyeno - 15.01.2010, 20:51
Re: [help] NPCs interacting; CallRemoteFunction() inside NPC filterscript? - by Kyeno - 16.01.2010, 01:48
Re: [help] NPCs interacting; CallRemoteFunction() inside NPC filterscript? - by Kyeno - 16.01.2010, 05:09
Re: [help] NPCs interacting; CallRemoteFunction() inside NPC filterscript? - by Kyeno - 16.01.2010, 16:53

Forum Jump:


Users browsing this thread: 2 Guest(s)