Adding just the names
#1

Hello,
I want to know how to add bot's to my server.

But I only want a name to show in a player slot?

Thanks.
Reply
#2

Npc's don't change the amount of online players, they only decrease the slots-count
Reply
#3

Yes, I know.

Do you have any idea on how to just add the names?
Reply
#4

Use ConnectNPC(name[], script[]);
Make an NPC script that basically does nothing and i guess there you go
Reply
#5

And how would I do that?
Reply
#6

in the npcscripts folder create a file called empty.pwn
Open it and compile it.
If it gives any errors, just past this in this code:

public OnNPCModeInit()
{
print("NPC script loaded");
return 1;
}

After you compiled that, put this on the end of your gamemode's OnGameModeInit():
ConnectNPC("CoolNpcName", "empty");

I think that should work
Reply
#7

whats with the Empty bit?
Reply
#8

Ill tell you some NPC basics:

An NPC basically is an seperate script you are running. Those are the 'npcmodes' folder. In this script you can tell the NPC to do something you have recorded, If you don't tell the NPC to do anything, the don't even spawn.
From my point of view that is what you want.
The file in the 'npcmodes' folder I called 'empty.pwn'

In the 'empty.pwn' in '/npcmodes' folder, paste this:
pawn Код:
public OnNPCModeInit()
{
print("NPC script loaded");
return 1;
}
After you compiled that, put this on the end of your gamemode's OnGameModeInit():
ConnectNPC("CoolNpcName", "empty");
Reply
#9

ahh Thanks man!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)