Humm, maybe something like :
Code:
#include <amxmodx>
#include <fakemeta>
public plugin_init()
{
register_plugin( "", "1.0", "Amxx Community" );
register_event( "HLTV", "eNew_round", "a", "1=0", "2=0" );
}
public eNew_round()
{
give_extra( random_person() );
}
random_person()
{
new iRandom_id = random_num( 1, get_playersnum() );
return is_user_alive( iRandom_id ) ? iRandom_id : random_person();
}
give_extra( id )
{
set_pev( id, pev_health, 1000.0 );
}
New Round is happen at the freeze time start.
Use that. You can choose an interval.
Code:
public eNew_round()
{
set_task( random_float( 2.0, 6.0 ), "random_person" );
}
EDIT: hm. I have a doubt about something. You can use this if above doesn't work well.
Code:
random_person()
{
new iPlayers[32], iNum
get_players( iPlayers, iNum, "a" );
return iPlayers[ random( iNum ) ];
}
__________________