Raised This Month: $51 Target: $400
 12% 

[l4d/2] Change bots name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gbr161
Member
Join Date: May 2012
Old 09-16-2013 , 11:58   [l4d/2] Change bots name
Reply With Quote #1

Hi

Im trying to change bots name but im failing to do it.

Ive tried:
Code:
ClientCommand(player, "name \"%s\"", name);
or
SetClientInfo(player, "name", name);
but it didnt work.

Is there any way to do it?
gbr161 is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-16-2013 , 13:16   Re: [l4d/2] Change bots name
Reply With Quote #2

Look in playercommands "sm_rename"

SetClientInfo
Code:
SetClientInfo(player, "name", "My new name");
__________________
Do not Private Message @me

Last edited by Bacardi; 09-16-2013 at 13:17.
Bacardi is offline
Marcus101RR
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 09-16-2013 , 16:21   Re: [l4d/2] Change bots name
Reply With Quote #3

The bot's name cannot be changed physically, but you can give it a nickname, it will appear only in menus and chat, however, death, name tags, etc will not change.
__________________
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
gbr161
Member
Join Date: May 2012
Old 09-16-2013 , 17:01   Re: [l4d/2] Change bots name
Reply With Quote #4

Using SetClientInfo(player, "name", "My new name"); it changes name but not ingame. When i type status in the console names are changed.
Im fixing allsurvivors plugin and this is only thing left.

Hers part of code:

Code:
					SetEntityModel(i, characterArray[setSurvivor][characterModel]);
					SetEntProp(i, Prop_Send, "m_survivorCharacter", characterArray[setSurvivor][survivorChar]);
					new m;
					if(IsFakeClient(i))
					{
						m=getIntFromModel(characterArray[setSurvivor][characterModel]);
						if(m==0){SetClientInfo(i, "name", "Nick");}
						if(m==1){SetClientInfo(i, "name", "Rochelle");}
						if(m==2){SetClientInfo(i, "name", "Coach");}
						if(m==3){SetClientInfo(i, "name", "Ellis");}
						if(m==4){SetClientInfo(i, "name", "Bill");}
						if(m==5){SetClientInfo(i, "name", "Zoey");}
						if(m==6){SetClientInfo(i, "name", "Francis");}
						if(m==7){SetClientInfo(i, "name", "Louis");}
					}
					DebugPrintToAll("AllSurvivors: Thinks %N should rather be %i, setting model %s", i, setSurvivor, characterArray[setSurvivor][characterModel]);
(its pretty dirty now)
Problem is in l4d1 campaigns where it is changing model only and there are wrong names displayed
gbr161 is offline
Marcus101RR
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 09-16-2013 , 17:57   Re: [l4d/2] Change bots name
Reply With Quote #5

https://forums.alliedmods.net/showpo...35&postcount=3
__________________
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:16.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode