Raised This Month: $ Target: $400
 0% 

[SOLVED] Knifekill_snapshot captures also other kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
almaro
Junior Member
Join Date: Sep 2011
Location: Indonesia
Old 09-27-2011 , 21:54   [SOLVED] Knifekill_snapshot captures also other kill
Reply With Quote #1

I made a small plugins to capture every knife kill by players.
The problems are:
1. Sometimes (in the beginning of game) there's no capture, then after some time it start functioning.
2. The function is wrong, the plugins not only capture knife kill but capture also shot kill.

pls help..








/* This Plugin was made by
* Almaro
*/

#include <amxmodx>

public plugin_init() {
register_plugin("KnifeKill_snapshot","1.0","A lmaro")
register_event("DeathMsg","knife_snapshot","a ","3=knife")
}


public knife_snapshot() {
new Killer = read_data(1) //get the killer ID for screenshot cmd
client_print(Killer, print_chat, "============= KNIFE KILL SNAPSHOT =============")
client_cmd(Killer,"wait;wait;wait;wait;wait;w ait;snapshot") //snapshot cmd issued by killer
}





========================== UPDATED TO v.1.2 ==============================
/* This Plugin was made by
* Almaro
*/
#include <amxmodx>
public plugin_init() {
register_plugin("KnifeKill_snapshot","1.2","A lmaro")
register_event("DeathMsg","knife_snapshot","a ","4&kni")
}

public knife_snapshot() {
new Killer = read_data(1) //get the killer ID for screenshot cmd
new datetime[20] //create variable to store datetime
get_time("%m-%d-%Y_%H:%M:%S",datetime,19) //get the date_time 19 chars
new nameKiller[32]
get_user_name(Killer,nameKiller,31) //get the killer NAME
new Victim = read_data(2)
new nameVictim[32]
get_user_name(Victim,nameVictim,31) //get the victim NAME

client_print(Killer, print_chat, "[ %s ] %s KILLED %s WITH KNIFE",datetime,nameKiller,nameVictim)
client_cmd(Killer,"wait;wait;wait;wait;wait;w ait;snapshot") //snapshot cmd issued by killer
}

Last edited by almaro; 10-12-2011 at 23:22.
almaro is offline
almaro
Junior Member
Join Date: Sep 2011
Location: Indonesia
Old 09-28-2011 , 05:40   Re: [HELP] Knifekill_snapshot captures also other kill
Reply With Quote #2

[SOLVED] using register_event("DeathMsg","knife_snapshot","a ","4&kni")


/* This Plugin was made by
* Almaro
*/

#include <amxmodx>

public plugin_init() {
register_plugin("KnifeKill_snapshot","1.1","A lmaro")
register_event("DeathMsg","knife_snapshot","a ","4&kni")
}


public knife_snapshot() {
new Killer = read_data(1) //get the killer ID for screenshot cmd
client_print(Killer, print_chat, "============= KNIFE KILL SNAPSHOT =============")
client_cmd(Killer,"wait;wait;wait;wait;wait;w ait;snapshot") //snapshot cmd issued by killer
}
almaro is offline
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 19:30.


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