Hi there! I wanted to make a plugin, that will count 3 knife kills per round and give a player a reward.
PHP Code:
#include <amxmodx>
new knife[32] = {0,...}
public plugin_init() {
register_plugin("Knife Reward","1.0","Big Joe")
register_event("RoundTime", "eventStartRound", "bc")
}
public client_death(killer, wpnindex)
{
if (wpnindex == CSW_KNIFE)
{
new killer_name[32]
get_user_name(killer, killer_name, 31)
knife[killer] ++
}
if (knife[killer] == 3)
{
server_cmd("molotov_give %s", killer)
}
}
public client_putinserver(id) {
knife[id] = 0;
return PLUGIN_CONTINUE
}
public eventStartRound (id) {
knife[id] = 0;
return PLUGIN_CONTINUE
}
The code compiles, but doesn't work, though the molotov plugin is ON. Help, plz!