Problema con NPC
#6

El NPC no respawnea en el auto, lo hace feura y la grabacion esta bien colocada y esto creo que tambien.


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

And the .rec is on npcmodes/recordings/police.rec
Reply


Messages In This Thread
Problema con NPC - by Magnetto - 03.08.2011, 23:37
Re: Problema con NPC - by [G]host - 04.08.2011, 00:10
Respuesta: Problema con NPC - by Magnetto - 04.08.2011, 00:47
Re: Problema con NPC - by [G]host - 04.08.2011, 01:28
Respuesta: Problema con NPC - by Magnetto - 04.08.2011, 14:08
Respuesta: Problema con NPC - by Magnetto - 04.08.2011, 15:27
Respuesta: Problema con NPC - by VetoBarrera - 04.08.2011, 17:53
Respuesta: Problema con NPC - by TiNcH010 - 04.08.2011, 21:54

Forum Jump:


Users browsing this thread: 4 Guest(s)