Thanks for Rolly and ******
But I have a question for that NPC.
I allready read the tutorial and I tried to make a NPC BOT like this in a AMMUNATION, but when I join the BOT isn't there.
I record a file named ammo1, then I put the file in npmodes/recordings
Then I make a new pawno file named ammo1
Here is the codes:
Код:
#define RECORDING "ammo1" //This is the filename of your recording without the extension.
#define RECORDING_TYPE 2 //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 Finally I add this codes in my FS:
Код:
new test;
public OnFilterScriptInit()
{
ConnectNPC("Dave","ammo1");
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid))
{
new NPCName[MAX_PLAYER_NAME];
GetPlayerName(playerid,NPCName,sizeof(NPCName));
if(!strcmp(NPCName,"Dave",true))
{
SetPlayerInterior(playerid,7);
SetPlayerVirtualWorld(playerid,20);
SetPlayerColor(playerid,COLOR_RED);
SetPlayerSkin(playerid,209);
SetPlayerPos(playerid,308.2154,-143.0907,999.6016);
SetPlayerFacingAngle(playerid,359.6698);
test = Create3DTextLabel("Test",COLOR_RED,0.0,0.0,0.0,10.0,20,1);
Attach3DTextLabelToPlayer(test,playerid,0.0,0.0,0.15);
}
return 1;
}
return 1;
}
So what to do ?