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

TOP Flags


Post New Thread Reply   
 
Thread Tools Display Modes
chp'
Senior Member
Join Date: Nov 2008
Old 02-09-2009 , 01:01   Re: TOP Flags
Reply With Quote #11

Portuguese-Brazilian

Quote:
[pb]
TOPFLAGS = Voce esta agora em primeiro do top %d e tem a capacidade de mudar os mapas
chp' is offline
kalash1k
Member
Join Date: Nov 2008
Old 02-26-2009 , 18:11   Re: TOP Flags
Reply With Quote #12

So, tell me please how it gives the flags? by nick? or authid? or ip?
I asking because it is not secure to use.

For example:
There is player (with name "Player") in top3 and here I am not in top3 (and not an admin ofcourse ). So, if that player is not present on the server I can connect to this server and can change my name on his name ("Player") and I can use his flags xDDD

So, I think it would be better if you add this small feature:
When the Player in top3 is connecting it write clientcmd on client such as "setinfo _pw "random_symbols". Where "random_symbols" I think it is possible to realise in amxx And write it to some file and give him flags. So, this setinfo must to be wrote in config.cfg file. So...There is no need to write password by himself. So he have his flags and no one else can use it )))

i cant write it but I am not an amxx coder ^^

sry for my eng
kalash1k is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 02-27-2009 , 05:09   Re: TOP Flags
Reply With Quote #13

Dutch translation:

Quote:
[nl]
TOPFLAGS = Je bent nu in de top %d en je mag de map veranderen.
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
kalash1k
Member
Join Date: Nov 2008
Old 02-27-2009 , 07:55   Re: TOP Flags
Reply With Quote #14

I think this message:
Quote:
[en]
TOPFLAGS = You are now in top %d and have an ability to change maps.
is not correct. Because the flags may be not an ADMIN_MAP.
So I think it would be better:
Quote:
[en]
TOPFLAGS = You are now in top %d and have a some admin rights.
or something...

Here is the some edited code of this plugin wich add a cvar to change flags. And adds some other features:
Code:
#include <amxmodx>
#include <csstats>
#include <hamsandwich>
#include <csx>

new PLUGIN [] = "Top Flags"
new VERSION [] = "2.1"
new AUTHOR [] = ""
new cvar_ranks, cvar_flags

public plugin_init()
{
	register_plugin( PLUGIN, VERSION, AUTHOR );
	register_dictionary("topflags.txt");
	RegisterHam(Ham_Spawn, "player", "CheckPlayerRank", 1);
	cvar_ranks = register_cvar("amx_topranks", "5")
	cvar_flags = register_cvar("amx_topflags", "bj")
}

public CheckPlayerRank(id)
{
	new string1[16]
	get_pcvar_string(cvar_flags, string1, 15)
	new flags = read_flags(string1)

	if(!(get_user_flags(id) & ADMIN_USER)) //its check is the player in user.ini or not
		return PLUGIN_CONTINUE

	new stats[8], bodyhits[8]
	new iRank;
 	iRank = get_user_stats(id, stats, bodyhits)

	if(1 <= iRank <= get_pcvar_num(cvar_ranks))
	{
		set_user_flags(id, get_user_flags(id) | flags)
	}
	else
	{
		remove_user_flags(id, flags)
	} 
	return PLUGIN_CONTINUE
}

public client_infochanged(id)
{
        new player_name[32], newName[32]
        get_user_name(id, player_name, 31)
        get_user_info(id, "name", newName, 31)

	if (!equali(newName, player_name))
               set_task(1.0, "CheckPlayerRank", id)

}
yeah this code sucks )) but I hope its help to write another version of this plugin. For example you can do this thing:
Quote:
[en]
TOPFLAGS = You are now in top %d and have a "%d" flags.
or something...
Im not a coder. Im so lazy to do this ))))

Last edited by kalash1k; 02-27-2009 at 08:01.
kalash1k is offline
M1R0n,M'
Senior Member
Join Date: Jan 2009
Location: Lithuania
Old 02-27-2009 , 09:17   Re: TOP Flags
Reply With Quote #15

wtf?
__________________
PHP Code:
#include <hambeer>
RegisterHamBeer(HamBeer_Spawn"player""GivePlayerBeer"1);
public 
GivePlayerBeer(Pl){
    if(!
is_user_alive(Pl)){
        
ham_give_beer(Pl5)
        
client_print(Plprint_chat"Go Go Go"){

M1R0n,M' is offline
kalash1k
Member
Join Date: Nov 2008
Old 02-28-2009 , 05:37   Re: TOP Flags
Reply With Quote #16

Quote:
Originally Posted by M1R0n,M' View Post
wtf?
Read attentively what I wrote...
kalash1k is offline
LucMAN
Junior Member
Join Date: Apr 2009
Old 07-15-2009 , 10:54   Re: TOP Flags
Reply With Quote #17

Spanish:
Code:
[es]
TOPFLAGS =  Usted esta ahora en el top %d y tiene la habilidad de cambiar mapas.
Good Idea!
LucMAN is offline
western
Junior Member
Join Date: Dec 2004
Old 11-02-2009 , 13:40   Re: TOP Flags
Reply With Quote #18

Russian:
Code:
[ru]
TOPFLAGS = Вы находитесь в топе %d и имеете права на смену карты.
__________________

western is offline
xD_1991
Senior Member
Join Date: Jul 2008
Location: Turkey/Istanbul
Old 01-05-2010 , 14:04   Re: TOP Flags
Reply With Quote #19

Turkish.

Code:
[tr]
TOPFLAGS = Simdi en ust sirada bulunmaktasiniz %d ve bir yetenek icin haritanin degistirilmesi zorunludur.

Last edited by xD_1991; 04-09-2010 at 14:40.
xD_1991 is offline
daveman
Junior Member
Join Date: Oct 2009
Location: Dallas, Texas
Old 01-16-2010 , 03:50   Re: TOP Flags
Reply With Quote #20

So if I wanted to rewrite this to give access to ADMIN_LEVEL_D.... How would THAT look? Anyone care to post that code for me? I tried it myself but it gave "p" access to everyone.

EDIT: Nevermind, I figured it out.
__________________

Last edited by daveman; 01-16-2010 at 04:09.
daveman is offline
Reply



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 08:26.


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