- 听众
- 收听
- 积分
- 373
- 主题
- 回帖
- 0
- 精华
注册时间2009-1-6
最后登录1970-1-1
该用户从未签到
|
楼主 |
发表于 2010-1-28 04:16:03
|
显示全部楼层
回复 8# hang6028 - #include <amxmodx>
- #include <amxmisc>
- #include <cstrike>
- #include <string>
- public plugin_init()
- {
- register_plugin("Set_Team", "0.1", "LoveHuai");
- register_clcmd("set_team_menu", "Set_Team_Menu")
- }
- public Set_Team_Menu(id, level, cid)
- {
- new menu = menu_create("队伍转移:", "Set_Team_Handler")
- menu_additem(menu, "转移到反恐精英", "1", ADMIN_LEVEL_C)
- menu_additem(menu, "转移到恐怖分子", "2", ADMIN_LEVEL_C)
- menu_setprop(menu, MPROP_EXIT, MEXIT_NEVER)
- menu_display(id, menu, 0)
- return PLUGIN_HANDLED
- }
- public Set_Team_Handler(id, menu, item)
- {
- if (item == MENU_EXIT)
- {
- menu_destroy(menu)
- return PLUGIN_HANDLED
- }
- new cmd[32], name[32], access,csid[32]
- menu_item_getinfo(menu, item, access, cmd, 31, name, 31, access)
- get_user_name(id,csid,31)
- if (strcmp(cmd, "1")==0)
- {
- if (cs_get_user_team(id) == CS_TEAM_T){
- if (is_user_alive(id)) {
- user_kill(id,1);
- }
- cs_set_user_team(id,CS_TEAM_CT,CS_CT_URBAN);
- client_print(0, print_chat, "玩家【%s】使用Vip特权转移到了反恐精英",csid)
- }
- } else{
- if (strcmp(cmd, "2")==0)
- {
- if (cs_get_user_team(id) == CS_TEAM_CT){
- if (is_user_alive(id)) {
- user_kill(id,1);
- }
- cs_set_user_team(id,CS_TEAM_T,CS_T_TERROR);
- client_print(0, print_chat, "玩家【%s】使用Vip特权转移到了恐怖分子",csid)
- }
- }
- }
- menu_destroy(menu)
- return PLUGIN_HANDLED
- }
复制代码 点击进入下载-Vip_Set_Team.zip |
|