Raised This Month: $ Target: $400
 0% 

Simple HUD message above your cash.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NestleMilo
BANNED
Join Date: May 2008
Location: http://zombieplague.org
Old 12-23-2008 , 19:04   Simple HUD message above your cash.
Reply With Quote #1

I want a simple HUD message above your cash saying the following:

Code:
Advertising Space [I'll just edit this to add my website name etc]
Number of CT: [x cts in the server]
Number of T: [x ts in the server]
Number of Admins: [x admins in the server]
Number of Players: [x number of players]
Advertising Space [I'll just edit this to add my website name etc]
That shows up every x seconds depending on cvar.

Code:
amx_hudshow x
And the color for all the letters is white.

EDIT:

I want another cvar for the amount of time it gets displayed as well.

Code:
amx_hudshowtime x

Last edited by NestleMilo; 12-24-2008 at 01:34.
NestleMilo is offline
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 12-23-2008 , 23:44   Re: Simple HUD message above your cash.
Reply With Quote #2

i made it for you

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "Counts"
#define VERSION "1.0"
#define AUTHOR "Starsailor"
#define ACCESS_LEVEL ADMIN_KICK


new ctcount
new ttcount
new admincount
new pcvar

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
pcvar register_cvar("amx_hudshow","120")//time in seconds
    
new time get_pcvar_num(pcvar)
    
set_task(float(time),"Messages",0)
    
}


public 
Messages(){
    new 
time get_pcvar_num(pcvar)
    new 
playernum get_playersnum()
    new 
j        
    
new maxplayers get_maxplayers()
    for(
<= maxplayers j++){
        if(
get_user_flags(j) & ACCESS_LEVEL){
            
admincount++
            
        }
    }
    new 
players[32]
    new 
playercount,i;
    
get_players playersplayercount"c" );
    for ( 
0playercount; ++)
    {
        if ( 
cs_get_user_teamplayers[i] ) == CS_TEAM_CT )
        {
            ++
ctcount
        
}
        
        else if ( 
cs_get_user_teamplayers[i] ) == CS_TEAM_T )
        {
            ++
ttcount
        
}
    }
    
set_hudmessage(255255255, -1.00.206.05.0)
    
show_hudmessage(0,"your website^n%d players in the server^n%d CTs in the server^n%d TTs in the server^n%d admins in the server^nyour website",playernum,ctcount,ttcount,admincount)
    
set_task(float(time),"Messages",0)

Attached Files
File Type: sma Get Plugin or Get Source (countsmsg2.sma - 626 views - 1.2 KB)
__________________
Find my plugins here..

Ex - Spanish Moderator.

Last edited by Starsailor; 12-23-2008 at 23:53.
Starsailor is offline
Old 12-24-2008, 00:48
IneedHelp
This message has been deleted by IneedHelp. Reason: version below-->
NestleMilo
BANNED
Join Date: May 2008
Location: http://zombieplague.org
Old 12-24-2008 , 01:12   Re: Simple HUD message above your cash.
Reply With Quote #3

Alright I just tested it out. Couple of bugs.

Code:
- Hud shows in the middle of the screen, not above your cash.
- Hud is centered
- Mostly the hud doesn't show at all.
- Hud gets overrided by other huds like xredirect and the welcome messages
- Hud shows for like 1 - 2 secs
I'm using IneedHelp's updated version.

EDIT:

I want another cvar for the amount of time it gets displayed as well.

Code:
amx_hudshowtime x

Last edited by NestleMilo; 12-24-2008 at 01:35.
NestleMilo is offline
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 12-24-2008 , 03:17   Re: Simple HUD message above your cash.
Reply With Quote #4

Try This. Untested
Attached Files
File Type: sma Get Plugin or Get Source (HudInfo.sma - 655 views - 1.2 KB)
__________________

Last edited by IneedHelp; 01-12-2010 at 22:01.
IneedHelp is offline
NestleMilo
BANNED
Join Date: May 2008
Location: http://zombieplague.org
Old 12-24-2008 , 04:56   Re: Simple HUD message above your cash.
Reply With Quote #5

You said you fixed the centered thing. Like you know how theres.

This 1
This 2
And THIS 3

It's still "This 2", but w/e. I think it would be best to leave it under the radar and make the text like "This 1". This is my last request, other wise it works fine. Thank you for your help.


NestleMilo is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 12-24-2008 , 10:15   Re: Simple HUD message above your cash.
Reply With Quote #6

new i = 0

And then < num not <= num
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
mando127
Veteran Member
Join Date: Dec 2006
Location: virginia
Old 12-24-2008 , 10:39   Re: Simple HUD message above your cash.
Reply With Quote #7

Quote:
new i = 0

And then < num not <= num

lolz ?
__________________
mando127 is offline
Send a message via Skype™ to mando127
IneedHelp
Veteran Member
Join Date: Mar 2007
Location: Argentina
Old 12-24-2008 , 11:08   Re: Simple HUD message above your cash.
Reply With Quote #8

That centered thing is because I put -->

Website^nPlayers: %d^nCTs: %d^nTs: %d^nAdmins: %d^nWebsite

So you see it like -->

Website
Players
CTs
Ts
Admins
__________________
IneedHelp is offline
NestleMilo
BANNED
Join Date: May 2008
Location: http://zombieplague.org
Old 12-24-2008 , 17:23   Re: Simple HUD message above your cash.
Reply With Quote #9

Yes under the radar.
NestleMilo 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 17:48.


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