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

How to make HUD On player when we put mouse on him.


Post New Thread Reply   
 
Thread Tools Display Modes
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-28-2019 , 14:13   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #11

How do you know it doesn't work if you don't even tested it?
__________________









Last edited by CrazY.; 05-28-2019 at 14:17.
CrazY. is offline
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 05-28-2019 , 14:21   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #12

Quote:
Originally Posted by CrazY. View Post
How do you know it doesn't work if you don't even tested it?
i tested it on my server not work only 2sec then it goes
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-28-2019 , 14:28   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #13

Show the code.
__________________








CrazY. is offline
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 05-28-2019 , 14:36   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #14

Quote:
Originally Posted by CrazY. View Post
Show the code.
Code:
#include <amxmodx>

 new id2 , Body;

public plugin_init()
{
    register_event("StatusValue","Hud_Names","be","1=2","2!0");
}

public Hud_Names(id)
{
	get_user_aiming( id , id2 , Body );
	new szName[ 32 ];
	get_user_name( id2 , szName , charsmax( szName ) );
	if ( is_user_alive( id2 ) )
	{
		set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 0.5)
		show_hudmessage(id, "[%s]^n[%d]", szName,get_user_health(id2) )
	}
}
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
JocAnis
Veteran Member
Join Date: Jun 2010
Old 05-28-2019 , 14:46   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #15

i cant no more..im out...crazy. you continue with him...
__________________
KZ Public Autocup - PrimeKZ

My blog: http://primekz.xyz (in progress...) - not active (dec 2022)
JocAnis is offline
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 05-28-2019 , 14:48   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #16

Quote:
Originally Posted by JocAnis View Post
i cant no more..im out...crazy. you continue with him...
, whats wrong i tried 0.1 and all other values possible its only edit time
i dont want time i want everytime i aim on player else no hud i mean i dont want time for hud.
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 05-28-2019 , 15:08   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #17

haha

Try this
Code:
#include <amxmodx>

new g_iSyncObj;

public plugin_init()
{
	register_plugin("Aim Info", "1.0", "Author");
	register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
	register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")
	g_iSyncObj = CreateHudSyncObj();
}

public showStatus(id)
{
	//get_user_aiming( id , id2 , Body );
	new id2 = read_data(2);
	
	if ( is_user_alive( id2 ) )
	{
		new szName[ 32 ];
		get_user_name( id2 , szName , charsmax( szName ) );

		set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 0.01, 3.0, 0.01, 0.01, -1)
		ShowSyncHudMsg(id, g_iSyncObj, "[%s]^n[%d]", szName,get_user_health(id2) )
	}
}

public hideStatus(id)
{
	ClearSyncHud(id, g_iSyncObj);
}
__________________








CrazY. is offline
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 05-28-2019 , 15:20   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #18

Quote:
Originally Posted by CrazY. View Post
haha

Try this
Code:
#include <amxmodx>

new g_iSyncObj;

public plugin_init()
{
	register_plugin("Aim Info", "1.0", "Author");
	register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
	register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")
	g_iSyncObj = CreateHudSyncObj();
}

public showStatus(id)
{
	//get_user_aiming( id , id2 , Body );
	new id2 = read_data(2);
	
	if ( is_user_alive( id2 ) )
	{
		new szName[ 32 ];
		get_user_name( id2 , szName , charsmax( szName ) );

		set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 0.01, 3.0, 0.01, 0.01, -1)
		ShowSyncHudMsg(id, g_iSyncObj, "[%s]^n[%d]", szName,get_user_health(id2) )
	}
}

public hideStatus(id)
{
	ClearSyncHud(id, g_iSyncObj);
}
works but 1problem that its 5sec then it goes maybe delete time?

EDIT:thanks solved.

Last edited by husam124; 05-28-2019 at 15:27.
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-28-2019 , 15:25   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #19

You need to use a task if you want the message to show all the time.

In the "StatusValue" event store the targeted player in a global variable.
- if read_data(1) == 1, reset the targeted player to 0.
- if read_data(1) == 2, store the player index from read_data(2).

Assign a repeating task when the client connects or a global one in plugin_init and show the message only if the player has a stored target (target != 0).
__________________

Last edited by OciXCrom; 05-28-2019 at 15:26.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
husam124
BANNED
Join Date: Jul 2017
Location: Usa
Old 05-28-2019 , 15:27   Re: How to make HUD On player when we put mouse on him.
Reply With Quote #20

but how to turn off game hud info its like their is exist player stats info how to turn it off.?
husam124 is offline
Send a message via ICQ to husam124 Send a message via AIM to husam124 Send a message via Yahoo to husam124 Send a message via Skype™ to husam124
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