Raised This Month: $51 Target: $400
 12% 

Increasing Health


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RAW_192
Senior Member
Join Date: Feb 2017
Old 07-29-2017 , 03:26   Increasing Health
Reply With Quote #1

How can we increase the health shown on screen from 255?

I have set an option to increase health till 500 but it just shows 255 on screen...
RAW_192 is offline
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 07-29-2017 , 03:45   Re: Increasing Health
Reply With Quote #2

You can use it.
I didn't use #include <dhudmessage>.
It's working very well.

PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_plugin("Health Armor""1.0""PurposeLess")

    
register_event("ResetHUD""Event_ResetHUD""b")
    
register_message(get_user_msgid("HideWeapon"), "Message_HideWeapon")
}

public 
client_putinserver(id)
{
    
set_task(0.1"purposeless"id 1907""0"b")
}

public 
purposeless(TaskId)
{
    new 
id TaskId 1907
    
if(!is_user_alive(id) || !is_user_connected(id))
        return

    static 
purpo[64]
    
formatex(purpocharsmax(purpo), "HP:  %i       |       ARMOR:  %d"get_user_health(id), get_user_armor(id))
    
message_begin(MSG_ONE_UNRELIABLESVC_DIRECTOR_id); {
        
write_byte(strlen(purpo) + 31)
        
write_byte(DRC_CMD_MESSAGE)
        
write_byte(0)
        
write_long(((clamp(650255)) + ((clamp(1570255)) << 8) + ((clamp(2160255)) << 16)))
        
write_long(_:0.01)
        
write_long(_:0.95)
        
write_long(_:0.1)
        
write_long(_:0.1)
        
write_long(_:0.0)
        
write_long(_:0.0)
        
write_string(purpo)
    }
    
message_end()
}

public 
Event_ResetHUD(id)
{
    
message_begin(MSG_ONEget_user_msgid("HideWeapon"), _id)
    
write_byte((1<<3) | (1<<5))
    
message_end()
}

public 
Message_HideWeapon()
{
    
set_msg_arg_int(1ARG_BYTEget_msg_arg_int(1) | (1<<3) | (1<<5))


Last edited by PurposeLessx; 07-29-2017 at 03:46.
PurposeLessx is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-29-2017 , 04:42   Re: Increasing Health
Reply With Quote #3

The default health hud limit can't be increased
__________________
HamletEagle is offline
RAW_192
Senior Member
Join Date: Feb 2017
Old 07-29-2017 , 05:15   Re: Increasing Health
Reply With Quote #4

Quote:
Originally Posted by PurposeLessx View Post
You can use it.
I didn't use #include <dhudmessage>.
It's working very well.

PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_plugin("Health Armor""1.0""PurposeLess")

    
register_event("ResetHUD""Event_ResetHUD""b")
    
register_message(get_user_msgid("HideWeapon"), "Message_HideWeapon")
}

public 
client_putinserver(id)
{
    
set_task(0.1"purposeless"id 1907""0"b")
}

public 
purposeless(TaskId)
{
    new 
id TaskId 1907
    
if(!is_user_alive(id) || !is_user_connected(id))
        return

    static 
purpo[64]
    
formatex(purpocharsmax(purpo), "HP:  %i       |       ARMOR:  %d"get_user_health(id), get_user_armor(id))
    
message_begin(MSG_ONE_UNRELIABLESVC_DIRECTOR_id); {
        
write_byte(strlen(purpo) + 31)
        
write_byte(DRC_CMD_MESSAGE)
        
write_byte(0)
        
write_long(((clamp(650255)) + ((clamp(1570255)) << 8) + ((clamp(2160255)) << 16)))
        
write_long(_:0.01)
        
write_long(_:0.95)
        
write_long(_:0.1)
        
write_long(_:0.1)
        
write_long(_:0.0)
        
write_long(_:0.0)
        
write_string(purpo)
    }
    
message_end()
}

public 
Event_ResetHUD(id)
{
    
message_begin(MSG_ONEget_user_msgid("HideWeapon"), _id)
    
write_byte((1<<3) | (1<<5))
    
message_end()
}

