#define RECORDING "ambulance" //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
#include <a_samp>
#include <core>
new AmbulanceDrivercar;
main()
{
}
public OnGameModeInit()
{
ConnectNPC ("Soap","ambulance3");
AmbulanceDrivercar = AddStaticVehicle(416,2016.3534,1257.9493,10.8825,0.0613,1,3); //
return 1;
}
public OnGameModeExit()
{
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, "Soap", true)) //Checking if the NPC's name is MyFirstNPC
{
PutPlayerInVehicle(playerid, AmbulanceDrivercar, 0); //Putting the NPC into the vehicle we created for it.
return 1;
}
}
return 1;
}
ConnectNPC("Soap", "ambulance");
Originally Posted by AK47317
hmm, maybe this help
pawn Код:
|