Here, it's the whole cmdvipmenu, don't know what's wrong :/
PHP Code:
public cmdvipmenu(id)
{
if ( is_user_alive(id) )
{
if (get_user_flags(id) & ADMIN_LEVEL_H) //Checks if player has flag H
{
if ( CurrentRound < menu_round )
{
client_print( id, print_center, "%L", id, "VIP_MENU_ROUND" ); //Sends a message that VIP can use VIP menu only from specific round
}
if ( map_active == 1 ) //Checks if map_active is 1
{
if( g_bCurrentMapIsInList ) //Checks if current map is in mapnames list
{
client_print( id, print_center, "%L", id, "VIP_MENU_WRONG_MAP" ); //Sends a message that VIP can't use VIP menu on that map
}
}
if ( gMenuUsed[id] == menu_uses )
{
client_print( id, print_center, "%L", id, "VIP_MENU_PER_ROUND", menu_uses ); //Message that VIP can only take VIP menu few time that is set as VIPUsed
}
if ( !g_freezetime && is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H ) //Checks if freezetime is not over yet and if user is alive and he has flag H
{
client_print( id, print_center, "%L", id, "VIP_MENU_ONLY_FROM_ROUND_START" ); //Message that's set in vipplugin.txt as VIP_MENU_ONLY_FROM_ROUND_START
}
if(g_freezetime) //Checks if freezetime is over
{
if ( gMenuUsed[id] <= menu_uses ) //Checks if VIP has already used VIP menu before, the amount of times we set as VIPUsed
{
if( CurrentRound >= menu_round ) //Checks if current round is more or equal to the round that is set as VIPMenuRound
{
if (!get_pcvar_num(g_menu_active)) //Checks if g_menu_active is disactivated (set to 0)
return PLUGIN_CONTINUE //If so, VIP won't get VIP menu
Showrod(id) //Shows VIP menu
}
}
}
}
if (!(get_user_flags(id) & ADMIN_LEVEL_H)) //Checks if user doesn't has flag H
{
set_task(0.1, "PrintText" ,id) //Sets a task in 0.1 seconds and starts PrintTect
}
}
if ( !is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H ) //Checks if user is death and he has admin flag H
{
client_print( id, print_center, "%L", id, "VIP_MENU_MUST_BE_ALIVE" ); //Sends a message that VIP must be alive to use VIP menu
}
if (!is_user_alive(id) && !(get_user_flags(id) & ADMIN_LEVEL_H)) //Checks if user doesn't has flag H
{
set_task(0.1, "PrintText" ,id) //Sets a task in 0.1 seconds and starts PrintTect
}
return PLUGIN_HANDLED;
}