Raised This Month: $ Target: $400
 0% 

Shows wrong player name (old)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 05-18-2014 , 18:15   Shows wrong player name (old)
Reply With Quote #1

code:

PHP Code:
new nick[33][32];
public 
client_putinserver(id) {
    
get_user_name(idnick[id], 31);
}

public 
client_infochanged(id) {
    new 
name[32]; get_user_info(id"name"name31);
    if(!
equal(nick[id], name)) {
        
nick[id] = name;
        
get_user_name(idnick[id], 31);
    }

I want to the new player name is saved in the variable nick
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 05-19-2014 , 02:48   Re: Shows wrong player name (old)
Reply With Quote #2

here ya go
Code:
new g_msgid_saytext public plugin_init() { g_msgid_saytext = get_user_msgid("SayText") } public forward_client_userinfochanged(id, buffer) {     if (!is_user_connected(id))         return FMRES_IGNORED     static oldname[32], newname[32]     get_user_name(id, oldname, sizeof oldname - 1)     engfunc(EngFunc_InfoKeyValue, buffer, g_name, newname, sizeof newname - 1)     if (equal(newname, oldname))         return FMRES_IGNORED             msg_name_change(id, oldname, newname)         return FMRES_SUPERCEDE } msg_name_change(id, /* const */ oldname[], /* const */ newname[]) {     message_begin(MSG_BROADCAST, g_msgid_saytext)     write_byte(id)     write_string(g_name_change)     write_string(oldname)     write_string(newname)     message_end() }
aron9forever is offline
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 09:35.


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