06.12.2012, 07:05
Did you tell it to move anywhere?
MyFirstNPCVehicle = CreateVehicle(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
what is the number for "colored red" |
I'm new to scripting. Is there a Download Link for this NPC_Record.pwn and .amx file? I got lost and im confused now. If someone could help me out with that. That would be Awesome. I will leave Credit to those who help me with my ingame command /credits
|
#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_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
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(400, 0.0, 0.0, 5.0, 0.0, 3, 3, 5000);
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
new npcname[MAX_PLAYER_NAME];
GetPlayerName(playerid, npcname, sizeof(npcname)); //Getting the NPC's name.
if(!strcmp(npcname, "MyFirstNPC", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, MyFirstNPCVehicle, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
//Other stuff for normal players goes here!
return 1;
}
C:\Users\Bruno\Desktop\Untitled.pwn(18) : error 010: invalid 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 021: symbol 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 017: undefined 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 017: undefined symbol "IsPlayerNPC"
C:\Users\Bruno\Desktop\Untitled.pwn(45) : error 017: undefined symbol "PutPlayerInVehicle"
C:\Users\Bruno\Desktop\Untitled.pwn(33) : warning 204: symbol is assigned a value that is never used: "MyFirstNPCVehicle"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
7 Errors.
C:\Users\Farhad_2\Desktop\Zendegi Majazi Iran\npcmodes\mynpc.pwn(2 : warning 235: public function lacks forward declaration (symbol "OnRecordingPlaybackEnd") C:\Users\Farhad_2\Desktop\Zendegi Majazi Iran\npcmodes\mynpc.pwn(2 : error 017: undefined symbol "StartRecordingPlayback" C:\Users\Farhad_2\Desktop\Zendegi Majazi Iran\npcmodes\mynpc.pwn(34) : warning 235: public function lacks forward declaration (symbol "OnNPCSpawn") C:\Users\Farhad_2\Desktop\Zendegi Majazi Iran\npcmodes\mynpc.pwn(34) : error 017: undefined symbol "StartRecordingPlayback" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
Help me pls
other bots connect to server without problem but this bot that i made with this tutorial has problem i can't fix it [08:14:01] [npc:join] Maryam_Driverr has joined the server (5:127.0.0.1) [08:14:16] [npcart] Maryam_Driverr has left the server (5:0) heeeeeeeelp pls |