07.11.2011, 03:01
I used a key bind for all four.
So they'd all be the same record type.
Anyways,
So they'd all be the same record type.
Anyways,
pawn Code:
#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 Code:
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) return 1;
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, "Soldier_1", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerSkin(playerid, 287);
}
if(!strcmp(npcname, "Soldier_2", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerSkin(playerid, 287);
}
if(!strcmp(npcname, "Soldier_3", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerSkin(playerid, 287);
}
if(!strcmp(npcname, "Soldier_4", true)) //Checking if the NPC's name is MyFirstNPC
{
SetPlayerSkin(playerid, 287);
}
return 1;
}
return 1;
}