EDITED!!!!
Got it working with vip menu, but still it doesn't give grenades on that map if g_map_active is 0... I did the same as this:
PHP Code:
public Showrod(id)
{
get_mapname( szMap , charsmax( szMap ) );
map_active = get_pcvar_num (g_map_active)
if (map_active == 1)
{
for( new i = 0 ; i < sizeof( mapnames ) ; i++ )
{
if ( containi( szMap , mapnames[ i ] ) !=-1 )
return;
}
}
new menu = menu_create("\rVIP meniu:", "Pressedrod");
menu_additem(menu, "\yM4A1 su Deagle", "1", 0);
menu_additem(menu, "\yAK47 su Deagle", "2", 0);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
}
And this: But this doesn't work...
PHP Code:
public fwHamPlayerSpawnPost(id)
{
VIPMenuUsed=0;
get_mapname( szMap , charsmax( szMap ) );
map_active = get_pcvar_num (g_map_active)
if (map_active == 1)
{
for( new i = 0 ; i < sizeof( mapnames ) ; i++ )
{
if ( containi( szMap , mapnames[ i ] ) !=-1 )
return;
}
}
if(is_user_alive(id) && get_user_flags(id) & ADMIN_LEVEL_H)
{
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_smokegrenade");
give_item(id, "item_assaultsuit");
if(g_bHasBombSite && cs_get_user_team(id) == CS_TEAM_CT)
{
cs_set_user_defuse(id, 1);
}
}
}