I've already asked how to read from a file, but I fail when I try to read from multiple files in the same plugin. I will comment in php code. I would appreciate if someone could do it for me. I will give more information if it's needed.
PHP Code:
new const mapnames[][] =
{
"awp_", "cs_deagle", "knf_", "1hp_", "aim_", "fy_" //Maps in which vipmenu can't be used
}
new const awpmapnames[][] =
{
"2x2", "3x3", "4x4", "cs_max", "aim" //Maps in which awp choise won't show up
}
<...>
get_mapname( szMap , charsmax( szMap ) );
for( new i = 0 ; i < sizeof( mapnames ) ; i++ )
{
if ( containi( szMap , mapnames[ i ] ) !=-1 ) //Checks if map is the one mentioned in const mapnames
{
client_print(id, print_center, "VIP meniu sitame zemelapyje neveikia!") //Sends a message that VIP can't use VIP menu on that map
}
}
<...>
get_mapname( szMap , charsmax( szMap ) );
for( new i = 0 ; i < sizeof( mapnames ) ; i++ )
{
if ( containi( szMap , mapnames[ i ] ) !=-1 ) //Checks if map is the one mentioned in const mapnames
return;
}
<...>
get_mapname( szMap , charsmax( szMap ) );
for( new i = 0 ; i < sizeof( mapnames ) ; i++ )
{
if ( containi( szMap , mapnames[ i ] ) !=-1 ) //Checks if map is the one mentioned in const mapnames
{
client_print(id, print_center, "VIP meniu sitame zemelapyje neveikia!") //Sends a message that VIP can't use VIP menu on that map
}
if ( containi( szMap , mapnames[ i ] ) !=-1 ) //Checks if map is the one mentioned in const mapnames
return; //Stop VIP from getting the VIP menu
}
<...>
for( new i = 0 ; i < sizeof( awpmapnames ) ; i++ )
{
if ( containi(szMap , awpmapnames[ i ]) !=-1 )
{
bAwpMap = true
break
}
}