Raised This Month: $ Target: $400
 0% 

Anti rat plugin help fix this


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
yndith761
New Member
Join Date: May 2018
Old 05-01-2018 , 12:57   Anti rat plugin help fix this
Reply With Quote #1

Hi everyone! I need a plugin, which slay player who kills in the back with knife.
So, I found right code and thought about adding a thunder slaying.

#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( "AntiRat", "1.0", "<PAWNcoder>")
RegisterHam( Ham_TakeDamage, "player", "detectDamage" )
register_clcmd("prevention", "prevention")
MaxPlayers = get_maxplayers()
}
public client_connect(id){
detections[id]=0
}
public detectDamage(Victim, Inflictor, Attacker, Floatamage, Damagebits){
if(IsPlayer(Attacker) && Damage==195.0){
client_cmd(Attacker, "prevention")
}
}
public prevention(id){
set_hudmessage(255, 255, 255, -1.0, 0.4, 6.0, 12.0, 5.0)
client_cmd(id, "speak danger")
switch(detections[id]){
case 0:{
show_hudmessage(id, "[1/3] Don't cut in a back!!!")
}
case 1:{
show_hudmessage(id, "[2/3] Don't cut in a back!!!")
}
case 2:{
get_user_name(id,nick,sizeof nick -1)
client_print(0,print_chat,"[Anti-Rat] Player %s was kicked!!!", nick)
server_cmd("kick #%d Don't cut in a back!!!",get_user_userid(id))
}
}
detections[id]++
}

Also I find thunder function:

Thunder( ivec1[ 3 ], ivec2[ 3 ] )
{
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_BEAMPOINTS );
write_coord( ivec1[ 0 ] );
write_coord( ivec1[ 1 ] );
write_coord( ivec1[ 2 ] );
write_coord( ivec2[ 0 ] );
write_coord( ivec2[ 1 ] );
write_coord( ivec2[ 2 ] );
write_short( lightning );
write_byte( 1 );
write_byte( 5 );
write_byte( 7 );
write_byte( 20 );
write_byte( 30 );
write_byte( 200 );
write_byte( 200 );
write_byte( 200 );
write_byte( 200 );
write_byte( 200 );
message_end();

message_begin( MSG_PVS, SVC_TEMPENTITY, ivec2 );
write_byte( TE_SPARKS );
write_coord( ivec2[ 0 ] );
write_coord( ivec2[ 1 ]);
write_coord( ivec2[ 2 ] );
message_end();

emit_sound( 0 ,CHAN_ITEM, thunder_sound, 1.0, ATTN_NORM, 0, PITCH_NORM );
}

Please help me make killing in the back with slay and thunder sprite ((
yndith761 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 05-01-2018 , 14:05   Re: Anti rat plugin help fix this
Reply With Quote #2

You should be slayed for not putting the code in code or php tags organise your thread.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 04:38.


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