AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Top Awards (https://forums.alliedmods.net/showthread.php?t=228710)

Debesėlis 10-25-2013 16:21

Top Awards
 
Doesn't work. Can anyone help to fix it?


All players on top 10 must get T flag. if player is in top10 and gets flag but die many times and his rank dropped to 11 remove T flag for him.

PHP Code:

#include < amxmodx >
#include < amxmisc >
#include < csstats >
#pragma semicolon 1

new cvar_rankscvar_flags;

public 
plugin_init ( )
{
    
register_plugin"Top Awards""0.1""alliedmodders" );
    
cvar_ranks register_cvar"amx_vip_top""10");
    
cvar_flags register_cvar"amx_vip_flags""t" );
    
    
register_dictionary"topflags.txt" );
}

public 
client_authorized id )
{
    new 
stats], bodyhits], string116 ], string216 ];
    
get_pcvar_stringcvar_flagsstring115 );
    
get_pcvar_stringcvar_ranksstring215 );
    new 
iRank get_user_statsidstatsbodyhits );
    new 
flags read_flagsstring1 );
    new 
ranks str_to_numstring2 );
    
    new 
old_flags get_user_flagsid );
  
    if ( 
old_flags ADMIN_MENU )
        return;
    
    else
    {
        if ( 
<= iRank <= ranks )
        {
            
print_colorid"%L"LANG_SERVER"VIP_WIN" );
            
set_user_flagsidold_flags flags );
        }
        else
            
remove_user_flagsidflags );
    }




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

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