Raised This Month: $52 Target: $400
 13% 

Top Flags [22/05/2019]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-29-2018 , 18:43   Top Flags [22/05/2019]
Reply With Quote #1

Public Info:

Tired of getting edit users.ini to give the VIP to your server's TOP? Let me tell you a secret ..

With this plugin will you automatically give TOP rank players the flags that you decide and know best? No need to edit anything on the server !! And if the player leaves the TOPS ranking, it will also automatically remove the flags;)

Good for the 4fun / 32 slots servers, so the top15 automatically receives the flag, which helps the server to get full, by the top15 dispute.

Servers Using this plugin:

Here o/.

Requirements:

* CS mod
* AMXX >= 1.9
* Compile locally

All cvars:

* tf_ranks "x" ~> Range of players that will receive the flags based on rank. (Top 1, 2, 5, 10, 15 etc
* tf_flags "x"~> The flags that TOP players will receive.
* tf_restricted "x"~> Players with any of the flags set there will be ignored.
* tf_days_toreset "x" ~> Set an interval in days for resetting cs stats.
* tf_rank_reset "x" ~> A simple way to choose if you wanna reset your rank or not

Pay close attention!!
If you do not want to reset your rank, leave the "tf_rank_reset 0" on Topflags.cfg (amxmodx/configs/plugins/)
The .cfg file will be created on the first boot of the plugin.


Obs:

~> I was not going to post the plugin because it is very simple and has a good variation of it in allied itself .. but as I did not find one that worked I decided to post it .. Thanks to Natsheh and edon1337 for the help in fixing some initial problems.

Update history:

Spoiler


Final considerations:

Thanks for the notes and support Ocix, Bugsy and edon1337.
Attached Files
File Type: sma Get Plugin or Get Source (TopFlags.sma - 62 views - 4.0 KB)

Last edited by iceeedr; 05-23-2019 at 11:29.
iceeedr is offline
Send a message via Skype™ to iceeedr
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 08-29-2018 , 20:21   Re: Top Flags [29/08/2018]
Reply With Quote #2

You forgot to upload the script also you should make it compatible with amx v182 since its the official stabled.
__________________
@Jailbreak MOD [Alot of features + API] 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-29-2018 , 20:54   Re: Top Flags [29/08/2018]
Reply With Quote #3

Quote:
Originally Posted by Natsheh View Post
You forgot to upload the script also you should make it compatible with amx v182 since its the official stabled.
Oops I did not realize, probably the internet bugged. Thanks for the warning, I will make it compatible with the stable version.
iceeedr is offline
Send a message via Skype™ to iceeedr
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 08-30-2018 , 06:57   Re: Top Flags [29/08/2018]
Reply With Quote #4

I think you should use is_user_admin instead of caching it's value on client_putinserver, you never know what admin system the user is going to use, for example I made one that updates admin list every second.
__________________
Knife Bounty
CS Battle Royale (PUBG)
Contact/Ticket System
Elite Admin System (A better admin system)

I don't sip the lean, used to love codeine cuz I love to dream
edon1337 is online now
Send a message via Skype™ to edon1337
Old 08-30-2018, 07:14
xopoIIIuu
This message has been deleted by asherkin.
Old 08-30-2018, 07:23
edon1337
This message has been deleted by asherkin.
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 08-30-2018 , 07:36   Re: Top Flags [29/08/2018]
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
What makes you think speaking in a foreign language makes you look any smart?

As of Google Translate:
-

Because I didn't like the idea of waiting an entire map for admin list to reload.
Every heard of amx_reloadadmins cmd or you can even read the user.ini file everytime some1 connects instead of reading the file in plugin init.
__________________
@Jailbreak MOD [Alot of features + API] 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 08-30-2018 , 07:39   Re: Top Flags [29/08/2018]
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
Every heard of amx_reloadadmins cmd or you can even read the user.ini file everytime some1 connects instead of reading the file in plugin init.
Well Sherlock, amx_reloadadmins is not called automatically and by default the file reading is done in plugin_init.
__________________
Knife Bounty
CS Battle Royale (PUBG)
Contact/Ticket System
Elite Admin System (A better admin system)

I don't sip the lean, used to love codeine cuz I love to dream
edon1337 is online now
Send a message via Skype™ to edon1337
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 08-30-2018 , 07:56   Re: Top Flags [29/08/2018]
Reply With Quote #7

Quote:
Originally Posted by edon1337 View Post
Well Sherlock, amx_reloadadmins is not called automatically and by default the file reading is done in plugin_init.
Iknow thats why you can call it on each player connects
Rather than setting a task to be executed each second,

File reading Thats what im telling you about you can change it to client putin or other
__________________
@Jailbreak MOD [Alot of features + API] 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 08-30-2018 , 08:01   Re: Top Flags [29/08/2018]
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
Iknow thats why you can call it on each player connects
Rather than setting a task to be executed each second,
We're not here to discuss about the example I gave, I know there's better ways, it was just an example.

What I'm pointing at is, if someone connects to a server and he isn't an admin, isAdmin bool gets ticked false for him, and later on, he receives admin, isAdmin still remains false for him, that's why he should use is_user_admin instead of caching the value.
__________________
Knife Bounty
CS Battle Royale (PUBG)
Contact/Ticket System
Elite Admin System (A better admin system)

I don't sip the lean, used to love codeine cuz I love to dream

Last edited by edon1337; 08-30-2018 at 08:02.
edon1337 is online now
Send a message via Skype™ to edon1337
Natsheh
Veteran Member
Join Date: Sep 2012
Location: Muslim and proud!
Old 08-30-2018 , 08:11   Re: Top Flags [29/08/2018]
Reply With Quote #9

Quote:
Originally Posted by edon1337 View Post
We're not here to discuss about the example I gave, I know there's better ways, it was just an example.

What I'm pointing at is, if someone connects to a server and he isn't an admin, isAdmin bool gets ticked false for him, and later on, he receives admin, isAdmin still remains false for him, that's why he should use is_user_admin instead of caching the value.
You do make point, but he should never check if the user is admin, some admins might have not those flags and be in the top list, so they won't be able to gain them.
__________________
@Jailbreak MOD [Alot of features + API] 100% done !
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Last edited by Natsheh; 08-30-2018 at 08:12.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-30-2018 , 08:33   Re: Top Flags [29/08/2018]
Reply With Quote #10

Quote:
Originally Posted by Natsheh View Post
You do make point, but he should never check if the user is admin, some admins might have not those flags and be in the top list, so they won't be able to gain them.
Exactly, the idea is that Admins do not receive the designated flags, because they would be flags that they supposedly already would have, being only flags used for players that will win the Vip, saving the value in the putinserver I conserve only the Admins that already have the flags in the users.ini, as well explained by you, but I am open to ideas.
iceeedr is offline
Send a message via Skype™ to iceeedr
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 10:48.


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