Author
|
Message
|
Member
|
05-18-2020
, 06:03
bot votemaps
|
#1
|
// recheck
if ( is_map_valid(mapname) )
{
return true;
}
}
return false;
}
loadSettings(filename[])
{
if (!file_exists(filename))
return 0
new szText[32]
new currentMap[32]
new buff[256];
get_mapname(currentMap, charsmax(currentMap))
new fp=fopen(filename,"r");
while (!feof(fp))
{
buff[0]='^0';
szText[0]='^0';
fgets(fp, buff, charsmax(buff));
parse(buff, szText, charsmax(szText));
if (szText[0] != ';' &&
ValidMap(szText) &&
!equali(szText, g_lastMap) &&
!equali(szText, currentMap))
{
ArrayPushString(g_mapName, szText);
++g_mapNums;
}
}
fclose(fp);
return g_mapNums
}
public team_score()
{
new team[2]
read_data(1, team, charsmax(team))
g_teamScore[(team[0]=='C') ? 0 : 1] = read_data(2)
}
public plugin_end()
{
new current_map[32]
get_mapname(current_map, charsmax(current_map))
set_localinfo("lastMap", current_map)
ArrayDestroy(g_mapName)
}
[/php]
thanks for help
Last edited by chiken; 05-19-2020 at 15:42.
|
|
|
|