User can change map ;-) but i need help
Code:
#include <amxmodx>
#include <amxmisc>
new minimumwait=1
public cm(id) {
new timeleft = get_timeleft()
new ziom[32]
get_user_name(id,ziom,31)
new Float:minutesleft=float(timeleft)/60.0
new Float:currentlimit=get_cvar_float("mp_timelimit")
new Float:minutesplayed=currentlimit-minutesleft
new wait
wait=minimumwait
if (get_playersnum() > 2)
{
return PLUGIN_CONTINUE
}
if((minutesplayed+0.5)<(float(wait)))
{
if(float(wait)-0.5-minutesplayed>0.0)
client_print(id,print_chat,"%s, You must wait %d min",
ziom,(floatround(float(wait)+0.5-minutesplayed)>0)?(floatround(float(wait)+0.5-minutesplayed)):(1))
else
client_print(id,print_chat,"Less than 60 sec")
if ((get_user_flags(id)&ADMIN_MAP))
console_print(id,"%s, You are admin ;-)",ziom)
return PLUGIN_CONTINUE
}
server_cmd("amx_map de_dust2")
return PLUGIN_CONTINUE
}
public plugin_init() {
register_plugin("changemaps by user","0.1beta","Grifter")
register_clcmd("say /changemap","cm",0,"- changemap to de_dust2")
}
i wrote this, some code are from deagsmapmanage230b ;-)
and everything work, but i dont know how to do something like that:
say /changemap map_name
so user can change to any map not only one map defined on source ;-)
|