It should be like this. 4 different .rec files on your <Your SA-MP server directory>/npcmodes/recordings/ and 4 different .pwn files like these under.
pawn Код:
#define RECORDING "Soldier1" //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
pawn Код:
#define RECORDING "Soldier2" //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
pawn Код:
#define RECORDING "Soldier3" //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
pawn Код:
#define RECORDING "Soldier4" //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
pawn Код:
public OnGameModeInit()
{
ConnectNPC("Soldier_1","Soldier1");
ConnectNPC("Soldier_2","Soldier2");
ConnectNPC("Soldier_3","Soldier3");
ConnectNPC("Soldier_4","Soldier4");
//More
return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) { //Checks if the player that just spawned is an NPC.
new npcname[MAX_PLAYER_NAME];
//Getting the NPC's name.
GetPlayerName(playerid, npcname, sizeof(npcname));
if(!strcmp(npcname, "Soldier_1", true)) { //Checking if the NPC's name is MyFirstNPC
SetPlayerSkin(playerid, 287);
return 1;
}
if(!strcmp(npcname, "Soldier_2", true)) { //Checking if the NPC's name is MyFirstNPC
SetPlayerSkin(playerid, 287);
return 1;
}
if(!strcmp(npcname, "Soldier_3", true)) { //Checking if the NPC's name is MyFirstNPC
SetPlayerSkin(playerid, 287);
return 1;
}
if(!strcmp(npcname, "Soldier_4", true)) { //Checking if the NPC's name is MyFirstNPC
SetPlayerSkin(playerid, 287);
return 1;
}
return 1;
}
//For normal players goes here!
return 1;
}