not work, in changed map players connectad...
PHP Code:
#include <amxmodx>
#if !defined client_disconnected
#define client_disconnected client_disconnect
#endif
new g_pPlayersNeeded
new g_pChangeTo
new g_iPlayerCount
public plugin_init()
{
register_plugin("changed to fy_pool_day", "1.0", "OciXCrom")
g_pPlayersNeeded = register_cvar("change_players_needed", "1")
g_pChangeTo = register_cvar("change_to_map", "fy_pool_day")
}
public plugin_cfg()
{
new szCurrentMap[32], szChangeTo[32]
get_mapname(szCurrentMap, charsmax(szCurrentMap))
get_pcvar_string(g_pChangeTo, szChangeTo, charsmax(szChangeTo))
if(equali(szCurrentMap, szChangeTo))
{
pause("d")
}
}
public client_putinserver(id)
{
if(++g_iPlayerCount <= get_pcvar_num(g_pPlayersNeeded))
{
new szMap[32]
get_pcvar_string(g_pChangeTo, szMap, charsmax(szMap))
#if defined engine_changelevel
engine_changelevel(szMap)
#else
server_cmd("changelevel %s", szMap)
#endif
}
}
public client_disconnected(id)
{
g_iPlayerCount--
}
when changing the map it shows the number of players and changes the map again before starting, so this plugin does not work.
it does not allow the map if any other than fy_pool_day
__________________