[Tutorial] Creating a new NPC

I got a lot of errors...

I'm did it on a FilterScript

PHP Code:
#define RECORDING "mynpc" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 1 //1 for in vehicle and 2 for on foot.
#include <a_npc>
main(){}
public 
OnRecordingPlaybackEnd() StartRecordingPlayback(RECORDING_TYPERECORDING);
#if RECORDING_TYPE == 1
  
public OnNPCEnterVehicle(vehicleidseatidStartRecordingPlayback(RECORDING_TYPERECORDING);
  public 
OnNPCExitVehicle() StopRecordingPlayback();
#else
  
public OnNPCSpawn() StartRecordingPlayback(RECORDING_TYPERECORDING);
#endif
ConnectNPC("Dave","mynpc");
public 
OnFilterScriptInit()
{
  print(
"my filterscript");
  
ConnectNPC("MyFirstNPC","mynpc");
  return 
1;
}
new 
MyFirstNPCVehicle//Global variable!
public OnFilterScriptInit()
{
  print(
"my filterscript");
  
ConnectNPC("MyFirstNPC","mynpc");
  
MyFirstNPCVehicle CreateVehicle(4000.00.05.00.0335000);
  return 
1;
}
public 
OnPlayerSpawn(playerid)
{
  if(
IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
  
{
    new 
npcname[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnpcnamesizeof(npcname)); //Getting the NPC's name.
    
if(!strcmp(npcname"MyFirstNPC"true)) //Checking if the NPC's name is MyFirstNPC
    
{
      
PutPlayerInVehicle(playeridMyFirstNPCVehicle0); //Putting the NPC into the vehicle we created for it.
    
}
    return 
1;
  }
  
//Other stuff for normal players goes here!
  
return 1;

Errors:

PHP Code:
C:\Users\Bruno\Desktop\Untitled.pwn(18) : error 010invalid function or declaration
C
:\Users\Bruno\Desktop\Untitled.pwn(20) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
C:\Users\Bruno\Desktop\Untitled.pwn(23) : error 004: function "ConnectNPC" is not implemented
C
:\Users\Bruno\Desktop\Untitled.pwn(29) : warning 235: public function lacks forward declaration (symbol "OnFilterScriptInit")
C:\Users\Bruno\Desktop\Untitled.pwn(30) : error 021symbol already defined"OnFilterScriptInit"
C:\Users\Bruno\Desktop\Untitled.pwn(32) : error 004: function "ConnectNPC" is not implemented
C
:\Users\Bruno\Desktop\Untitled.pwn(33) : error 017undefined symbol "CreateVehicle"
C:\Users\Bruno\Desktop\Untitled.pwn(37) : warning 235: public function lacks forward declaration (symbol "OnPlayerSpawn")
C:\Users\Bruno\Desktop\Untitled.pwn(39) : error 017undefined symbol "IsPlayerNPC"
C:\Users\Bruno\Desktop\Untitled.pwn(45) : error 017undefined symbol "PutPlayerInVehicle"
C:\Users\Bruno\Desktop\Untitled.pwn(33) : warning 204symbol is assigned a value that is never used"MyFirstNPCVehicle"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
7 Errors

Reply


Messages In This Thread
Creating a new NPC - by kc - 02.09.2009, 11:10
Re: Tutorial -> Creating a new NPC - by CL15 - 02.09.2009, 11:26
Re: Tutorial -> Creating a new NPC - by Moustafa - 02.09.2009, 11:27
Re: Tutorial -> Creating a new NPC - by [tag]lugia - 02.09.2009, 11:28
Re: Tutorial -> Creating a new NPC - by kc - 02.09.2009, 11:30
Re: Tutorial -> Creating a new NPC - by Shubham - 02.09.2009, 11:51
Re: Tutorial -> Creating a new NPC - by Justsmile - 02.09.2009, 12:08
Re: Tutorial -> Creating a new NPC - by kc - 02.09.2009, 12:15
Re: Tutorial -> Creating a new NPC - by Justsmile - 02.09.2009, 12:18
Re: Tutorial -> Creating a new NPC - by kc - 02.09.2009, 12:30
Re: Tutorial -> Creating a new NPC - by Justsmile - 02.09.2009, 12:36
Re: Tutorial -> Creating a new NPC - by kc - 02.09.2009, 12:39
Re: Tutorial -> Creating a new NPC - by Justsmile - 02.09.2009, 12:49
Re: Tutorial -> Creating a new NPC - by Justsmile - 02.09.2009, 13:11
Re: Tutorial -> Creating a new NPC - by Justsmile - 02.09.2009, 13:23
Re: Tutorial -> Creating a new NPC - by dugi - 02.09.2009, 13:24
Re: Tutorial -> Creating a new NPC - by kc - 02.09.2009, 13:26
Re: Tutorial -> Creating a new NPC - by Justsmile - 02.09.2009, 13:28
Re: Tutorial -> Creating a new NPC - by kc - 04.09.2009, 18:46
Re: Tutorial -> Creating a new NPC - by Cedimedi - 04.09.2009, 18:52
Re: Tutorial -> Creating a new NPC - by ft941 - 04.09.2009, 18:59
Re: Tutorial -> Creating a new NPC - by SFather - 04.09.2009, 19:57
Re: Tutorial -> Creating a new NPC - by kc - 04.09.2009, 20:00
Re: Tutorial -> Creating a new NPC - by eXchainZ-FoReVeR - 04.09.2009, 21:27
Re: Tutorial -> Creating a new NPC - by SFather - 04.09.2009, 22:13
Re: Tutorial -> Creating a new NPC - by CaLaP - 04.09.2009, 22:24
Re: Tutorial -> Creating a new NPC - by Bcklup - 05.09.2009, 03:32
Re: Tutorial -> Creating a new NPC - by JaTochNietDan - 05.09.2009, 03:32
Re: Tutorial -> Creating a new NPC - by Bcklup - 05.09.2009, 03:37
Re: Tutorial -> Creating a new NPC - by Zeex - 05.09.2009, 06:12
Re: Tutorial -> Creating a new NPC - by Bcklup - 05.09.2009, 06:43
Re: Tutorial -> Creating a new NPC - by Cedimedi - 05.09.2009, 07:46
Re: Tutorial -> Creating a new NPC - by ft941 - 05.09.2009, 08:36
Re: Tutorial -> Creating a new NPC - by Whiteagle - 05.09.2009, 08:40
Re: Tutorial -> Creating a new NPC - by Cedimedi - 05.09.2009, 08:53
Re: Tutorial -> Creating a new NPC - by _Ben_[Fux-c.co.il RP] - 05.09.2009, 09:15
Re: Tutorial -> Creating a new NPC - by kc - 05.09.2009, 09:55
Re: Tutorial -> Creating a new NPC - by XxerykxX - 05.09.2009, 11:19
Re: Tutorial -> Creating a new NPC - by Youtube - 29.11.2009, 09:36
Re: Tutorial -> Creating a new NPC - by Rac3r - 30.11.2009, 09:27
Re: Tutorial -> Creating a new NPC - by Youtube - 30.11.2009, 12:53
Re: Tutorial -> Creating a new NPC - by Rac3r - 30.11.2009, 13:26
Re: Tutorial -> Creating a new NPC - by Youtube - 30.11.2009, 13:44
Re: Tutorial -> Creating a new NPC - by Franjdea - 30.11.2009, 16:59
Re: Tutorial -> Creating a new NPC - by DJDhan - 03.12.2009, 18:03
Re: Tutorial -> Creating a new NPC - by Joe Staff - 03.12.2009, 22:13
Re: Tutorial -> Creating a new NPC - by DJDhan - 04.12.2009, 08:44
Re: Tutorial -> Creating a new NPC - by DJDhan - 04.12.2009, 08:47
Re: Tutorial -> Creating a new NPC - by HydraX - 02.01.2010, 03:49
Re: Tutorial -> Creating a new NPC - by DRIFT_HUNTER - 03.01.2010, 14:45
Re: Tutorial -> Creating a new NPC - by FragMonkey - 03.01.2010, 22:20
Re: Tutorial -> Creating a new NPC - by rs2fun111 - 03.01.2010, 23:40
Re: Tutorial -> Creating a new NPC - by Mauri - 05.01.2010, 00:37
Re: Tutorial -> Creating a new NPC - by gozo12 - 09.01.2010, 16:18
Re: Tutorial -> Creating a new NPC - by braduz - 10.01.2010, 16:18
Re: Tutorial -> Creating a new NPC - by Bearfist - 14.01.2010, 20:27
Re: Tutorial -> Creating a new NPC - by braduz - 14.01.2010, 20:29
Re: Tutorial -> Creating a new NPC - by Bearfist - 14.01.2010, 20:52
Re: Tutorial -> Creating a new NPC - by selten98 - 08.07.2010, 08:16
Re: Creating a new NPC - by GangsTa_ - 10.07.2010, 19:10
Re: Creating a new NPC - by samuel_hamza - 14.07.2010, 13:53
Re: Creating a new NPC - by w84m3 - 07.01.2011, 14:29
Re: Creating a new NPC - by Scenario - 07.01.2011, 14:30
Re: Creating a new NPC - by Infamous - 07.01.2011, 14:31
Re: Creating a new NPC - by Dainyzxz - 07.01.2011, 18:40
Re: Creating a new NPC - by n00bSklly - 14.03.2011, 17:35
Respuesta: Creating a new NPC - by Host-samp - 01.04.2011, 20:58
Re: Creating a new NPC - by OBSERVADOR - 03.04.2011, 05:17
Respuesta: Creating a new NPC - by Lunnatiicz - 03.04.2011, 08:35
Re: Creating a new NPC - by aceisnice - 12.04.2011, 06:23
Respuesta: Creating a new NPC - by Alex_Obando - 18.04.2011, 17:35
Re: Creating a new NPC - by Luis- - 07.05.2011, 16:30
Re: Creating a new NPC - by Miguel - 11.05.2011, 00:46
Re: Creating a new NPC - by jonnyboy - 11.05.2011, 05:22
Re: Creating a new NPC - by sansko - 11.05.2011, 05:39
Re: Creating a new NPC - by jonnyboy - 12.05.2011, 05:52
Re: Creating a new NPC - by mu057677 - 12.05.2011, 12:57
Re: Creating a new NPC - by mu057677 - 12.05.2011, 15:43
Re: Creating a new NPC - by jonnyboy - 12.05.2011, 17:00
Re: Creating a new NPC - by mu057677 - 13.05.2011, 03:26
Re: Creating a new NPC - by Beastlynoob - 30.05.2011, 02:13
Re: Creating a new NPC - by buster_ - 30.05.2011, 18:39
Re: Creating a new NPC - by Robert_Crawford - 03.06.2011, 02:52
Re: Creating a new NPC - by abubaker98 - 06.06.2011, 15:44
Re: Creating a new NPC - by Gagi_Corleone - 07.06.2011, 15:06
Re: Creating a new NPC - by L84S - 25.06.2011, 19:44
Re: Creating a new NPC - by Setkus - 15.08.2011, 19:45
Re: Creating a new NPC - by Setkus - 15.08.2011, 20:14
Re: Creating a new NPC - by sansko - 15.08.2011, 20:16
Re: Creating a new NPC - by Setkus - 15.08.2011, 20:17
AW: Creating a new NPC - by FaiSokumati - 16.08.2011, 08:28
Re: Creating a new NPC - by jat1801 - 17.08.2011, 02:06
Re: Creating a new NPC - by Setkus - 17.08.2011, 18:51
Re: Creating a new NPC - by Setkus - 17.08.2011, 18:59
Re: Creating a new NPC - by Macros50 - 23.08.2011, 12:30
Re: Creating a new NPC - by System64 - 23.08.2011, 13:23
Re: Creating a new NPC - by Macros50 - 24.08.2011, 06:24
Re: Creating a new NPC - by sherlock - 30.08.2011, 12:16
Re: Creating a new NPC - by bomm89 - 04.09.2011, 01:48
Re: Creating a new NPC - by whitedragon - 04.09.2011, 10:04
Re: Creating a new NPC - by DeadDon - 06.09.2011, 13:31
Re: Creating a new NPC - by MicroD - 17.09.2011, 17:14
Re: Creating a new NPC - by loganout - 18.09.2011, 15:15
Re: Creating a new NPC - by manchestera - 16.10.2011, 16:00
Re: Creating a new NPC - by whitedragon - 16.10.2011, 16:06
Re: Creating a new NPC - by manchestera - 16.10.2011, 16:22
Re: Creating a new NPC - by Jagofr - 16.10.2011, 18:27
Re: Creating a new NPC - by cowmilker69 - 23.04.2012, 01:55
Re: Creating a new NPC - by stormchaser206 - 04.05.2012, 00:28
Re: Creating a new NPC - by adelechevarria - 04.05.2012, 16:36
Re: Creating a new NPC - by faff - 13.05.2012, 14:16
Re: Creating a new NPC - by stormchaser206 - 14.05.2012, 00:48
Re: Creating a new NPC - by Suraj - 14.05.2012, 01:02
Re: Creating a new NPC - by stormchaser206 - 15.05.2012, 21:23
Re: Creating a new NPC - by maverick378 - 16.05.2012, 14:52
Re: Creating a new NPC - by JEkvall95 - 11.06.2012, 18:06
Re: Creating a new NPC - by JEkvall95 - 13.06.2012, 12:45
Re: Creating a new NPC - by x96664 - 14.11.2012, 14:24
Re: Creating a new NPC - by [KHK]Khalid - 14.11.2012, 15:09
Re: Creating a new NPC - by romka - 06.12.2012, 06:58
Re: Creating a new NPC - by Y_Less - 06.12.2012, 07:05
Re: Creating a new NPC - by Xlithan - 05.01.2013, 18:41
Re: Creating a new NPC - by FalconCRO - 22.02.2013, 19:23
Re: Creating a new NPC - by xX4m4zingXx - 24.02.2013, 20:06
Re: Creating a new NPC - by xX4m4zingXx - 04.04.2013, 18:49
Re: Creating a new NPC - by Craker - 22.04.2013, 12:41
Re: Creating a new NPC - by davve95 - 22.04.2013, 13:25
Re: Creating a new NPC - by ClubU295 - 21.03.2014, 19:53
Re: Creating a new NPC - by iZN - 21.03.2014, 20:17
Re: Creating a new NPC - by GShock - 24.03.2014, 17:18
Re: Creating a new NPC - by DaYviSoN - 17.04.2014, 21:01
Re: Creating a new NPC - by lonalovegood1 - 26.04.2014, 11:38
Re: Creating a new NPC - by satafinix - 01.05.2014, 05:36
Re: Creating a new NPC - by mehdimmz - 25.10.2014, 15:21
Re: Creating a new NPC - by Abagail - 26.10.2014, 00:36
Re: Creating a new NPC - by Pottus - 26.10.2014, 02:06
Re: Creating a new NPC - by Salvator_Salieri - 26.11.2014, 01:19
Re: Creating a new NPC - by Arastair - 27.11.2014, 14:08
Re: Creating a new NPC - by Luis- - 27.11.2014, 14:16
Re: Creating a new NPC - by cyberlord - 10.12.2014, 11:34
Re: Creating a new NPC - by danish007 - 13.12.2014, 16:43
Re: Creating a new NPC - by bogushas - 02.01.2015, 18:31
Re: Creating a new NPC - by Glossy42O - 02.01.2015, 21:30
Re: Creating a new NPC - by Arxalan - 04.01.2015, 14:56
Re: Creating a new NPC - by dan40o - 10.01.2015, 17:05
Re: Creating a new NPC - by Wipe - 10.01.2015, 22:27
How to get unlimited nitrogen - by oppo1234 - 13.01.2015, 08:21
Re: Creating a new NPC - by Devil143 - 06.03.2015, 12:01
Re: Creating a new NPC - by edwardluciano - 15.03.2015, 23:52
Re: Creating a new NPC - by Pearson - 07.06.2015, 17:43
Re: Creating a new NPC - by ammaz - 16.07.2015, 03:17
Re: Creating a new NPC - by MohammedZ - 09.08.2015, 13:46
Re: Creating a new NPC - by Gotham - 08.09.2016, 10:03
Re: Creating a new NPC - by FreAkeD - 08.09.2016, 10:57
need help with the second and therd npc - by yonik1988 - 14.03.2018, 19:47
Re: Creating a new NPC - by yonik1988 - 30.06.2018, 22:57
Re: Creating a new NPC - by yonik1988 - 01.07.2018, 16:04

Forum Jump:


Users browsing this thread: 15 Guest(s)