tengo una duda como seteo 20 de exp al matar a un player probe de varias formas y no me salio , incluso asi:
PHP Code:
#include <hamsandwich>
public plugin_init() {
RegisterHam( Ham_Killed, "player", "Ham_PlayerKilled", 1 );
}
public Ham_PlayerKilled( victim, attacker )
{
if( !is_user_connected(victim) || !is_user_connected(attacker) )
return HAM_IGNORED;
if( get_user_team(victim) == get_user_team(attacker) )
return HAM_IGNORED;
if (get_user_team(attacker) == 1 && get_user_team(victim) == 2){
g_exp[attacker] += 20
}
if (get_user_team(attacker) == 2 && get_user_team(victim) == 1){
g_exp[attacker] += 20
}
update_xp(attacker, 1);
return HAM_IGNORED;
}
este tuto segui:
http://forums.alliedmods.net/showthread.php?t=173940