Raised This Month: $7 Target: $400
 1% 

Constant Hud show


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheBladerX
Member
Join Date: Dec 2012
Location: Slovakia
Old 02-18-2018 , 08:55   Constant Hud show
Reply With Quote #1

Hello, how can I make this plugin https://forums.alliedmods.net/showthread.php?t=231230 that it is going to show level and exp in the top left corner constantly? Thank you.

Last edited by TheBladerX; 02-18-2018 at 08:56.
TheBladerX is offline
TheBladerX
Member
Join Date: Dec 2012
Location: Slovakia
Old 02-18-2018 , 09:00   Re: Constant Hud show
Reply With Quote #2

Oh well, it was not that hard

Code:
public FwdPlayerSpawn( id )
{
	ExecuteForward( Forward_spawn, ForwardReturn, id, iLevel[id], iXp[id] );
	set_hudmessage(0, 255, 0, 0.01, 0.17, 0, 6.0)
	show_hudmessage(id, "Level : %i^nEXP: %i", iLevel[id], iXp[id] );
}
but how do i make it that it shows every time i respawn? it only does when i respawn for first time.

Last edited by TheBladerX; 02-18-2018 at 09:02.
TheBladerX is offline
E1_531G
Senior Member
Join Date: Dec 2017
Old 02-18-2018 , 13:06   Re: Constant Hud show
Reply With Quote #3

Add your own spawn hook. Ham_Spawn from Hamsandwich module.
__________________
My English is A0
E1_531G is offline
TheBladerX
Member
Join Date: Dec 2012
Location: Slovakia
Old 02-20-2018 , 16:00   Re: Constant Hud show
Reply With Quote #4

Easy to say
TheBladerX is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-20-2018 , 17:58   Re: Constant Hud show
Reply With Quote #5

Code:
RegisterHamPlayer(Ham_Spawn, "callbacked", 1) public callbacked(id) set_task(1.0 "callbackeded", id, _, _, "b"); public client_death(id) remove_task(id); public callbackeded(id){     set_hudmessage(0, 255, 0, 0.01, 0.17, 0, 1.0)     show_hudmessage(id, "Level : %i^nEXP: %i", iLevel[id], iXp[id]) }
__________________
Relaxing is offline
TheBladerX
Member
Join Date: Dec 2012
Location: Slovakia
Old 02-20-2018 , 19:14   Re: Constant Hud show
Reply With Quote #6

Error: Undefined symbol "RegisterHamPlayer" on line 477
TheBladerX is offline
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 02-21-2018 , 07:47   Re: Constant Hud show
Reply With Quote #7

Include hamsandwich library
__________________
Relaxing is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 02-21-2018 , 09:13   Re: Constant Hud show
Reply With Quote #8

Quote:
Originally Posted by Relaxing View Post
Include hamsandwich library
It only exists in 1.8.3, the OP might not have it.

Use this instead:
PHP Code:
RegisterHam(Ham_Spawn"player""callbacked"1); 
__________________

Last edited by klippy; 02-21-2018 at 09:13.
klippy is offline
Reply


Thread Tools
Display Modes

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 01:30.


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