PHP Code:
register_logevent("logevent_round_end", 2, "1=Round_End")
logevent_round_end(id)
{
if(cs_get_user_team(id) == CS_TEAM_CT && is_user_alive(id))
{
g_jbpacks[id] += 5
ChatColor(id, "| AMX | You got 5 JB Packets for ending this round alive." )
}
}
Do i wrote all correct if i want to give 5 JP packets to alive ct on round end? It is jb shop 3.0
http://forums.alliedmods.net/showthread.php?t=118107
By the way, one more question from same plugin.
If i want that for players with T flag would be given 2x more JB Packs this is the best way to do it or is there more optimised or something?
PHP Code:
public fw_player_killed(victim, attacker, shouldgib)
{
if(!is_user_connected(victim) || !is_user_connected(attacker) || attacker == victim || get_playersnum() < 4)
return HAM_IGNORED
if(get_user_team(attacker) == 1)
{
if(get_user_flags(attacker) & ADMIN_LEVEL_H)
{
g_jbpacks[attacker] += get_pcvar_num(g_killjp) * 2
}
else
{
g_jbpacks[attacker] += get_pcvar_num(g_killjp)
}
if(get_pdata_int(victim, 75) == HIT_HEAD)
{
if(get_user_flags(attacker) & ADMIN_LEVEL_H)
{
g_jbpacks[attacker] += get_pcvar_num(g_killhsjp) * 2
}
else
{
g_jbpacks[attacker] += get_pcvar_num(g_killhsjp)
}
}
}
return HAM_IGNORED
}