29.10.2009, 19:10
i want to add bots but how?? (plese help)
new myvehicle;
public OnGamemodeInit();
ConnectNPC("Mynpc","yourrecord");
myvehicle = AddstaticVehicle(431, 1358.1960, 1443.4098, 10.8251, 91.9678);
new myvehicle;
ConnectNPC("Mynpc","yourrecord");
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, "Mynpc", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, myvehicle, 0); //Putting the NPC into the vehicle we created for it.
}
return 1;
}
#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