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

I search a plugin give access flags for top-players.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iveto69
Member
Join Date: Aug 2018
Old 08-13-2018 , 05:54   I search a plugin give access flags for top-players.
Reply With Quote #1

Hi,
I'm searching a little plugin that gives, for top-players this flags:
-players in the top100 - flag "t";
-top50 - flag "s";
-top15 - flags "sbcdeiu"

Server is DeathMatch +podbot_mm_i386.so

Don't find one,
hope that you can help me ;)

Thanks in advance
Hope

Last edited by iveto69; 08-14-2018 at 00:47.
iveto69 is offline
D4rkSiD3Rs
Senior Member
Join Date: Jan 2018
Location: Morocco
Old 08-13-2018 , 16:51   Re: I search a plugin give access flags for top-players.
Reply With Quote #2

It must be related with your ranking plugin
So post your ranking plugin so someone will help you with it.

Last edited by D4rkSiD3Rs; 08-13-2018 at 16:54.
D4rkSiD3Rs is offline
iveto69
Member
Join Date: Aug 2018
Old 08-14-2018 , 00:41   Re: I search a plugin give access flags for top-players.
Reply With Quote #3

Quote:
Originally Posted by D4rkSiD3Rs View Post
It must be related with your ranking plugin
So post your ranking plugin so someone will help you with it.
Мay be I have not expressed correctly: these flags for players are temporary... only when they are on the server , and moreover - players who are in the top, also have a flag "z".
Here's a similar code(work with all ranking plugins). Can someone rework it :

Code:
#include <amxmodx>
#include <csstats>
#include <dhudmessage>

#define IGNORE_FLAG ADMIN_LEVEL_A	/* flag "m" */

new pRanks, pFlags

public plugin_init() {
	register_plugin( "Top Awards", "0.11h", "Safety1st" )
	register_dictionary( "topawards.txt" )
	pRanks = register_cvar( "top_ranks", "10" )
	pFlags = register_cvar( "top_flags", "t" )
}

public client_putinserver(id) {
	set_task( 0.3, "CheckStats", id )	// we need to use delay otherwise we will get rank = 0
}

public CheckStats(id) {
	new iFlags = get_user_flags(id)
	new szAddFlags[16]
	get_pcvar_string( pFlags, szAddFlags, 15 )
	new iAddFlags  = read_flags(szAddFlags)

	if ( iFlags & IGNORE_FLAG || iFlags & iAddFlags == iAddFlags )
		// ignore player with IGNORE_FLAG or having all additional flags
		return

	new iRanks = get_pcvar_num(pRanks)
	if ( !iRanks )
		return

	new szStats[8], szBodyHits[8]
	new iRank = get_user_stats( id, szStats, szBodyHits )

	if ( iRank && iRank <= iRanks ) {
		// 1st check for safety. may be player not ranked at all yet
		set_user_flags( id, iFlags | iAddFlags )
		new data[2]
		data[0] = id
		data[1] = iRanks
		set_task( 5.0, "PrintMessage", _, data, 2 )
	}
}

public PrintMessage( data[2] ) {
	if ( !is_user_connected(data[0]) )
		return

	set_dhudmessage( random(200) + 25, random(200) + 25, random(200) + 25, -1.0, 0.75, 0, .fxtime = 2.0, .holdtime = 10.0 )
	show_dhudmessage( data[0], "%L", data[0], "TOP_AWARDS", data[1] )
}



Please rework it.
Thanks !!!

Last edited by iveto69; 08-15-2018 at 05:45.
iveto69 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 18:45.


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