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

About HUD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AwesomeMan
Member
Join Date: Jun 2013
Old 07-24-2013 , 18:19   About HUD
Reply With Quote #1

Hey, so im working on a plugin with xp and things like that, have the xp system working etc...
but im facing a problem, iwant a hud message that stays all the time and doesnt dissapear.
This is what i have tried:
Code:
public showallhud()
{
	set_hudmessage(255, 255, 255, 0.02, 0.92, 0, 6.0, 12.0, 0.01, 0.01, 23)
	new players[32], pnum, tempid;
	get_players( players, pnum );
	for ( new i; i < pnum; i++ )
	{
		tempid = players[i];
		ShowSyncHudMsg(tempid, hud, "Suspect: #%d -- HP: %d^nXP: %i", tempid, get_user_health(tempid), PlayerXP[tempid])
		}
		
	}
	set_task(5.0,"showallhud")
}
However, it does dissapear, appear again many times and i just want it to stay all the time but only XP to change. Any ideas?
AwesomeMan is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 07-24-2013 , 23:01   Re: About HUD
Reply With Quote #2

PHP Code:
set_task(0.1,"showallhud"
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
DWIGHTpN
Senior Member
Join Date: Jan 2013
Location: Romania.
Old 07-25-2013 , 04:29   Re: About HUD
Reply With Quote #3

new -> static
Code:
set_hudmessage(255, 255, 255, 0.02, 0.92, 0, 6.0, 12.0, 0.01, 0.01, 23)
->
Code:
set_hudmessage(255, 255, 255, 0.02, 0.92, 0, 6.0, 1.0, 0.01, 0.01, 4)
Max channel is 4 (or -1) not 23.


Code:
for(new i;i < pnum;i++ )
->
Code:
for(new i = 0;i < pnum;i++ )

PHP Code:
public plugin_init()
{
        
//code..
        
set_task1.0"showallhud"12321__"b" );
}

public 
showallhud() {    
         
set_hudmessage(2552552550.020.9206.01.00.010.014)     
         static 
players[32], pnumtempid;     
         
get_playersplayerspnum );     
         for ( new 
0pnumi++ )     {         
                
tempid players[i];         
                
ShowSyncHudMsg(tempidhud"Suspect: #%d -- HP: %d^nXP: %i"tempidget_user_health(tempid), PlayerXP[tempid])
          }


Last edited by DWIGHTpN; 07-25-2013 at 04:34.
DWIGHTpN is offline
AwesomeMan
Member
Join Date: Jun 2013
Old 07-25-2013 , 05:28   Re: About HUD
Reply With Quote #4

Quote:
Originally Posted by DWIGHTpN View Post
new -> static
Code:
set_hudmessage(255, 255, 255, 0.02, 0.92, 0, 6.0, 12.0, 0.01, 0.01, 23)
->
Code:
set_hudmessage(255, 255, 255, 0.02, 0.92, 0, 6.0, 1.0, 0.01, 0.01, 4)
Max channel is 4 (or -1) not 23.


Code:
for(new i;i < pnum;i++ )
->
Code:
for(new i = 0;i < pnum;i++ )

PHP Code:
public plugin_init()
{
        
//code..
        
set_task1.0"showallhud"12321__"b" );
}

public 
showallhud() {    
         
set_hudmessage(2552552550.020.9206.01.00.010.014)     
         static 
players[32], pnumtempid;     
         
get_playersplayerspnum );     
         for ( new 
0pnumi++ )     {         
                
tempid players[i];         
                
ShowSyncHudMsg(tempidhud"Suspect: #%d -- HP: %d^nXP: %i"tempidget_user_health(tempid), PlayerXP[tempid])
          }

Cheers! That works really great
Thanks!
AwesomeMan 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 23:55.


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