Raised This Month: $32 Target: $400
 8% 

Help Hud Message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Xaraza
New Member
Join Date: Jun 2023
Old 06-06-2023 , 11:15   Help Hud Message
Reply With Quote #1

I use this hud(playerinfo), which shows player stats: Kills: ?|Deaths: ?|Ping: ?. But there is only one problem this hud has... When AMX messages show up, this playerinfo hud dissapears for some reason, and shows up only when AMX message fades. Also when I installed spectators' hud, it completely dissapeared playerinfo hud. Could you edit this hud so it will show up every time? Also if it's possible to add one more stat like Rank ? of ??


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
register_plugin("Stats","0.2","Dah-Veeeed")
set_task(2.0,"the_main",0,_,_,"b")
register_event("Damage","damage_event","b","2 !0","3=0","4!0")
register_cvar("amx_info","1")
}

new damage[33] = 0

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

public client_disconnect(id) {
damage[id] = 0
}

public damage_event(id)
{
new attacker = get_user_attacker(id)
new dmg = read_data(2)

damage[attacker] += dmg
}


public the_main() {
if(!get_cvar_num("amx_info")) {
return PLUGIN_HANDLED
}
new players[32],num,i
new message[200]
get_players(players,num)
for(i = 0; i <= num; i++)
{
new id = players[i]

if(is_user_connected(id)) {
new name[33]
new ping
new loss
get_user_name(id,name,32)
new frags = get_user_frags(id)
new deaths = get_user_deaths(id)
get_user_ping(id,ping,loss)

set_hudmessage (0,128,255, -1.0, 0.93, 0, 6.0, 2.0, 0.1, 0.2, 4 )
format(message,199,"%s | Kills: %i | Deaths: %i | Ping: %i",name,frags,deaths,ping)
show_hudmessage(id,message)
}
}
return PLUGIN_CONTINUE
}

Last edited by Xaraza; 06-06-2023 at 11:16.
Xaraza is offline
Uzviseni Bog
Senior Member
Join Date: Jun 2020
Old 06-06-2023 , 11:40   Re: Help Hud Message
Reply With Quote #2

Quote:
Originally Posted by Xaraza View Post
I use this hud(playerinfo), which shows player stats: Kills: ?|Deaths: ?|Ping: ?. But there is only one problem this hud has... When AMX messages show up, this playerinfo hud dissapears for some reason, and shows up only when AMX message fades. Also when I installed spectators' hud, it completely dissapeared playerinfo hud. Could you edit this hud so it will show up every time? Also if it's possible to add one more stat like Rank ? of ??


#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
register_plugin("Stats","0.2","Dah-Veeeed")
set_task(2.0,"the_main",0,_,_,"b")
register_event("Damage","damage_event","b","2 !0","3=0","4!0")
register_cvar("amx_info","1")
}

new damage[33] = 0

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

public client_disconnect(id) {
damage[id] = 0
}

public damage_event(id)
{
new attacker = get_user_attacker(id)
new dmg = read_data(2)

damage[attacker] += dmg
}


public the_main() {
if(!get_cvar_num("amx_info")) {
return PLUGIN_HANDLED
}
new players[32],num,i
new message[200]
get_players(players,num)
for(i = 0; i <= num; i++)
{
new id = players[i]

if(is_user_connected(id)) {
new name[33]
new ping
new loss
get_user_name(id,name,32)
new frags = get_user_frags(id)
new deaths = get_user_deaths(id)
get_user_ping(id,ping,loss)

set_hudmessage (0,128,255, -1.0, 0.93, 0, 6.0, 2.0, 0.1, 0.2, 4 )
format(message,199,"%s | Kills: %i | Deaths: %i | Ping: %i",name,frags,deaths,ping)
show_hudmessage(id,message)
}
}
return PLUGIN_CONTINUE
}

That happens because they can't handle so many heavy messages at once, if I'm not mistaken, please send the remaining scripts so I can fully test it.
Uzviseni Bog is offline
Xaraza
New Member
Join Date: Jun 2023
Old 06-06-2023 , 12:09  
Reply With Quote #3

Edit: I did what I wanted

Last edited by Xaraza; 06-06-2023 at 15:56.
Xaraza is offline
Old 06-06-2023, 13:14
Xaraza
This message has been deleted by Xaraza.
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 06:38.


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