thx i allready did it with another way but i have a problem with the menu taht i have done
Code:
/* AMXMOD X script.
*
* (c) Copyright 2007 Qlim4X
* This file is provided as is (no warranties).
*
* For #Pro.Gather in GrNet. Internal use only.
*
*/
#include <amxmodx>
#include <amxmisc>
public pro_gg(id,level,cid)
{
if (!cmd_access(id,level,cid,0))
{
return PLUGIN_CONTINUE
}
set_task(0.5, "sh0")
set_task(1.0, "gg")
set_task(1.5, "sh2")
set_task(2.0, "setpassword")
client_cmd(id,"pro_kickall")
return PLUGIN_HANDLED
}
public gg()
{
server_cmd("amx_say The Game Is Over GG !!!")
server_cmd("amx_say The Game Is Over GG !!!")
server_cmd("amx_say The Game Is Over GG !!!")
server_cmd("amx_say The Game Is Over GG !!!")
server_cmd("amx_say The Game Is Over GG !!!")
server_cmd("amx_csay green <<The Game Is Over GG ALL OUT>>")
server_cmd("amx_csay blue <<The Game Is Over GG ALL OUT>>")
server_cmd("amx_csay green <<The Game Is Over GG ALL OUT>>")
server_cmd("amx_csay blue <<The Game Is Over GG ALL OUT>>")
server_cmd("amx_csay green <<The Game Is Over GG ALL OUT>>")
}
public setpassword()
{
server_cmd("pro_pass progather")
}
public sh2()
{
server_cmd("amx_show_activity 2")
}
public sh0()
{
server_cmd("amx_show_activity 0")
}
public kick_all_players(id, level, cid)
{
if(!cmd_access(id, level, cid, 1))
return PLUGIN_HANDLED
new reason[96]
read_argv(1, reason, 95)
new players[32], num, playerid, names[32]
get_players(players, num)
for(new i = 0; i < num; i++)
{
playerid = players[i]
get_user_name ( playerid, names, 31 )
if(!is_user_admin(playerid))
server_cmd("kick ^"%s^" ^"%s^"",names, reason)
//client_cmd(playerid, "disconnect")
}
return PLUGIN_HANDLED
}
public actionMenu(id,key)
{
switch(key){
case 0:{
client_cmd(id,"amx_kickall ^"GG THX FOR PLAYING @ #PRO.GATHER^"")
client_cmd(id,"amx_say Kicked All Players")
}
case 1:{
}
}
return PLUGIN_HANDLED
}
public showMenu(id,level,cid)
{
if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
new menuBody[1024]
new keys
keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)
new len = format(menuBody,1511,"\yProGather Kick All Menu\R^n^n\" )
len += format( menuBody[len], 1024-len, "^n\w1. YES" )
len += format( menuBody[len], 1024-len, "^n\w2. NO" )
show_menu( id, keys, menuBody, -1, "ProGather All Kick Menu By Qlim4X" )
return PLUGIN_HANDLED
}
public plugin_init()
{
register_plugin("pro.gather GG","0.1","Qlim4X")
register_menucmd(register_menuid("Kick All Users By Qlim4X"),1023,"actionMenu")
register_clcmd("pro_kickall","showMenu",ADMIN_KICK,"kick all menu")
register_concmd("pro_gg","pro_gg",ADMIN_KICK,"pro_gg - The game is over!")
register_concmd("amx_kickall","kick_all_players",ADMIN_KICK,"<reason> Kick all players with reason from server except admins");
return PLUGIN_CONTINUE
}