Arkshine, thanks. Thats what I needed. And the other question:
is it possible to make that the hud or dhud message would not disappear after sv_restartround 1 ?
By the way, could someone help me to make a say command with which I can change map ? its like:
PHP Code:
register_clcmd("say ", "hook_say")
public hook_say(id)
{
if(get_user_flags(id) & ADMIN_LEVEL_H)
{
new szArg1[32];
read_argv(1, szArg1, charsmax(szArg1))
if(equali(szArg1, "!map") != -1)
{
read_argv(2, szArg1, charsmax(szArg1))
if(ValidMap(szArg1))
{
client_printc(0, "!g[ CLAN MATCH ]!n Switching map to %s", szArg1)
set_task(5.0, "NextMap", 555 ,szArg1)
}
else
{
client_printc(id, "!g[ CLAN MATCH ]!n There is no such map %s", szArg1)
}
}
}
return PLUGIN_CONTINUE;
}
public NextMap(MapName[])
{
server_cmd("changelevel %s", MapName)
}
stock bool:ValidMap(mapname[])
{
if ( is_map_valid(mapname) )
{
return true;
}
new len = strlen(mapname) - 4;
if (len < 0)
{
return false;
}
if ( equali(mapname[len], ".bsp") )
{
mapname[len] = '^0';
if ( is_map_valid(mapname) )
{
return true;
}
}
return false;
}
And it's not working, It has many bugs that I can't fix myself
It always says there is no such map, and sometimes it randomly says it, even if I did not wanted to change map