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

[REQ] hp+armor+timer+clip.. show HudMessage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-27-2020 , 04:55   [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #1

Can anyone create a plugin that shows the number (Clips) and (Ammos) as a hudmessage?

PHP Code:
set_hudmessage(255000.01.00.9006.012.0)
show_hudmessage(id"Hp:%i | Armor:%i  | %i:%i   Clip:%i / Ammo:%i",health,armor,minTimer,secTimer,clip,ammo
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-27-2020 , 08:14   Re: [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #2

untested

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "ShowHud"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

#define HUDID 1574

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
}

public 
client_putinserver(id)
{
    
set_task(2.0"ShowHud"id HUDID);
}

public 
client_disconnect(id)
{
    
remove_task(id HUDID);
}

public 
ShowHud(id)
{
    
id -= HUDID;
    
    if(
is_user_alive(id))
    {
        new 
iClipiAmmo;
        
get_user_weapon(idiClipiAmmo);
        
        new 
iHealth get_user_health(id);
        new 
iArmor get_user_armor(id);
        
        new 
iMinTimer get_timeleft() / 60;
        new 
iSecTimer get_timeleft() % 60;
        
        
set_hudmessage(255000.010.9006.01.0);
        
show_hudmessage(id"Hp: %i | Armor: %i  | %d:%d   Clip: %i / Ammo: %i"iHealthiArmoriMinTimeriSecTimeriClipiAmmo);
        
        
    }
    
set_task(1.0"ShowHud"id HUDID);

__________________

Last edited by Napoleon_be; 03-27-2020 at 08:59.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-27-2020 , 08:53   Re: [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
untested

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "ShowHud"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"

#define HUDID 1574

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
}

public 
client_putinserver(id)
{
    
set_task(2.0"ShowHud"id HUDID);
}

public 
client_disconnect(id)
{
    
remove_task(id HUDID);
}

public 
ShowHud(id)
{
    
id -= HUDID;
    
    if(
is_user_alive(id))
    {
        new 
iClipiAmmo;
        
get_user_weapon(idiClipiAmmo);
        
        new 
iHealth get_user_health(id);
        new 
iArmorget_user_armor(id);
        
        new 
iMinTimer get_timeleft() / 60;
        new 
iSecTimer get_timeleft() % 60;
        
        
set_hudmessage(255000.010.9006.01.0);
        
show_hudmessage(id"Hp:%i | Armor:%i  | %i:%i   Clip:%i / Ammo:%i"iHealthiArmoriMinTimeriSecTimeriClipiAmmo);
        
        
    }
    
set_task(1.0"ShowHud"id HUDID);

There is a problem

(minTimer) and (secTimer) and (armor) not working
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-27-2020 , 08:57   Re: [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #4

Armour should be fixed. What are minTimer & secTimer supposed to do?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-27-2020 , 09:09   Re: [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #5

Quote:
Originally Posted by Napoleon_be View Post
Armour should be fixed. What are minTimer & secTimer supposed to do?
Round Time

The armor hudmessage always shows zero

Last edited by alferd; 03-27-2020 at 09:15.
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-27-2020 , 12:08   Re: [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #6

Quote:
Originally Posted by alferd View Post
Round Time

The armor hudmessage always shows zero
Armor got updated, should be fixed. Also, why do u want the round timer in a hudmessage when u have the roundtimer at the bottom of your screen?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-27-2020 , 12:21   Re: [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #7

Quote:
Originally Posted by Napoleon_be View Post
Armor got updated, should be fixed. Also, why do u want the round timer in a hudmessage when u have the roundtimer at the bottom of your screen?
I want to delete the original hud And replace hudmessage
alferd is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-27-2020 , 12:24   Re: [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #8

Quote:
Originally Posted by alferd View Post
I want to delete the original hud And replace hudmessage
Code got updated, try again and give me feedback.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 03-27-2020 , 12:37   Re: [REQ] hp+armor+timer+clip.. show HudMessage
Reply With Quote #9

Quote:
Originally Posted by Napoleon_be View Post
Code got updated, try again and give me feedback.
The armor works but the timer doesn't work
alferd 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 03:06.


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