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

[NEW*] Show Admin Online


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
Narcos
Junior Member
Join Date: Nov 2017
Location: Germany
Old 03-06-2018 , 13:07   [NEW*] Show Admin Online
Reply With Quote #1

Show Admins Online
Version 1.3


Description:
This Plugin Shows How Many Admins Are Online And Their Names
Via Hud Msg.
The Position Of Hud Msg Can Be Changed Via Cvars Also
The Colors Can Be Changed For Online Msg And Offline Msg.



Cvars:
sa_plugin_on "1" -> Turn Admin Show On/Off
sa_online_color "0 130 0" -> When Admin Online Is Default Color Green
sa_offline_color "255 0 0" -> When No Admin On Server Default Color Red
sa_msg_xypos "0.02 0.2" -> Hud Msg Position Currently On Left Side


If You Want To Have The Hud Msg On Right Side Set Cvar sa_msg_xypos "0.8 0.2"

Original Plugin:

vato loco [GE-S]
Alka


Edited Plugin:

*Narcos*


Added:
PHP Code:
If You Connected To Server Not Showed To Admins Online:

For 
Showed Say /showme For Showed In Admin Online
For Hidden Say /hideme For Hidden Of Admin Online 
I'm Sorry For My Bad English

Thank You !!
Attached Files
File Type: sma Get Plugin or Get Source (New-Show_Admin_Online.sma - 433 views - 3.9 KB)

Last edited by Narcos; 03-06-2018 at 13:08.
Narcos is offline
1xAero
Member
Join Date: Feb 2018
Location: Sakha, Russia
Old 03-06-2018 , 23:12   Re: [NEW*] Show Admin Online
Reply With Quote #2

Code:
	register_think(g_ClassName,"ForwardThink")
	
	new iEnt = create_entity("info_target")
	entity_set_string(iEnt, EV_SZ_classname, g_ClassName)
	entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
Facepalm
1xAero is offline
Old 03-09-2018, 08:05
D3XT3R
This message has been deleted by asherkin. Reason: Image macro reply
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 03-10-2018 , 12:31   Re: [NEW*] Show Admin Online
Reply With Quote #3

Quote:
Originally Posted by 1xAero View Post
Code:
	register_think(g_ClassName,"ForwardThink")
	
	new iEnt = create_entity("info_target")
	entity_set_string(iEnt, EV_SZ_classname, g_ClassName)
	entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
Facepalm
This is way better than using a set_task() function. Because it uses less resources. Jokes on you
__________________
retired chump
DjSoftero is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 03-10-2018 , 13:53   Re: [NEW*] Show Admin Online
Reply With Quote #4

Quote:
Originally Posted by DjSoftero View Post
This is way better than using a set_task() function. Because it uses less resources. Jokes on you
That is... unlikely.
__________________
asherkin is offline
tarsisd2
Veteran Member
Join Date: Feb 2016
Location: brazil
Old 03-25-2018 , 22:53   Re: [NEW*] Show Admin Online
Reply With Quote #5

2018 and this is new? this has been around for decades
tarsisd2 is offline
marcelowzd
Senior Member
Join Date: Feb 2011
Location: São Paulo, Brazil
Old 03-28-2018 , 20:24   Re: [NEW*] Show Admin Online
Reply With Quote #6

Quote:
Originally Posted by asherkin View Post
That is... unlikely.
There is a tutorial saying that here: https://forums.alliedmods.net/showthread.php?t=43049

"One of the less practiced ways of avoiding set_tasks is to spawn an entity, set its nextthink to whatever you want, and register_think/FM_Think it. But when is this necessary? Pretty much whenever you use the "b" flag in set_task, it's better to use this method"

Not saying it is right, but that's where this idea came from.
__________________
marcelowzd is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-19-2018 , 09:38   Re: [NEW*] Show Admin Online
Reply With Quote #7

Quote:
Originally Posted by marcelowzd View Post
There is a tutorial saying that here: https://forums.alliedmods.net/showthread.php?t=43049

"One of the less practiced ways of avoiding set_tasks is to spawn an entity, set its nextthink to whatever you want, and register_think/FM_Think it. But when is this necessary? Pretty much whenever you use the "b" flag in set_task, it's better to use this method"

Not saying it is right, but that's where this idea came from.
That's not true tho. Pretty much the only moment when it makes sense to use a thinking entity is when you need repeat times smaller than 0.1

Adding 2 commands do not make the plugin different enough to be approved.
__________________
HamletEagle 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 14:14.


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