Day of Defeat Plugins Community
This site is an archive — everything is readable and downloadable, nothing can be posted. Admin
8 posts, 3 people · 3,479 views Thread Rating: ★★★★★
closedPlayer name FIX
Started by RollinDeath on 03-19-2009, 12:21 AM
RollinDeath
started this thread
Posts: 39
Threads: 6
Joined: Nov 2007
03-19-2009, 12:21 AM #1

I would like to ask that some one make a plug in that will ask a "Player" to change their name. Make a message big enough for them to see it.. obvious like and then use messagemode to allow the to type in a small number of letters... Maybe 15 or so. Then after they type the new name and hit enter the server will use amx_nick to change the players name and then allow the player to play. I do not think the player should be blocked from the game or nothing but he should be required to hit enter and start playing IF his or her name is "Player"

RollinDeath
started this thread
Posts: 39
Threads: 6
Joined: Nov 2007
03-19-2009, 12:26 AM #2

OH !!!!rnrn here is a feature I would like as well. IF they do not enter anything then force the name change to their STEAM ID!

dodsynthetic
posted here
Posts: 277
Threads: 15
Joined: Mar 2007
03-19-2009, 02:17 AM #3

I actually did this for someone as a private request not to long ago. The concept is a little different though, it warns the player and if after x seconds they don't change it, it will change their name to one from a list. If this works for you, I'll throw it up add the steam id usage as well.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
03-19-2009, 12:08 PM #4

i made this long ago, it will show "Player" that theres a chat command called /name and that command will show a motd that has a guid for how to change there name.. You will need a file called name_help.txt in the root folder where e.g server.cfg is found, with info about how to change the damn name...rnrn

#include <amxmodx>rn#include <dodx>rnrn#define PLUGIN "Client help"rn#define VERSION "1.0 by Dr.G - www.clan-go.net"rn#define AUTHOR "Dr.G"rnrn//FILErn#define HELPNAME "name_help.txt"rnrnnew p_onrnrnpublic plugin_init() rn{rn	register_plugin(PLUGIN, VERSION, AUTHOR)rn	register_cvar("client_help_stats", VERSION, FCVAR_SERVER|FCVAR_SPONLY)rn	p_on = register_cvar("client_help", "1") //Plugin on/off | 1=on 0=offrn	rn	register_clcmd("say /name", "NameHelp")rn	register_clcmd("say_team /name", "NameHelp")rn	rn	if(!file_exists(HELPNAME))rn		set_fail_state("[Client help]name_help.txt does not exist!")rn}rnpublic client_putinserver(id)rn{rn	new name[33]rn	get_user_name(id,name,sizeof name -1)rn	rn	if(equal(name, "Player") || equal(name, "(1)Player") || equal(name, "(2)Player") || equal(name, "(3)Player") || equal(name, "(4)Player") || equal(name, "(5)Player"))rn		set_task(10.0,"ShowMsg",id)rn}rnpublic dod_client_changeteam(id)rn{rn	new p_name[33]rn	get_user_name(id,p_name,sizeof p_name -1)rn	rn	if(equal(p_name, "Player") || equal(p_name, "(1)Player") || equal(p_name, "(2)Player") || equal(p_name, "(3)Player") || equal(p_name, "(4)Player") || equal(p_name, "(5)Player"))rn		set_task(5.0,"ShowMsg",id)rn}	rnpublic NameHelp(id)rn{rn	if(get_pcvar_num(p_on))rn		show_motd(id, HELPNAME,"Help screen | Name change")rn}rnpublic ShowMsg(id)rn{rn	set_hudmessage(75, 223, 179, -1.0, -1.0, 0, 6.0, 30.0)rn	show_hudmessage(id, "Need help Changeing your name???^nSay /name in chat to see how to!^n^n Cheers!")rn}rn
rnrnThis is how my name_help.txt goes:rnrn
<html>rn<body bgcolor="#303020" text="#c1b689"> rn <p>rn<font face="Arial">rn<h3>CONSOLErn<hr>rn<h4>To open your console press ½ or § its the same key! Right below Escrn<hr>rn<h3>NAME CHANGErn<hr>rn<h4>Open your console - Type: name "newname"rn<h4>NOTE if you want spaces in your name use % where you want the space to be!rn<h4>I.g. name My%New%Name will set your name to "My New Name" rn<hr>rn</h4>rn</body>rn</html>
RollinDeath
started this thread
Posts: 39
Threads: 6
Joined: Nov 2007
03-20-2009, 02:55 PM #5

Nice and thank you,nnI am doing some learning and hopefully be adding more to this plug in.

Dr.G
posted here
Posts: 776
Threads: 75
Joined: Nov 2007
03-20-2009, 04:09 PM #6

cool.. let me see what you end up with :)

RollinDeath
started this thread
Posts: 39
Threads: 6
Joined: Nov 2007
03-21-2009, 07:46 AM #7

dodsynthetic,rnI apologize for not Thank you sooner for your offer. I am all open for suggestions and could really use expert opinions. rnrnDr.G,rnSo far this is all I could figure out and it has been fun.rnrnI am considering a few things like adding back the MOTD but for now I did good getting the menu to work at all. So Please let me know what you think and any suggestions would be appreciated on any errors I have made.

dodsynthetic
posted here
Posts: 277
Threads: 15
Joined: Mar 2007
04-05-2009, 09:39 AM #8
DoD Plugins Archive · Repository · Old Forum Threads · Maps · Admin · built 14 Sep 2026 00:34 UTC