Raised This Month: $ Target: $400
 0% 

Replacing Name Showing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 12-27-2007 , 14:57   Replacing Name Showing
Reply With Quote #1

What I'm trying to do is replace the default name-showing when you look at a player, to a custom one that show a hud message.

Code:
new gHudSyncObj;

public plugin_init()
{
    register_event("StatusValue", "eventStatusValue", "be", "1=2", "2!0");
    gHudSyncObj = CreateHudSyncObj();
}

public eventStatusValue(id)
{
    new pid = read_data(2), red, green, blue, team = get_user_team(pid);
    
    switch(team)
    {
        case 1:
        {
            red = 255;
            green = 50;
            blue = 50;
        }
        case 2:
        {
            red = 50;
            green = 100;
            blue = 255;
        }
        default:
        {
            red = 100;
            green = 100;
            blue = 100;
        }
    }
    
    new szName[32];
    get_user_name(pid, szName, 31);
    
    ClearSyncHud(id, gHudSyncObj);
    set_hudmessage(red, green, blue, -1.0, -1.0, 0, 0.0, 0.25, 0.0, 0.0, 4);
    ShowSyncHudMsg(id, gHudSyncObj, szName);
    return PLUGIN_HANDLED;
}
It shows the message, but it only lasts for the hud time, and I expected it to last until I looked away from the player.

Also, it doesn't block the message in the bottom-left corner of the screen.

Does anyone have a different/better way to do this?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
 



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 11:03.


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