Raised This Month: $170 Target: $400
 42% 

Plugin Block Behind Kills?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 06-09-2018 , 16:00   Plugin Block Behind Kills?
Reply With Quote #1

hello , is there any of plugin who block Behind Kills? For an Knife Server
Godofwar is offline
Visinescu
Senior Member
Join Date: Dec 2015
Location: England now,Home Romania
Old 06-10-2018 , 18:47   Re: Plugin Block Behind Kills?
Reply With Quote #2

what server, can you provide the IP Address?
Visinescu is offline
tarsisd2
Senior Member
Join Date: Feb 2016
Location: brazil
Old 06-10-2018 , 22:17   Re: Plugin Block Behind Kills?
Reply With Quote #3

here you go

player will be warned not to back stab 2 times, in the third, he will be kicked
plugin will load on "35hp" and "ka" maps

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define IsPlayer(%1)  ( 1 <= %1 <= MaxPlayers )
new MaxPlayers,nick[32],detections[33]
static 
mapname[32]
public 
plugin_init(){
    
get_mapname(mapname,31)
    if (
containi(mapname,"35hp_")==-1){
        return 
PLUGIN_HANDLED_MAIN
    
}
    if (
containi(mapname,"ka_")==-1){
        return 
PLUGIN_HANDLED_MAIN
    
}
    
register_plugin"NoBackStab""1.0""alliedmodders")
    
RegisterHamHam_TakeDamage"player""detectDamage" )
    
register_clcmd("prevention""prevention")
    
MaxPlayers get_maxplayers() 
}
public 
client_connect(id){
    
detections[id]=0
}
public 
detectDamage(VictimInflictorAttackerFloat:DamageDamagebits){
    if(
IsPlayer(Attacker) && Damage==195.0){
        
client_cmd(Attacker"prevention")
    }
}
public 
prevention(id){
    
set_hudmessage(255255255, -1.00.46.012.05.0)
    
client_cmd(id"speak danger")
    switch(
detections[id]){
            case 
0:{
            
show_hudmessage(id"[1/3] Don't Stab players in the back!!!")
        }
        case 
1:{
            
show_hudmessage(id"[2/3] Don't Stab players in the back - last warning!!!")
        }
        case 
2:{
            
get_user_name(id,nick,sizeof nick -1)
            
client_print(0,print_chat,"[Anti-BackStab] Player %s was kicked for back Stabing!!!"nick)
            
server_cmd("kick #%d Don't Stab players in the back!!!",get_user_userid(id))
        }
    }
    
detections[id]++

tarsisd2 is online now
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:30.


Powered by vBulletin®
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Theme made by Freecode