ckck808 发表于 2012-8-29 20:36:53

VIP队伍转移卡

ADMIN_LEVEL_C 权限
需要配合
say_menu.amxx         ; Say menu 菜单
custommenuitems.cfg内添加
amx_addclientmenuitem "队伍转移" "set_team_menu" "o" "Vip_Set"


#include
#include
#include
#define PLUGIN_NAME "Change Team Menu"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "KIN"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_clcmd( "say team","Changemenu", ADMIN_RESERVATION, "Shows The Change Teams Menu" )
register_menucmd(register_menuid("\r队伍转移菜单^n"), 1023, "cgtheMenu" )
return PLUGIN_CONTINUE
}
public Changemenu(id,level)
{
if (!access(id,level))
{
client_print(id,print_center,"你无权使用该道具!")
console_print(id,"你无权使用该道具!")
return PLUGIN_CONTINUE
}
if(cs_get_user_team(id) == CS_TEAM_SPECTATOR)
{
client_print(id,print_center,"观察者不能使用该道具!")
console_print(id,"观察者不能使用该道具!")
return PLUGIN_CONTINUE
}
new cgMenu
new keys
new nLen = format( cgMenu, 255, "\r队伍转移菜单^n" )
nLen += format( cgMenu, 255-nLen, "^n\r1. \w 恐怖份子" )
nLen += format( cgMenu, 255-nLen, "^n\r2. \w 反恐精英" )
nLen += format( cgMenu, 255-nLen, "^n^n\r0. \w 退出" )
keys = (1<<0|1<<1|1<<2|1<<9)
show_menu( id, keys, cgMenu, -1 )
return PLUGIN_CONTINUE
}
public cgtheMenu(id,key)
{
switch(key)
{
case 0: {
if(cs_get_user_team(id) == CS_TEAM_T)
{
client_print(id,print_center,"你现在为恐怖份子,不需要更换队伍!")
console_print(id,"你现在为恐怖份子,不需要更换队伍!")
return PLUGIN_CONTINUE
}
else
{
cs_set_user_team(id, CS_TEAM_T, CS_T_GUERILLA)
user_kill(id, 1)
if (is_user_alive(id))
{
user_kill(id, 1)
}
return PLUGIN_CONTINUE
}
}
case 1: {
if(cs_get_user_team(id) == CS_TEAM_CT)
{
client_print(id,print_center,"你现在为反恐精英,不需要更换队伍!")
console_print(id,"你现在为反恐精英,不需要更换队伍!")
return PLUGIN_CONTINUE
}
else
{
cs_set_user_team(id, CS_TEAM_CT, CS_CT_GSG9)
user_kill(id,1)
if(is_user_alive(id))
{
user_kill(id, 1)
}
return PLUGIN_CONTINUE
}
}
case 9: {
client_print( id, print_chat, "退出转移菜单" )
console_print(id,"退出转移菜单")
}
}
return PLUGIN_HANDLED
}



as1127708150 发表于 2012-8-29 21:08:33

不错,我有了,纯支持!!!!

zzx767545521 发表于 2015-4-17 10:11:47

不错很好

anyingxmv 发表于 2019-5-12 05:11:41

这个怎么转移法
页: [1]
查看完整版本: VIP队伍转移卡