4th NPC Leaves.
#10

I used a key bind for all four.
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;
}
Reply


Messages In This Thread
4th NPC Leaves. - by Lynn - 06.11.2011, 21:15
Re: 4th NPC Leaves. - by MP2 - 06.11.2011, 22:18
Re: 4th NPC Leaves. - by Lynn - 07.11.2011, 01:31
Re: 4th NPC Leaves. - by RadioRocker - 07.11.2011, 01:38
Re: 4th NPC Leaves. - by MP2 - 07.11.2011, 02:40
Re: 4th NPC Leaves. - by Lynn - 07.11.2011, 02:48
Re: 4th NPC Leaves. - by MP2 - 07.11.2011, 02:54
Re: 4th NPC Leaves. - by Lynn - 07.11.2011, 02:56
Re: 4th NPC Leaves. - by MP2 - 07.11.2011, 02:58
Re: 4th NPC Leaves. - by Lynn - 07.11.2011, 03:01
Re: 4th NPC Leaves. - by RadioRocker - 07.11.2011, 03:05
Re: 4th NPC Leaves. - by MP2 - 07.11.2011, 03:06
Re: 4th NPC Leaves. - by Lynn - 07.11.2011, 03:09
Re: 4th NPC Leaves. - by MP2 - 07.11.2011, 03:13
Re: 4th NPC Leaves. - by Lynn - 07.11.2011, 03:18
Re: 4th NPC Leaves. - by MP2 - 07.11.2011, 08:51
Re: 4th NPC Leaves. - by Kostas' - 07.11.2011, 10:46
Re: 4th NPC Leaves. - by Lynn - 07.11.2011, 11:17
Re: 4th NPC Leaves. - by Kostas' - 07.11.2011, 11:23
Re: 4th NPC Leaves. - by Lynn - 07.11.2011, 19:12

Forum Jump:


Users browsing this thread: 1 Guest(s)