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

How to add Prisoner & Warden to hud


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
strangeguy
Senior Member
Join Date: Mar 2019
Old 12-09-2020 , 12:48   How to add Prisoner & Warden to hud
Reply With Quote #1

Hello!

Someone can help me to fix add Prisoner & Warden names to hud? Like this:

Prisoners

Code:
set_hudmessage(255, 255, 255, 0.27, 0.89, 0, 6.0, 2.5)
	ShowSyncHudMsg(id, syncObj,"Class: Prisoner | Health: %d | Armor: %d | JBPacks: %i", get_user_health(id), get_user_armor(id), g_jbpacks[id])
Wardens

Code:
set_hudmessage(255, 255, 255, 0.27, 0.89, 0, 6.0, 2.5)
	ShowSyncHudMsg(id, syncObj,"Class: Warden | Health: %d | Armor: %d | JBPacks: %i", get_user_health(id), get_user_armor(id), g_jbpacks[id])

Last edited by strangeguy; 12-09-2020 at 12:52.
strangeguy is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 12-10-2020 , 15:40   Re: How to add Prisoner & Warden to hud
Reply With Quote #2

since you didn't give me more to work with, i just made it like this, untested

PHP Code:
/* Sublime AMXX Editor v2.2 */

#pragma semicolon 1

#include <amxmodx>
// #include <amxmisc>
#include <cstrike>
// #include <engine>
// #include <fakemeta>
// #include <hamsandwich>
// #include <fun>
// #include <xs>
// #include <sqlx>

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
}

public function(
id) {
    new 
CsTeams:iTeam cs_get_user_team(id);
    new 
bool:bWarden[33];

    if(
iTeam == CS_TEAM_CT)
        
bWarden[id] = true;
    else if(
iTeam == CS_TEAM_T)
        
bWarden[id] = false;
    else
        return 
PLUGIN_HANDLED;

    
set_hudmessage(2552552550.270.8906.02.5);
    
ShowSyncHudMsg(idsyncObj,"Class: %s | Health: %d | Armor: %d | JBPacks: %i"bWarden[id] ? "Warden" "Prisoner"get_user_health(id), get_user_armor(id), g_jbpacks[id]);

    return 
PLUGIN_HANDLED;

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
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 01:41.


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