Problem with NPC script. Having some errors.
#1

Today I tried to add some NPC-s.

If I add that code with filterscript, bot wont join.

Код:
public OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPE, RECORDING);

#if RECORDING_TYPE == 1
  public OnNPCEnterVehicle(vehicleid, seatid) StartRecordingPlayback(RECORDING_TYPE, RECORDING);
  public OnNPCExitVehicle() StopRecordingPlayback();
#else
  public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPE, RECORDING);
#endif
Seperately this code gets no errors but if i use it in my GM then those errors are coming up:

Errors
Код:
C:\Users\Kodu\Desktop\sa-mp\gamemodes\beta01.pwn(23) : warning 235: public function lacks forward declaration (symbol "OnRecordingPlaybackEnd")
C:\Users\Kodu\Desktop\sa-mp\gamemodes\beta01.pwn(23) : error 017: undefined symbol "StartRecordingPlayback"
C:\Users\Kodu\Desktop\sa-mp\gamemodes\beta01.pwn(26) : warning 235: public function lacks forward declaration (symbol "OnNPCEnterVehicle")
C:\Users\Kodu\Desktop\sa-mp\gamemodes\beta01.pwn(26) : error 017: undefined symbol "StartRecordingPlayback"
C:\Users\Kodu\Desktop\sa-mp\gamemodes\beta01.pwn(27) : warning 235: public function lacks forward declaration (symbol "OnNPCExitVehicle")
C:\Users\Kodu\Desktop\sa-mp\gamemodes\beta01.pwn(27) : error 017: undefined symbol "StopRecordingPlayback"
Reply
#2

Quote:
Originally Posted by wiilweer
Seperately this code gets no errors but if i use it in my GM then those errors are coming up:
These functions/callbacks can only be used in the NPC scripts.
Reply
#3

SO I create totally new pawn file and put these call backs/functions there?And why does not my NPC join ?
Reply
#4

Read this topic and you'll know all the basic things about NPCs.
Reply
#5

Now i read twice and i got it working. Now they are just standing at spawnpoints :S. NPC-s are ONFOOT. I think it something up to this:

Код:
SetGameModeText("TestServer");
	ConnectNPC("Aljosha", "npc");
	ConnectNPC("Nikolai", "kondiv");
	AddPlayerClass(1, 1726.2003,-1642.1716,20.2251,171.9491, 0, 0, 0, 0, 0, 0);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)