SA-MP Forums Archive
Npc on TAB. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Npc on TAB. (/showthread.php?tid=389205)



Npc on TAB. - Bug. - 01.11.2012

hey, how to create a npc on tab to see his name. No walk and drive, i need just see his name


Re: Npc on TAB. - Luis- - 01.11.2012

It isn't possible.


Re: Npc on TAB. - iggy1 - 01.11.2012

You can't do it, that's called faking players and is not allowed.

EDIT: Bit too slow


Re: Npc on TAB. - Bug. - 01.11.2012

how to create a simple walk npc?!


Re: Npc on TAB. - Dusan01 - 01.11.2012

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;



Re: Npc on TAB. - Bug. - 01.11.2012

-DELETED-


Re: Npc on TAB. - ikkentim - 01.11.2012

What line is line 555?


Re: Npc on TAB. - Bug. - 01.11.2012

Quote:
Originally Posted by ikkentim
Посмотреть сообщение
What line is line 555?
Код:
	return 1;