Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include < amxmodx >
- #include < fun >
- #include < cstrike >
- #include < hamsandwich >
- #define PLUGIN "Warmup Round"
- #define VERSION "1.0"
- #define AUTHOR "A k c 3 n 7"
- new bool:warmup;
- new count_down = 50;
- public plugin_init( ) {
- register_plugin( PLUGIN, VERSION, AUTHOR );
- RegisterHam( Ham_Spawn, "player", "PlayerPostSpawn", 1 );
- RegisterHam( Ham_Touch, "armoury_entity", "FwdHamPlayerPickup" );
- RegisterHam(Ham_Killed, "player", "fw_PlayerKilled_Post", 1)
- set_task( 1.0, "countdown", 00, _, _, "b" );
- warmup = true;
- }
- public Respawn( id ) {
- if( !warmup ) return;
- if (!is_user_alive( id ) && cs_get_user_team( id ) != CS_TEAM_SPECTATOR)
- ExecuteHamB(Ham_CS_RoundRespawn, id);
- }
- public fw_PlayerKilled_Post( id ) {
- set_task(1.0, "Respawn", id, _, _,"b")
- }
- public PlayerPostSpawn( id ) {
- if(! is_user_alive( id ) || !warmup )
- return;
- strip_user_weapons( id ), give_item( id, "weapon_knife"), give_item( id, "weapon_ak47" );
- cs_set_user_bpammo( id, CSW_AK47, 90 );
- }
- public FwdHamPlayerPickup(iEntity, id)
- {
- if( !is_user_alive( id ) )
- return HAM_HANDLED;
- return warmup ? HAM_SUPERCEDE : HAM_IGNORED;
- }
- public countdown( ) {
- set_hudmessage(random_num(57, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.86, 2, 1.1, 1.1, 0.0, 0.0)
- show_hudmessage( 0, "Runda de Incalzire: %d secunde ramase", count_down );
- count_down--;
- if( count_down <= 0 )
- {
- if( task_exists( 00 ) )
- remove_task( 00 );
- warmup = false;
- server_cmd( "sv_restart 1" );
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement