PHP Code:
#include <hamsandwich>
public plugin_init()
{
RegisterHam(Ham_Killed, "player", "fwd_killed_post", 1)
}
public fwd_killed_post(victim, attacker, shouldgib)
{
if (!is_user_connected(attacker) || victim == attacker)
return HAM_IGNORED
g_exp[attacker] += 20
update_xp(attacker, 20)
return HAM_IGNORED
}
postea la función "update_xp", nose bien a que te referis con que no te sale :/, el sma no te compila o qué¿? porque o lo subiste incomplet o hay funciones y variables que no están presentes.
Acá te lo rehize:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#define mostrar_exp(%1) client_print(%1, print_center, "Tienes %d puntos de experiencia!", g_exp[%1])
new g_exp[33]
public plugin_init()
{
RegisterHam(Ham_Killed, "player", "fwd_killed_post", 1)
}
public fwd_killed_post(victim, attacker, shouldgib)
{
if (!is_user_connected(attacker) || victim == attacker)
return HAM_IGNORED
g_exp[attacker] += 20
mostrar_exp(attacker)
return HAM_IGNORED
}
__________________