04.08.2011, 15:27
El NPC no respawnea en el auto, lo hace feura y la grabacion esta bien colocada y esto creo que tambien.
And the .rec is on npcmodes/recordings/police.rec
Quote:
#include <a_samp> #include <a_npc> new MyFirstNPCVehicle; //Global variable! public OnFilterScriptInit() { print("my filterscript"); ConnectNPC("Police_Police","police"); MyFirstNPCVehicle = CreateVehicle(427,1571.0707,-1615.4928,13.5205,268.8420,0,1); // posicion); 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, "Police_Police", 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; } |
Quote:
#define RECORDING "police" //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 |