13.05.2015, 01:24
pawn Код:
#define RECORDING "tramnpc" //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
The recording filename is called 'tramnpc'
The file above is called record, Yes I compiled it.
pawn Код:
//ONGAMEMODEINIT
ConnectNPC("Reacher","record");
tramid = CreateVehicle(449, -1583.0962,1063.5284,7.0468, 0, 3, 3, 0,0);
pawn Код:
if(IsPlayerNPC(playerid)) //Checks if the player that just spawned is an NPC.
{
PutPlayerInVehicle(playerid, tramid, 0); //Putting the NPC into the vehicle we created for it.
}
I can slap the NPC, can't TP it and he won't drive the vehicle, have I missed anything?