Raised This Month: $ Target: $400
 0% 

HUD message above head


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
scrtxxcaz
Senior Member
Join Date: Feb 2007
Location: a place u cant find
Old 04-22-2007 , 01:24   HUD message above head
Reply With Quote #1

how would i go about putting a HUD message right above a person's head. For example if i was aiming at them ... a HUD message would appear directly above that persons head saying something

would i use this ??
Code:
register_event("StatusValue","whatever","be","1=2")
__________________
Please leave your name when giving me any karma

Counter Strike Freeze Tag
Status: Testing.... (bugs)

Revised Registration
Status: In Progress

Last edited by scrtxxcaz; 04-22-2007 at 01:28.
scrtxxcaz is offline
Send a message via AIM to scrtxxcaz
Styles
Veteran Member
Join Date: Jul 2004
Location: California
Old 04-22-2007 , 01:43   Re: HUD message above head
Reply With Quote #2

Well Harbu's code to do it is:

set_task(1.0,"playerlook",0,"",0,"b")

set_hudmessage(100,52,0,-1.0,0.4,0,0.0,20.9,0.0,0.0,2) ( OVER THE HEAD !! )

Code:
	new num, players[32]
	get_players(players,num,"ac")
	for( new i = 0;  i < num; i++ )
	{
		new origin[3]
		get_user_origin(players[i],origin)
		new tid, body 
		get_user_aiming( players[i], tid, body, 50)
		
		if(is_user_connected(tid))
		{
			new authid[32] 
			new query[256] 
			get_user_authid( tid, authid, 31) 
			format( query, 255, "SELECT JobID FROM money WHERE steamid='%s'", authid) 
			result = dbi_query(dbc,query) 
			if( dbi_nextrow( result ) > 0 )
			{ 
				new job[32], JobID
				dbi_field( result, 1, job, 31) 
				dbi_free_result(result)
				JobID = str_to_num(job)
				format( query, 255, "SELECT JobName FROM jobs WHERE JobID=%i", JobID)
				result = dbi_query(dbc,query)
				if( dbi_nextrow( result ) > 0 )
				{
					dbi_field(result,1,job,31)
					dbi_free_result(result)
					set_hudmessage(100,52,0,-1.0,0.4,0,0.0,20.9,0.0,0.0,2) 
					show_hudmessage(players[i],"Job: %s",job)
				}
				dbi_free_result(result)
			} 
			dbi_free_result(result)
		}
** Copy and pasted from Harbu's code **
Styles is offline
Send a message via AIM to Styles
scrtxxcaz
Senior Member
Join Date: Feb 2007
Location: a place u cant find
Old 04-22-2007 , 02:03   Re: HUD message above head
Reply With Quote #3

i dont know why i put the register_event in there... thank you ima test it tomor
__________________
Please leave your name when giving me any karma

Counter Strike Freeze Tag
Status: Testing.... (bugs)

Revised Registration
Status: In Progress
scrtxxcaz is offline
Send a message via AIM to scrtxxcaz
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:44.


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