PDA

View Full Version : Npc on TAB.


Bug.
01/11/2012, 06:39 AM
hey, how to create a npc on tab to see his name. No walk and drive, i need just see his name

Luis-
01/11/2012, 06:41 AM
It isn't possible.

iggy1
01/11/2012, 06:41 AM
You can't do it, that's called faking players and is not allowed.

EDIT: Bit too slow :(

Bug.
01/11/2012, 07:32 AM
how to create a simple walk npc?!

Dusan01
01/11/2012, 07:49 AM
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;

Bug.
01/11/2012, 02:11 PM
-DELETED-

ikkentim
01/11/2012, 02:14 PM
What line is line 555?

Bug.
01/11/2012, 02:15 PM
What line is line 555?

return 1;