the best way to get 'renames' actions

Discussions about ET modding (sdk code, player/weapon modeling)

Moderators: Forum moderators, developers

Post Reply
User avatar
Luk4ward
Posts: 236
Joined: Sun Jul 30, 2006 1:55 pm
Location: Poland
Contact:

the best way to get 'renames' actions

Post by Luk4ward »

Hello, whats the safest way?

Via the function:

function et_Print( text )

local s, e, name_before, name_after = string.find( text, "broadcast: print "(%a+) renamed to (%a+)\n"")

end

or via

et_ClientUserinfoChanged( clientNum )

et.CS_PLAYERS = 689

-- get the name of client #3 using configstrings
local cs = et.trap_GetConfigstring(et.CS_PLAYERS + clientNum)
local name_after = et.Info_ValueForKey(cs, "n")

end

I dnt want to check players' renames for every frame, any suggestion or help would be great, thx in advance
wolFTeam.pl
User avatar
ReyalP
Posts: 1663
Joined: Fri Jul 25, 2003 11:44 am

Post by ReyalP »

et_ClientUserinfoChanged, as your code will only get called when they change.
send lawyers, guns and money
Post Reply