AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   [NEW*] Show Admin Online (https://forums.alliedmods.net/showthread.php?t=305839)

Narcos 03-06-2018 13:07

[NEW*] Show Admin Online
 
1 Attachment(s)
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 !! :D

1xAero 03-06-2018 23:12

Re: [NEW*] Show Admin Online
 
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

DjSoftero 03-10-2018 12:31

Re: [NEW*] Show Admin Online
 
Quote:

Originally Posted by 1xAero (Post 2581712)
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

asherkin 03-10-2018 13:53

Re: [NEW*] Show Admin Online
 
Quote:

Originally Posted by DjSoftero (Post 2582292)
This is way better than using a set_task() function. Because it uses less resources. Jokes on you

That is... unlikely.

tarsisd2 03-25-2018 22:53

Re: [NEW*] Show Admin Online
 
2018 and this is new? this has been around for decades

marcelowzd 03-28-2018 20:24

Re: [NEW*] Show Admin Online
 
Quote:

Originally Posted by asherkin (Post 2582309)
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.

HamletEagle 09-19-2018 09:38

Re: [NEW*] Show Admin Online
 
Quote:

Originally Posted by marcelowzd (Post 2585095)
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.


All times are GMT -4. The time now is 20:20.

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