Forum

> > CS2D > General > setname bug
Forums overviewCS2D overviewGeneral overviewLog in to reply

English setname bug

3 replies
To the start Previous 1 Next To the start

old setname bug

wups
User Off Offline

Quote
When using this code to change nick for peoples in the dedicated.
I only see this in the dedicated console.


In the dedicated console.
1
2
3
4
5
6
[01:17:08] player 5 connected
[01:17:08] player 5 is using IP xxx.xxx.xxx.xxx:2612 and U.S.G.N. ID #xxxx
[01:17:08] player 5 changes name to noob
[01:17:08] U.S.G.N.: xxx.xxx.xxx.xxx is using U.S.G.N. ID #xxxx
[01:17:08] U.S.G.N.: noob is using U.S.G.N. ID #xxx
[01:17:11] noob joins the counter-terrorist forces

Ingame with the cs2d client:
I can only see "Player 5" in the scoreboard
And nothing that i have changed nick.

1
2
3
4
5
6
7
addhook("join","nickjoin")
function nickjoin(p)
n = player(p,"name")
if (string.find(n,"player") ~= nil) then
parse("setname "..p.." noob")
end
end

old Re: setname bug

DC
Admin Off Offline

Quote
I tested it but I cannot confirm it.
when I change a name with setname I see the default change-name in-game message (xxx changed name to yyy) + the corresponding console output. as client, as server and also as dedicated server.

edit: maybe it happens because you are using the command in the join event. you could use cs2d cmd sv_msg and/or cs2d cmd echo to add the messages.
edited 1×, last 21.06.09 02:22:27 am

old Re: setname bug

DC
Admin Off Offline

Quote
don't use it in the join hook. it's too early. you have to do it afterwards.

maybe when the player chooses a team.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview