#include <a_samp> #include <a_npc> new npccoche; public OnGameModeInit() { ConnectNPC("Javier_Bardem","bus1"); //en "NOMBRE_APELLIDO" pongan el nombre que quieren para su grabacion. en "NOMBRE" pongan el nombre de su .rec return 1; } public OnPlayerConnect(playerid) { npccoche = AddStaticVehicle(437,1671.1302,-2250.7085,13.5110,90.8361,87,7); // if(IsPlayerNPC(playerid)) { new nombrejugador[24]; GetPlayerName(playerid,nombrejugador,24); if(!strcmp(nombrejugador,"Javier_Bardem",true)) //cambien "Nombre_Apellido" por el nombre de su BOT { SpawnPlayer(playerid); return 1; } } return 0; } public OnPlayerSpawn(playerid) { if(IsPlayerNPC(playerid)) { new nombre[30]; GetPlayerName(playerid, nombre, sizeof(nombre)); if(!strcmp(nombre, "Javier_Bardem", true)) { PutPlayerInVehicle(playerid, npccoche, 0); //aqui ponemos el npc en el coche en el asiento 0 q es el de conductor return 1; } ShowPlayerMarkers(0); //para que no muestre la posicion del npc en el radar, 1 para que se muestre 0 para que no return 1; //aqui tenemos que poner el return para que no se cumpla lo de abajo y asi el npc spawnee bien } } |
#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; } |
#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 |