Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include < amxmodx >
- #include < fakemeta >
- #include < hamsandwich >
- new bool:gbRespawn;
- public plugin_init( ) {
- register_plugin( "Prematch/Warmup Manager", "0.1", "Cr34t!v3" );
- RegisterHam( Ham_Killed, "player", "FwdKilledPlayerPost", 1 );
- register_clcmd( "say .entreno", "fnStartModeDM" );
- register_clcmd( "say_team .partido", "fnStartModeDM" );
- register_clcmd( "say .start", "fnStartMatch" );
- register_clcmd( "say .partido", "fnStartMatch" );
- register_clcmd( "say_team .start", "fnStartMatch" );
- register_clcmd( "say_team .partido", "fnStartMatch" );
- gbRespawn = false;
- }
- public FwdKilledPlayerPost( const id ) {
- if( !gbRespawn || !is_user_connected( id ) ) return HAM_IGNORED;
- set_task( 2.4, "RespawnPlayer", id );
- return HAM_IGNORED;
- }
- public RespawnPlayer( const id ) {
- ExecuteHamB( Ham_CS_RoundRespawn, id );
- if( !is_user_alive( id ) ) ExecuteHamB( Ham_CS_RoundRespawn, id );
- // set_pdata_int( id, 235, 1, 5 );
- set_pdata_int( id, 115, 16000, 5 );
- }
- public fnStartModeDM( const id ) {
- if( !( get_user_flags( id ) & ADMIN_KICK ) ) return PLUGIN_CONTINUE;
- if( !gbRespawn ) gbRespawn = true;
- set_hudmessage( 150, 150, 150, -1.0, 0.38, 1, 0.1, 5.0, 0.1, 0.1, 4 );
- show_hudmessage( 0, "Warmup Enabled" );
- server_cmd( "entreno" );
- server_exec( );
- return PLUGIN_HANDLED;
- }
- public fnStartMatch( const id ) {
- if( !( get_user_flags( id ) & ADMIN_KICK ) ) return PLUGIN_CONTINUE;
- if( gbRespawn ) gbRespawn = false;
- set_hudmessage( 150, 150, 150, -1.0, 0.38, 1, 0.1, 5.0, 0.1, 0.1, 4 );
- show_hudmessage( 0, "Match Settings Loaded" );
- server_cmd( "partido" );
- server_exec( );
- return PLUGIN_HANDLED;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement