Npc on TAB.
#5

1 Step:

first download: http://www.solidfiles.com/d/82700/

2 step:

-Start server and enter.
-Login with rcon
-And type /rcon loadfs npc_record

/ofrecord [name]
-Ohis is when NPC walking
/onrecord [name]
-When NPC in veh
/stoprecord
-Stoping record

3 Step:

-When u recorded NPC go to "scriptfiles" and here is ur recorded file recordname.rec
-Copy that and paste to npcmodes/recordings/
-Now we will create FS for NPC
-Open pawno and go new,and delete all
-And add this if is walking record
Код:
#define RECORDING "NPC1"
#define RECORDING_TYPE 2

#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
Compile and save to "npcmodes" folder.

4i Step:

-Now adding in GM
-Open ur GM
-CTRL+F and find "public OnPlayerSpawn"
-Afther that add this:
Код:
if(IsPlayerNPC(playerid))//Checkinh is a NPC
     {
          new npc_name[24];
          GetPlayerName(playerid,npc_name,sizeof(npc_name));
          if(!strcmp(npc_name,"NPC1",false))
          {
               SetPlayerSkin(playerid,268);//set bot skin
               NPC1 = Create3DTextLabel("NPC_BOT",0x008080FF,30.0,40.0,50.0,40.0,0);//Here cords and name
               Attach3DTextLabelToPlayer(NPC1, playerid, 0.0, 0.0, 0.0);//Attach 3D text to npc
		  }
return 1;
}
-Now press CTRL+F and type "public OnGameModeInit"
-Afther that add this:

Код:
ConnectNPC("NPC1","NPC1");//
and Define this at top on GM:
Код:
new Text3D:NPC1;
Reply


Messages In This Thread
Npc on TAB. - by Bug. - 01.11.2012, 06:39
Re: Npc on TAB. - by Luis- - 01.11.2012, 06:41
Re: Npc on TAB. - by iggy1 - 01.11.2012, 06:41
Re: Npc on TAB. - by Bug. - 01.11.2012, 07:32
Re: Npc on TAB. - by Dusan01 - 01.11.2012, 07:49
Re: Npc on TAB. - by Bug. - 01.11.2012, 14:11
Re: Npc on TAB. - by ikkentim - 01.11.2012, 14:14
Re: Npc on TAB. - by Bug. - 01.11.2012, 14:15

Forum Jump:


Users browsing this thread: 1 Guest(s)