Advertisement
Rejack

Jailbreak - Last Request (Special)

Sep 26th, 2020 (edited)
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.93 KB | None | 0 0
  1. #define USE_RULES       // This plugin uses special rules
  2.  
  3. // Includes
  4.  
  5. #include < amxmodx >
  6. #include < cstrike >
  7. #include < fakemeta_util >
  8. #include < lastrequest >
  9.  
  10. // Defines
  11.  
  12. #define LR_MODE LR_SPECIAL_BATTLES      // To decide to which category this plugin match
  13.  
  14. #define TASKID_DELAY    11111   // Don't touch
  15.  
  16. // Enums
  17.  
  18. enum _:BATTLE_IDS
  19. {
  20.     TAKE_AWAY_THE_BOMB,
  21.     GUN_TOSS,
  22.     KILL_THE_NOCLIP_MAN,
  23.     STRIP_DUEL,
  24.     SURVIVAL_DUEL,
  25.     SPRAY_DUEL,
  26.     INVISIBLE_DUEL
  27. };
  28.  
  29.  
  30. // Strings
  31.  
  32. new const szBattles[ BATTLE_IDS ][ ] =
  33. {
  34.     "Take Away The Bomb",
  35.     "Gun Toss",
  36.     "Kill The Noclip Man",
  37.     "Strip Battles",
  38.     "Survival Battles",
  39.     "Spray Battles",
  40.     "Invisible Battles"
  41. };
  42.  
  43. // Others
  44.  
  45. new g_iBattleIDs[ BATTLE_IDS ];
  46.  
  47. new g_mGameID   = -1;
  48.  
  49. new g_iVictim
  50. new g_iPlayer;
  51.  
  52. public plugin_init()
  53. {
  54.     register_plugin( "LR: Basic Custome Wars", "1.0", "Rejack" );
  55.    
  56.     register_forward( FM_SetModel,"FwdSetModel" );
  57.    
  58.     static i;
  59.    
  60.     for ( i = 0; i < BATTLE_IDS; i++ )  // Register lrs
  61.     {
  62.         g_iBattleIDs[ i ]   = register_special_lr( szBattles[ i ], true/*, true, "cmdOpenRulesMenu"*/ );
  63.        
  64.         if ( g_iBattleIDs[ i ] == -1 )
  65.             log_amx( "[LR:Basic Special Wars] ERROR: Failed to register special lr (i=%i) : %s", i, szBattles[ i ] );
  66.     }
  67. }
  68.  
  69. public FwdLrStarted( const client, const victim, const g_iCategory, const iGameID, const g_iDelay )
  70. {
  71.     if ( g_iCategory != LR_MODE )   // Not this category
  72.         return 1;
  73.    
  74.     static i;
  75.    
  76.     for ( i = 0; i < BATTLE_IDS; i++ )      // Look to see if the game Id mathces this plugin
  77.     {
  78.         if ( g_iBattleIDs[ i ] == iGameID )
  79.         {
  80.             g_mGameID   = i;
  81.         }
  82.     }
  83.    
  84.     if ( g_mGameID == -1 )  // If didn't match move on
  85.         return 1;
  86.    
  87.     g_iVictim   = victim;
  88.     g_iPlayer   = client;
  89.    
  90.     set_task( float( g_iDelay ), "taskStartBattle", TASKID_DELAY );
  91.    
  92.     return 1;
  93. }
  94.  
  95. public FwdLrEnded( const winner )
  96. {
  97.     g_mGameID   = -1;
  98. }
  99.  
  100. public FwdSetModel( ent )
  101. {
  102.     if ( !pev_valid( ent ) )
  103.         return 1;
  104.    
  105.     if ( g_mGameID != GUN_TOSS && g_mGameID != TAKE_AWAY_THE_BOMB )
  106.         return 1;
  107.    
  108.     static client;
  109.    
  110.     client  = pev( ent, pev_owner );
  111.    
  112.     if ( !is_user_connected( client ) )
  113.         return 1;
  114.    
  115.     switch ( get_user_team( client ) )
  116.     {
  117.         case 1: // Terrorists
  118.             fm_set_rendering( ent, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, 16 );
  119.        
  120.         case 2: // Counter-Terrorists
  121.             fm_set_rendering( ent, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, 16 );
  122.     }
  123.    
  124.     return 1;
  125. }
  126.  
  127.  
  128. public taskStartBattle( )
  129. {
  130.     switch ( g_mGameID )
  131.     {
  132.         case TAKE_AWAY_THE_BOMB:
  133.         {
  134.             // Prisoner Settings
  135.            
  136.             fm_give_item( g_iPlayer, "weapon_deagle" );
  137.            
  138.             fm_give_item( g_iPlayer, "weapon_c4" );
  139.            
  140.             cs_set_user_bpammo( g_iPlayer, CSW_DEAGLE, 9999 );
  141.            
  142.             // Guard Settings
  143.            
  144.             fm_give_item( g_iVictim, "weapon_deagle" );
  145.            
  146.             fm_give_item( g_iVictim, "weapon_c4" );
  147.            
  148.             cs_set_user_bpammo( g_iVictim, CSW_DEAGLE, 9999 );
  149.         }
  150.        
  151.         case GUN_TOSS:
  152.         {
  153.             // Prisoner Settings
  154.            
  155.             fm_give_item( g_iPlayer, "weapon_deagle" );
  156.            
  157.             fm_give_item( g_iPlayer, "weapon_knife" );
  158.            
  159.             cs_set_user_bpammo( g_iPlayer, CSW_DEAGLE, 0 );
  160.            
  161.             cs_set_weapon_ammo( fm_find_ent_by_owner( -1, "weapon_deagle", g_iPlayer ), 0 );
  162.            
  163.             // Guard Settings
  164.            
  165.             fm_give_item( g_iVictim, "weapon_deagle" );
  166.            
  167.             fm_give_item( g_iVictim, "weapon_knife" );
  168.            
  169.             cs_set_user_bpammo( g_iVictim, CSW_DEAGLE, 0 );
  170.            
  171.             cs_set_weapon_ammo( fm_find_ent_by_owner( -1, "weapon_deagle", g_iVictim ), 0 );
  172.         }
  173.        
  174.         case KILL_THE_NOCLIP_MAN:
  175.         {
  176.             // Prisoner Settings
  177.            
  178.             fm_give_item( g_iPlayer, "weapon_deagle" );
  179.            
  180.             fm_give_item( g_iPlayer, "weapon_m4a1" );
  181.            
  182.             cs_set_user_bpammo( g_iPlayer, CSW_DEAGLE, 9999 );
  183.            
  184.             cs_set_user_bpammo( g_iPlayer, CSW_M4A1, 9999 );
  185.            
  186.             // Guard Settings
  187.            
  188.             fm_set_user_noclip( g_iVictim, 1 );
  189.            
  190.             fm_give_item( g_iVictim, "weapon_knife" );
  191.         }
  192.        
  193.         case STRIP_DUEL:
  194.         {
  195.             // Prisoner Settings
  196.            
  197.             fm_give_item( g_iPlayer, "weapon_knife" );
  198.            
  199.             // Guard Settings
  200.         }
  201.        
  202.         case SURVIVAL_DUEL:
  203.         {
  204.             // Prisoner Settings
  205.            
  206.             fm_give_item( g_iPlayer, "weapon_m4a1" );
  207.            
  208.             cs_set_user_bpammo( g_iPlayer, CSW_M4A1, 9999 );
  209.            
  210.             // Guard Settings
  211.            
  212.             fm_set_user_health( g_iVictim, 5000 );
  213.            
  214.             fm_give_item( g_iVictim, "weapon_knife" );
  215.         }
  216.        
  217.         case SPRAY_DUEL:
  218.         {
  219.             // Prisoner Settings
  220.            
  221.             fm_give_item( g_iPlayer, "weapon_knife" );
  222.            
  223.             // Guard Settings
  224.            
  225.             fm_give_item( g_iVictim, "weapon_knife" );
  226.         }
  227.        
  228.         case INVISIBLE_DUEL:
  229.         {
  230.             // Prisoner Settings
  231.            
  232.             fm_give_item( g_iPlayer, "weapon_m4a1" );
  233.            
  234.             cs_set_user_bpammo( g_iPlayer, CSW_M4A1, 9999 );
  235.            
  236.             fm_set_user_rendering( g_iPlayer, kRenderFxNone, 20, 20, 20, kRenderTransAlpha , 1 );
  237.            
  238.             // Guard Settings
  239.            
  240.             fm_give_item( g_iVictim, "weapon_m4a1" );
  241.            
  242.             cs_set_user_bpammo( g_iVictim, CSW_M4A1, 9999 );
  243.            
  244.             fm_set_user_rendering( g_iVictim, kRenderFxNone, 20, 20, 20, kRenderTransAlpha, 1 );
  245.         }
  246.     }
  247.     return 1;
  248. }
  249.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement