need help with NPC creating
#1

so I have problem with creating NPC it is this: NPC connect then it will stay in spawn point and doesn't spawn in vehicle what I created ;o

I have that patch....
#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


..in NPCModes
and in filterscripts this one:

#include <a_samp>
#include <a_npc>

new MyFirstNPCVehicle; //Global variable!
public OnFilterScriptInit()
{
ConnectNPC("MyFirstNPC","mynpc");
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
MyFirstNPCVehicle = AddStaticVehicle(520,-2038.8418,145.7136,33.9382, 0, 0, 0);
return 1;
}

public OnFilterScriptExit()
{
return 1;
}



main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}



public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
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;
}

someone help me plz : (
Reply


Messages In This Thread
need help with NPC creating - by the_zande - 09.07.2010, 19:16
Re: need help with NPC creating - by the_zande - 09.07.2010, 23:31
Re: need help with NPC creating - by selten98 - 09.07.2010, 23:44

Forum Jump:


Users browsing this thread: 1 Guest(s)