Raised This Month: $ Target: $400
 0% 

How can i put hud/chat on player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 12-29-2012 , 15:37   How can i put hud/chat on player
Reply With Quote #1

Hi
Can someone tell me how i put something on player like health bar.
What i want is like:
Player have bool: Has_Speed so will say in him head Speed, or Has_gravity and people see Gravity
That isnt for Speed or gravity, but that's an example of what i need xD
__________________
Jhob94 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 12-29-2012 , 15:51   Re: How can i put hud/chat on player
Reply With Quote #2

why don't you tell us exactly what you would like?
Blizzard_87 is offline
ironskillz1
AlliedModders Donor
Join Date: Jul 2012
Location: Sweden
Old 12-29-2012 , 16:05   Re: How can i put hud/chat on player
Reply With Quote #3

Quote:
Originally Posted by Jhob94 View Post
Hi
Can someone tell me how i put something on player like health bar.
What i want is like:
Player have bool: Has_Speed so will say in him head Speed, or Has_gravity and people see Gravity
That isnt for Speed or gravity, but that's an example of what i need xD
Code:
#include <amxmodx>

#define VERSION "0.0.2"

#define FIRST_PLAYER_ID    1
#define MAX_PLAYERS        32

new g_iMaxPlayers
#define IsPlayer(%1)    ( FIRST_PLAYER_ID <= %1 <= g_iMaxPlayers )

new g_iAiming[MAX_PLAYERS+1]

new g_pCvarHoldTime
new g_iSyncHud

public plugin_init()
{
    register_plugin("Aimed Player Name", VERSION, "ConnorMcLeod")

    g_pCvarHoldTime = register_cvar("aim_msg_time", "5")

    set_msg_block(get_user_msgid("StatusText"), BLOCK_SET)

    register_event("StatusValue", "Event_StatusValue", "be", "1<3")

    g_iMaxPlayers = get_maxplayers()
    g_iSyncHud = CreateHudSyncObj()
}

public client_putinserver( id )
{
    g_iAiming[id] = 0
}

public Event_StatusValue( id )
{
    new iPlayer = read_data(2)
    if( iPlayer != g_iAiming[id] )
    {
        g_iAiming[id] = iPlayer
        if( IsPlayer(iPlayer) )
        {
            new szName[32]
            get_user_name(iPlayer, szName, charsmax(szName))
            set_hudmessage(200, 100, 50, -1.0, 0.35, 0, 0.01, get_pcvar_float(g_pCvarHoldTime), 0.01, 0.01, -1)
            ShowSyncHudMsg(id, g_iSyncHud, szName)
        }
    }
} 
__________________
I have many private and unique plugins for Jailbreak and Hide'N'Seek. PM me for more info.

Pm me.

Check out my roulette site.
ironskillz1 is offline
Send a message via Skype™ to ironskillz1
Jhob94
AMX Mod X Donor
Join Date: Jul 2012
Old 12-29-2012 , 17:15   Re: How can i put hud/chat on player
Reply With Quote #4

Quote:
Originally Posted by Blizzard_87 View Post
why don't you tell us exactly what you would like?
It wouldnt make diference

ironskillz it isnt what iam really looking for....
__________________

Last edited by Jhob94; 12-29-2012 at 17:47.
Jhob94 is offline
Reply


Thread Tools
Display Modes

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 13:45.


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