[SOLVED] Knifekill_snapshot captures also other kill
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 } |
Re: [HELP] Knifekill_snapshot captures also other kill
[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 } |
| All times are GMT -4. The time now is 19:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.