Adding just the names -
HazardGaming - 12.04.2012
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.
Re: Adding just the names -
ikkentim - 12.04.2012
Npc's don't change the amount of online players, they only decrease the slots-count
Re: Adding just the names -
HazardGaming - 12.04.2012
Yes, I know.
Do you have any idea on how to just add the names?
Re: Adding just the names -
ikkentim - 12.04.2012
Use ConnectNPC(name[], script[]);
Make an NPC script that basically does nothing and i guess there you go
Re: Adding just the names -
HazardGaming - 12.04.2012
And how would I do that?
Re: Adding just the names -
ikkentim - 12.04.2012
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
Re: Adding just the names -
HazardGaming - 12.04.2012
whats with the Empty bit?
Re: Adding just the names -
ikkentim - 12.04.2012
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");
Re: Adding just the names -
HazardGaming - 12.04.2012
ahh Thanks man!