Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. #include < amxmodx >
  2. #include < fakemeta >
  3. #include < hamsandwich >
  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 .partido", "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. set_task( 2.4, "RespawnPlayer", id );
  27.  
  28. return HAM_IGNORED;
  29. }
  30.  
  31. public RespawnPlayer( const id ) {
  32. ExecuteHamB( Ham_CS_RoundRespawn, id );
  33. if( !is_user_alive( id ) ) ExecuteHamB( Ham_CS_RoundRespawn, id );
  34.  
  35. // set_pdata_int( id, 235, 1, 5 );
  36. set_pdata_int( id, 115, 16000, 5 );
  37. }
  38.  
  39. public fnStartModeDM( const id ) {
  40. if( !( get_user_flags( id ) & ADMIN_KICK ) ) return PLUGIN_CONTINUE;
  41.  
  42. if( !gbRespawn ) gbRespawn = true;
  43.  
  44. set_hudmessage( 150, 150, 150, -1.0, 0.38, 1, 0.1, 5.0, 0.1, 0.1, 4 );
  45. show_hudmessage( 0, "Warmup Enabled" );
  46.  
  47. server_cmd( "entreno" );
  48. server_exec( );
  49.  
  50. return PLUGIN_HANDLED;
  51. }
  52.  
  53. public fnStartMatch( const id ) {
  54. if( !( get_user_flags( id ) & ADMIN_KICK ) ) return PLUGIN_CONTINUE;
  55.  
  56. if( gbRespawn ) gbRespawn = false;
  57.  
  58. set_hudmessage( 150, 150, 150, -1.0, 0.38, 1, 0.1, 5.0, 0.1, 0.1, 4 );
  59. show_hudmessage( 0, "Match Settings Loaded" );
  60.  
  61. server_cmd( "partido" );
  62. server_exec( );
  63.  
  64. return PLUGIN_HANDLED;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement