04.05.2011, 12:42
I have done all these steps
http://forum.sa-mp.com/showthread.ph...light=npc+bots
Make a vehicle path but with errors
/imageshack/img151/1...0114190355.jpg
I use Raven roleplay.
this is my code
mini script
gamemode
Sorry my bad English
http://forum.sa-mp.com/showthread.ph...light=npc+bots
Make a vehicle path but with errors
/imageshack/img151/1...0114190355.jpg
I use Raven roleplay.
this is my code
mini script
pawn Код:
#define RECORDING "cop1" //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
pawn Код:
new MyFirstNPCVehicle; //Global variable!
public OnGameModeInit()
{
print("roleplay");
ConnectNPC("COP","cop1");
MyFirstNPCVehicle = AddStaticVehicle(599,1527.5483,-1633.9626,13.5767,177.5422,0,1);
return 1;
}
pawn Код:
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, "COP", 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;
}
Sorry my bad English