PHP Kod:
#include <amxmodx>
#include <reapi>
new const TAG[] = "...";
public plugin_init()
{
register_plugin("Lucky Prisoner", "Premium", "PaXeL");
RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound_Pre", 0);
}
public CSGameRules_RestartRound_Pre()
{
set_task(1.0, "Choose_Lucky_Prisoner");
}
public Choose_Lucky_Prisoner()
{
new Players[32], Num_Alive_T;
get_players(Players, Num_Alive_T, "aehi", "TERRORIST");
if(Num_Alive_T < 1)
{
return;
}
new ID = Players[random(Num_Alive_T)];
rg_give_item(ID, "weapon_hegrenade");
set_entvar(ID, var_health, Float: get_entvar(ID, var_health) + 15.0);
client_print_color(0, 0, "^3[%s] ^4Mahkum ^3%n ^4Sansli Oldugu Icin^3 biz ^4ODULLER ^3Kazandi!!!", TAG, ID);
}
)

