|
- #include <amxmodx>
- #include <amxmisc>
- #include <fun>
- #include <cstrike>
- #define KEY1 (1<<0)
- #define KEY2 (1<<1)
- #define KEY3 (1<<2)
- #define KEY4 (1<<3)
- #define KEY0 (1<<9)
- new index[33]
- new msg[64]
- new g_playerFly[33]
- // for hud msg
- new colR = 200
- new colG = 100
- new colB = 0
- new type = 2
- public plugin_init(){
- register_plugin("dddzzz","2.0","O~Yes/A.MI")
- register_menucmd(register_menuid("cl_command"), (KEY1|KEY2|KEY3|KEY4|KEY0), "command_Cmd")
- register_logevent("newRound", 2, "0=World triggered", "1=Round_Start")
- return PLUGIN_CONTINUE
- }
- public client_damage( attacker, victim, damage, wpnindex, hitplace, TA){
-
- if(TA==1){
- if(cs_get_user_buyzone(attacker)){
- user_kill(attacker);
- format(msg,63,"故 意 打 伤 队 友 只 能 处 死 你 !")
- set_hudmessage(248, 248, 255, 0.01, 0.3, 0, 3.0, 4.0, 0.1, 1.0, 7)
- show_hudmessage(attacker, msg)
- return PLUGIN_CONTINUE
- }
-
- format(msg,63,"警 告 : 再 打 伤 队 友, 你 会 死 掉 !")
- set_hudmessage(248, 248, 255, 0.01, 0.3, 0, 3.0, 4.0, 0.1, 1.0, 7)
- show_hudmessage(attacker, msg)
- {
- set_user_health ( attacker, get_user_health(attacker) - (damage-1) )
- }
- }
- return PLUGIN_CONTINUE
- }
- public client_death( SZkiller, victim, wpnindex, hitplace, TK){
-
- if(get_user_team(SZkiller) == get_user_team(victim) && is_user_alive(SZkiller)){
- index[victim] = SZkiller
- cl_command(victim)
- }
- return PLUGIN_CONTINUE
- }
- public cl_command(id){
- new menu[512]
- format( menu, 511, "* 队友杀你,你想选择哪个?^n^n\w1.原谅他一次^n2.他故意杀我^n3.让他变飞机^n4.他经常杀自己人^n0.退出菜单")
- show_menu( id, KEY1|KEY2|KEY3|KEY4|KEY0, menu, -1, "cl_command")
- return PLUGIN_CONTINUE
- }
- public command_Cmd( id, key){
- new SZkiller = index[id]
-
- switch(key){
- case 0:{
- index[id] = 0 ;
- format(msg,63,"这次队友原谅了你,下次请注意喔!")
- set_hudmessage(0, 128, 0, 0.01, 0.5, 2, 3.0, 4.0, 0.1, 1.0, 4)
- show_hudmessage(SZkiller, msg)
- }
- case 1:{
- user_kill(index[id]);
- format(msg,63,"队友不原谅你,给你打一针安乐死吧!")
- set_hudmessage(248, 248, 255, 0.01, 0.5, 2, 3.0, 4.0, 0.1, 1.0, 4)
- show_hudmessage(SZkiller, msg)
- }
- case 2:{
- fly(SZkiller);
- }
- case 3:{
- new ip[16]
- get_user_ip(SZkiller, ip, 15, 1)
- server_cmd("addip %.2f %s;wait;writeip", 5.0, ip);
- }
- case 4:{
- index[id] = 0 ;
- }
- }
- return PLUGIN_CONTINUE
- }
- // ************************ 飞天惩罚 ************************
- public fly(SZkiller){
- new pname[32]
- get_user_name( SZkiller, pname, 31);
- set_hudmessage ( colR, colG, colB, 0.01, 0.5, type, 0.1, 11.0, 0.1, 0.1, 5)
- show_hudmessage ( 0, "悬赏:玩家%s误杀队友被变飞机^n你们快点来打飞机,哈哈哈!",pname )
- set_user_rendering(SZkiller, kRenderFxGlowShell, 0, 111, 0, kRenderTransAlpha, 255) // 颜色和透明度
- {
- strip_user_weapons(SZkiller);
- set_user_gravity( SZkiller, -0.5);
- client_cmd( SZkiller, "+jump;wait;wait;-jump");
- g_playerFly[SZkiller] = 1
- }
- return PLUGIN_HANDLED
- }
- public newRound(){
- set_task( 1.0 , "roundDelay");
- }
- public roundDelay(){
- new players[32],num
- get_players( players, num)
- for (new i = 0; i < num; i++){
- new player = players[i]
-
- if( g_playerFly[player] ){
- stopFly(player)
- }
- }
- return PLUGIN_HANDLED
- }
- stopFly(player){
- g_playerFly[player] = 0 ;
- set_user_gravity( player, 1.0);
- set_user_rendering( player, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255);
- }
复制代码 |
|