public 
Message_HideWeapon()
{
    
set_msg_arg_int(1ARG_BYTEget_msg_arg_int(1) | (1<<3) | (1<<5))


Working Great Thanks
RAW_192 is offline
RAW_192
Senior Member
Join Date: Feb 2017
Old 07-30-2017 , 04:16   Re: Increasing Health
Reply With Quote #5

Quote:
Originally Posted by PurposeLessx View Post
You can use it.
I didn't use #include <dhudmessage>.
It's working very well.

PHP Code:
#include <amxmodx>

public plugin_init() {
    
register_plugin("Health Armor""1.0""PurposeLess")

    
register_event("ResetHUD""Event_ResetHUD""b")
    
register_message(get_user_msgid("HideWeapon"), "Message_HideWeapon")
}

public 
client_putinserver(id)
{
    
set_task(0.1"purposeless"id 1907""0"b")
}

public 
purposeless(TaskId)
{
    new 
id TaskId 1907
    
if(!is_user_alive(id) || !is_user_connected(id))
        return

    static 
purpo[64]
    
formatex(purpocharsmax(purpo), "HP:  %i       |       ARMOR:  %d"get_user_health(id), get_user_armor(id))
    
message_begin(MSG_ONE_UNRELIABLESVC_DIRECTOR_id); {
        
write_byte(strlen(purpo) + 31)
        
write_byte(DRC_CMD_MESSAGE)
        
write_byte(0)
        
write_long(((clamp(650255)) + ((clamp(1570255)) << 8) + ((clamp(2160255)) << 16)))
        
write_long(_:0.01)
        
write_long(_:0.95)
        
write_long(_:0.1)
        
write_long(_:0.1)
        
write_long(_:0.0)
        
write_long(_:0.0)
        
write_string(purpo)
    }
    
message_end()
}

public 
Event_ResetHUD(id)
{
    
message_begin(MSG_ONEget_user_msgid("HideWeapon"), _id)
    
write_byte((1<<3) | (1<<5))
    
message_end()
}

public 
Message_HideWeapon()
{
    
set_msg_arg_int(1ARG_BYTEget_msg_arg_int(1) | (1<<3) | (1<<5))

It hides the Radar Map .. Any suggestions on how to get it back?
RAW_192 is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 07-30-2017 , 08:33   Re: Increasing Health
Reply With Quote #6

Quote:
Originally Posted by RAW_192 View Post
It hides the Radar Map .. Any suggestions on how to get it back?
Not possible
__________________
simanovich is offline
RAW_192
Senior Member
Join Date: Feb 2017
Old 07-30-2017 , 12:06   Re: Increasing Health
Reply With Quote #7

So it means we can either hide radar , user money and get that health limit to increase or keep the limit and everything right ?
RAW_192 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-30-2017 , 16:33   Re: Increasing Health
Reply With Quote #8

The limit is always there, the plugin is just showing a custom hud message.
__________________
HamletEagle is offline
RAW_192
Senior Member
Join Date: Feb 2017
Old 07-31-2017 , 01:40   Re: Increasing Health
Reply With Quote #9

Ok Thanks Hamlet

Yeah i know it displays a custom HUD
RAW_192 is offline
PurposeLessx
Senior Member
Join Date: Jun 2017
Old 08-01-2017 , 07:41   Re: Increasing Health
Reply With Quote #10

Actually we can not hide just health without armor and radar.
But you can draw money.

If you want the money to be shown, do it.

PHP Code:
write_byte((1<<3) | (1<<5)) 
Change
PHP Code:
write_byte((1<<3)) 

PHP Code:
set_msg_arg_int(1ARG_BYTEget_msg_arg_int(1) | (1<<3) | (1<<5)) 
Change
PHP Code:
set_msg_arg_int(1ARG_BYTEget_msg_arg_int(1) | (1<<3)) 

Last edited by PurposeLessx; 08-01-2017 at 07:41.
PurposeLessx 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 11:23.


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