Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin

players_name_fix

by RollinDeath · 2009-03-23 · 2 replies · 7259 views · 104 downloads

Read the thread (3 posts)

From the first post

This plug in was made to help the community who do not understand console or do not have enough experience with cfg files to make changes easily.
rn
rn0.7.2 version
rnCVAR
rnname_menu 1 = on 0 = off
rn
rn
/* Plugin generated by AMXX-StudiornrnrnDescription  :rnrnThis plug providers people with the default name "Player" a menu to fix their name.rnIf "Player" accepts the name change option then they simply type the new name without using consolernIf "Player" declines the offer then their name is changed to their STEAM ID.rnYou may also type /name in either team chat or public chat and change your name without consolernrnrnCREDIT:rnrnBased on Client help 1.0 by Dr.G - www.clan-go.netrnrnCHANGELOG:rnrn3-21-09rnReplaced the HTML for messagemodesrnAdded Menu Optionsrnrn3-22-09rnSteam ID used when declinedrnSome messages are adjusted and changedrnAdded Cleint spawn checkrnAdded messages on acceptrnAdded message on declinedrnremoved join serverrnremoved join teamrnrn3-24-09rnFixed p-on Thanks to Dr.G - www.clan-go.netrnrnTO DO:rnSelecting 8 and not entering data changes "Player" name to "empty" unless esc is usedrnrnrnBUGS:rnrn*/

Files

players_name_fix.sma Plugin Source 3 KB 104 dl Download Compile

The thread

All 3 posts from 2 people on players_name_fix, kept as they were written.

RollinDeath
started this thread
Posts: 39
Threads: 6
Joined: Nov 2007
03-22-2009, 10:05 PM #1

This plug in was made to help the community who do not understand console or do not have enough experience with cfg files to make changes easily.rnrn0.7.2 versionrnCVARrnname_menu 1 = on 0 = offrnrn

/* Plugin generated by AMXX-StudiornrnrnDescription  :rnrnThis plug providers people with the default name "Player" a menu to fix their name.rnIf "Player" accepts the name change option then they simply type the new name without using consolernIf "Player" declines the offer then their name is changed to their STEAM ID.rnYou may also type /name in either team chat or public chat and change your name without consolernrnrnCREDIT:rnrnBased on Client help 1.0 by Dr.G - www.clan-go.netrnrnCHANGELOG:rnrn3-21-09rnReplaced the HTML for messagemodesrnAdded Menu Optionsrnrn3-22-09rnSteam ID used when declinedrnSome messages are adjusted and changedrnAdded Cleint spawn checkrnAdded messages on acceptrnAdded message on declinedrnremoved join serverrnremoved join teamrnrn3-24-09rnFixed p-on Thanks to Dr.G - www.clan-go.netrnrnTO DO:rnSelecting 8 and not entering data changes "Player" name to "empty" unless esc is usedrnrnrnBUGS:rnrn*/
Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
03-23-2009, 04:42 PM #2

gj! the code looks way better then the first one you posted in the request thread :)rnrnSome things wont work as the code looks now e.g:rnrn

public NameHelp(id)	rn{rn	if(get_pcvar_num(p_on))	rn		client_cmd(id,"messagemode name;")rn	set_hudmessage(0, 255, 255, 0.02, 0.10, 0, 6.0, 12.0)rn	show_hudmessage(id, "Type your name NOW!!!! ")rn	rn	return PLUGIN_HANDLEDrn}
rnrnThe only thing that will happen if p_on isnt positiv is that it will show the HUD message when ppl say /name. Like this it will do nothing:rnrn
public NameHelp(id)	rn{rn	if(get_pcvar_num(p_on))rn	{rn		client_cmd(id,"messagemode name;")rn		set_hudmessage(0, 255, 255, 0.02, 0.10, 0, 6.0, 12.0)rn		show_hudmessage(id, "Type your name NOW!!!! ")rn	}rn	return PLUGIN_HANDLEDrn}
rnrnBut its a simple thing.. You can leave out the branches if you only had this eg:rnrn
public NameHelp(id)	rn{rn	if(get_pcvar_num(p_on))rn		client_cmd(id,"messagemode name;")rn}
rnrnIts always best to leave out the branches if possible the function above could also look like this and still be working:rnrn
public NameHelp(id)	rn	if(get_pcvar_num(p_on))rn		client_cmd(id,"messagemode name;")
rnbut branches will make the code a bit more easy to read for others. I always wrap functions with { }.....rnrnAlso public dod_client_spawn(id) will happen even if name_menu is 0, so maybe you should make an overall on/off function.. Idk if that dod_client_spawn forward is still buggy, i would use hamsandwich see the tutorial forum for how to catch it with ham..

RollinDeath
started this thread
Posts: 39
Threads: 6
Joined: Nov 2007
03-24-2009, 09:09 PM #3
Thank you Dr. G, rnrnOkay I fixed the /name but I wanted to keep the text to make sure people notice they should be typing a name. I have not tested this version yet but I will soon after my server uploads this evening. I will also see if I understand the HAM stuff and do some testing as well before my next post.
rnrnOkay I can not reply to this thread anymore..... So I never got around to working with the ham stuff. I really just don't get everything yet. Anyways anyone know if this plug in can crash a server using the client crash / freeze bug?rnrnhttps://www.dodplugins.net/forums/showthread.php?t=1821

DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC