Raised This Month: $ Target: $400
 0% 

Need help! How to change top3 flags?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-18-2013 , 22:02   Re: Need help! How to change top3 flags?
Reply With Quote #1

I think this is what you want. Change GIVE_FLAGS to whatever you want "VIP privileges" to be.
If it's wrong, explain further what you want.
Code:
#include <amxmodx> #include <csstats> #include <hamsandwich> #define GIVE_FLAGS ADMIN_MAP new PLUGIN[] = "Top Flags" new VERSION[] = "1.1" new AUTHOR[] = "M1R0n,M'" new g_TopRank; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_dictionary("topflags.txt");     RegisterHam(Ham_Spawn, "player", "CheckPlayerRank", 1);         g_TopRank = register_cvar("amx_toprank","3"); } public CheckPlayerRank(id) {     new stats[8];     new iRank;         iRank = get_user_stats(id, stats, stats);         if( iRank && iRank <= get_pcvar_num(g_TopRank) ) {         set_user_flags(id, get_user_flags(id) | GIVE_FLAGS);         client_print(id, print_chat, "%L", id, "TOPFLAGS",get_pcvar_num(g_TopRank));     }     else {         set_user_flags(id, get_user_flags(id) &~ GIVE_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); }
__________________
Black Rose 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 16:00.


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