Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. #include < amxmodx >
  2. #include < hamsandwich >
  3. #include < cstrike >
  4.  
  5. new bool:gbRespawn;
  6.  
  7. public plugin_init( ) {
  8. register_plugin( "Prematch/Warmup Manager", "0.1", "Cr34t!v3" );
  9.  
  10. RegisterHam( Ham_Killed, "player", "FwdKilledPlayerPost", 1 );
  11.  
  12. register_clcmd( "say .entreno", "fnStartModeDM" );
  13. register_clcmd( "say_team .entreno", "fnStartModeDM" );
  14.  
  15. register_clcmd( "say .start", "fnStartMatch" );
  16. register_clcmd( "say .partido", "fnStartMatch" );
  17. register_clcmd( "say_team .start", "fnStartMatch" );
  18. register_clcmd( "say_team .partido", "fnStartMatch" );
  19.  
  20. gbRespawn = false;
  21. }
  22.  
  23. public FwdKilledPlayerPost( const id ) {
  24. if( !gbRespawn || !is_user_connected( id ) ) return HAM_IGNORED;
  25.  
  26. ExecuteHamB( Ham_CS_RoundRespawn, id );
  27.  
  28. set_task( 1.2, "RespawnPlayer", id );
  29.  
  30. return HAM_IGNORED;
  31. }
  32.  
  33. public RespawnPlayer( const id ) {
  34. if( !is_user_alive( id ) ) ExecuteHamB( Ham_CS_RoundRespawn, id );
  35. cs_set_user_money( id, 16000 );
  36. }
  37.  
  38. public fnStartModeDM( const id ) {
  39. if( !( get_user_flags( id ) & ADMIN_KICK ) ) return PLUGIN_CONTINUE;
  40.  
  41. if( !gbRespawn ) gbRespawn = true;
  42.  
  43. set_hudmessage( 150, 150, 150, -1.0, 0.38, 1, 0.1, 5.0, 0.1, 0.1, 4 );
  44. show_hudmessage( 0, "Warmup Enabled" );
  45.  
  46. server_cmd( "entreno" );
  47. server_exec( );
  48.  
  49. return PLUGIN_HANDLED;
  50. }
  51.  
  52. public fnStartMatch( const id ) {
  53. if( !( get_user_flags( id ) & ADMIN_KICK ) ) return PLUGIN_CONTINUE;
  54.  
  55. if( gbRespawn ) gbRespawn = false;
  56.  
  57. set_hudmessage( 150, 150, 150, -1.0, 0.38, 1, 0.1, 5.0, 0.1, 0.1, 4 );
  58. show_hudmessage( 0, "Match Settings Loaded" );
  59.  
  60. server_cmd( "partido" );
  61. server_exec( );
  62.  
  63. return PLUGIN_HANDLED;
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement