Hi all This is plugin for bonus frags when you defuse c4.
And this code is working for me.
Code
// adds 2 frags for a defuse
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
public plugin_init(){
register_plugin("Defuse Kills","1.0","eTsov")
register_logevent("det_plant",3,"1=triggered")
return PLUGIN_CONTINUE
}
public det_plant(){
new sArg[64], sAction[64]
new sName[64]
new id, iUserId
read_logargv(0,sArg,64)
read_logargv(2,sAction,64)
parse_loguser(sArg,sName,64,iUserId)
id = find_player("k",iUserId)
if (!id) return PLUGIN_CONTINUE
new frgs = get_user_frags(id)
if (equal(sAction,"Defused_The_Bomb")) {
frgs += 2
set_user_frags(id,frgs)
}
return PLUGIN_CONTINUE
}
Now, i wanna code, like this above but for giving +2 frags for player who planted c4 and exploded.
I was try something, like this above but don`t work and i`m not so good coder!:-/