hi guys
I found this plugin
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
public plugin_init()
{
register_plugin("cfg", "1.0", "x")
RegisterHam(Ham_Killed, "player", "killed_player")
}
public killed_player(victim, attacker)
{
new Float:vorigin[3], Float:aorigin[3];
pev(victim, pev_origin, vorigin)
pev(attacker, pev_origin, aorigin)
if(fm_get_distance(vorigin, aorigin) > 2)
{
new name[32];
get_user_name(attacker, name, 31)
server_cmd("kick #%d ^"You killed from more than 2 meters distance.^"", get_user_userid(attacker))
client_print(0, print_chat, "%s have knife cfg.", name)
}
}
Float:fm_get_distance(Float:origin1[3], Float:origin2[3])
{
new Float:rdistance = get_distance_f(origin1, origin2)
return(rdistance*0.0254)
}
good plugin but has 2 errors
1- kicked the detected players not working
2- the plugin send name of the server in chat Instead of detected player name
can someone fix it ? not hard i think