All that i need is in this code.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <fun>
public plugin_init()
{
register_plugin("Frags By Monster Killed", "1.0", "Fr33m@n")
RegisterHam( Ham_Killed, "func_wall", "monster_killed", 1 )
}
public monster_killed (monsterEnt, attacker, shouldgib)
{
if ( pev(monsterEnt, pev_flags) & FL_MONSTER && is_user_alive(attacker) ) {
new frags = 1 // Just an example
new newfrags = get_user_frags(attacker) + frags
set_user_frags(attacker, newfrags)
//what is the more efficient way beetween these two for add frags ?
ExecuteHamB(Ham_AddPoints, attacker, frags, false)
client_print(attacker, print_chat, "You got %d Frags for killing a Monster", frags)
new namea[32]
get_user_name(attacker, namea, charsmax(namea))
client_print(0, print_chat, "%s killed a Monster (%d Frags)", attacker, frags)
//I want that all players show it except the attacker, 0 isn't possible
//( and the more efficient way if is possible)
}
}
please help me ;)