Rejack

Hit And Run v0.4.3b by Rejack

Mar 13th, 2013 (edited)
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 58.86 KB | None | 0 0
  1. #include < amxmodx >
  2. #include < amxmisc >
  3. #include < cstrike >
  4. #include < fakemeta >
  5. #include < fakemeta_util >
  6. #include < hamsandwich >
  7. #include < dhudmessage >
  8. #include < nvault >
  9.  
  10. /* Defines */
  11.     #define MaxScouts 20
  12. /* Variables */
  13.    
  14.     new hnr_count, Shockwave, Laserbeam, Lightning, White, Trail, g_Vault;
  15.     new g_FlashMsg, Zbim;
  16.     new g_FwIndex, gMaxPlayers, g_GunsEvents_Bitsum;
  17. /* Booleans */
  18.  
  19.     new bool:IsInfected[ 33 ], bool:hnr_game, bool:BlockZoom;
  20.     new bool:g_Sounds[ 33 ], bool:g_Beacon[ 33 ], bool:g_Laser[ 33 ], bool:AntiFrost[ 33 ], bool:AntiFlash[ 33 ];
  21.  
  22. /* Floats */
  23.  
  24.     new Float:hnr_timer, Float:hnr_last[ 33 ];
  25. /* Cvars */
  26.  
  27. /* Models and Levels */
  28.  
  29.     new const laser_spr[ ] = "sprites/laserbeam.spr";
  30.     new const shock_spr[ ] = "sprites/shockwave.spr";
  31.     new const light_spr[ ] = "sprites/lgtning.spr";
  32.     new const white_spr[ ] = "sprites/white.spr";
  33.     new const smoke_spr[ ] = "sprites/smoke.spr";
  34.    
  35.     new const v_He[ ] = "models/Galactic/HNR/Grenades/v_hegrenade.mdl";
  36.     new const v_Flash[ ] = "models/Galactic/HNR/Grenades/v_flashbang.mdl";
  37.     new const v_Smoke[ ] = "models/Galactic/HNR/Grenades/v_smokegrenade.mdl";
  38.    
  39.     /*new v_Scout[ MaxScouts ][ ] =
  40.     {
  41.         "models/Galactic/HitNRun/Scouts/v_newscout1.mdl",
  42.         "models/Galactic/HitNRun/Scouts/v_newscout2.mdl",
  43.         "models/Galactic/HitNRun/Scouts/v_newscout3.mdl",
  44.         "models/Galactic/HitNRun/Scouts/v_newscout4.mdl",
  45.         "models/Galactic/HitNRun/Scouts/v_newscout5.mdl",
  46.         "models/Galactic/HitNRun/Scouts/v_newscout6.mdl",
  47.         "models/Galactic/HitNRun/Scouts/v_newscout7.mdl",
  48.         "models/Galactic/HitNRun/Scouts/v_newscout8.mdl",
  49.         "models/Galactic/HitNRun/Scouts/v_newscout9.mdl",
  50.         "models/Galactic/HitNRun/Scouts/v_newscout10.mdl",
  51.         "models/Galactic/HitNRun/Scouts/v_newscout11.mdl",
  52.         "models/Galactic/HitNRun/Scouts/v_newscout12.mdl",
  53.         "models/Galactic/HitNRun/Scouts/v_newscout13.mdl",
  54.         "models/Galactic/HitNRun/Scouts/v_newscout14.mdl",
  55.         "models/Galactic/HitNRun/Scouts/v_newscout15.mdl",
  56.         "models/Galactic/HitNRun/Scouts/v_newscout16.mdl",
  57.         "models/Galactic/HitNRun/Scouts/v_newscout17.mdl",
  58.         "models/Galactic/HitNRun/Scouts/v_newscout18.mdl",
  59.         "models/Galactic/HitNRun/Scouts/v_newscout19.mdl",
  60.         "models/Galactic/HitNRun/Scouts/v_newscout20.mdl"
  61.     }*/
  62.    
  63.     new scout[ ] = "models/Galactic/HitNRun/Scouts/v_scout3.mdl";
  64.    
  65.     new g_Levels[ 20 ] =
  66.     {
  67.         35, 100, 200, 350, 500,
  68.         700, 950, 1200, 1500, 1800,
  69.         2150, 2500, 3000, 3550, 4150,
  70.         4700, 5300, 6000, 6900, 8000
  71.     };
  72.    
  73.     new g_Scout[ 33 ];
  74.    
  75. /* Info */
  76.     new Info[ ][ ] =
  77.     {
  78.         "Hit And Run",
  79.         "v0.4.3b",
  80.         "Rejack"
  81.     };
  82.    
  83. /* Shop */
  84.     new g_GrenadesClass[ ][ ] = { "weapon_hegrenade", "weapon_flashbang", "weapon_smokegrenade" };
  85.     new g_GrenadesCost[ ] = { 100, 650, 750 };
  86.     new g_GrenadesLvls[ ] = { 6, 3, 4 }
  87.    
  88.     new g_WeaponsClass[ ][ ] = { "weapon_m4a1", "weapon_ak47", "weapon_galil", "weapon_famas", "weapon_mp5navy" };
  89.     new g_WeaponsCSW[ ] = { CSW_M4A1, CSW_AK47, CSW_GALIL, CSW_FAMAS, CSW_MP5NAVY };
  90.     new g_WeaponsCost[ ] = { 3500, 3500, 3200, 3000, 2350 };
  91.     new g_WeaponsLvls[ ] = { 15, 15, 13, 12, 11 }
  92.    
  93.     new g_AmmoAmount[ ] = { 10, 20, 30 };
  94.     new g_AmmoCost[ ] = { 300, 600, 900 };
  95.    
  96.     new g_PowersCost[ ] = { 1500, 2250 };
  97.     new g_PowersLvls[ ] = { 8, 12 };
  98.  
  99. /* Event Vote */
  100.  
  101.     new g_EventsNames[ ][ ] = { "Knife Only", "Pistols Only", "No Zoom", "No Grenades", "Invisible Infected" }
  102.     new VoteMenu, Voting, Votes[ 4 ], g_Num, g_Random, vCount, bool:g_Vote, bool:Voted[ 33 ];
  103.     new NR, Event;
  104.     new Round, bool:Invis;
  105.    
  106. /* Arrays ( Clients ) */
  107.     new Level[ 33 ], Exp[ 33 ], Cash[ 33 ], Wins[ 33 ], Lose[ 33 ], Shots[ 33 ], Hits[ 33 ], Hits2[ 33 ], Choose[ 33 ], Grenades[ 33 ];
  108.  
  109. /* Frostnades */
  110.  
  111.     #define TASK_EXPLODE(%1) ( 799 + %1 )
  112.     #define UNTASK_EXPLODE(%1) ( %1 - 799)
  113.    
  114.     #define TASK_UNFREEZE(%1) ( 899 + %1 )
  115.     #define UNTASK_UNFREEZE(%1) ( %1 - 899 )
  116.    
  117.     new bool: g_bFreezed[ 33 ], g_iBeaconSprite;
  118.    
  119.     enum _:FrostSounds
  120.     {
  121.         Explode,
  122.         Hit,
  123.         Unfreeze
  124.     }
  125.    
  126.     new const szFrostSoundsPath[ FrostSounds ][ ] = {
  127.         "warcraft3/frostnova.wav",
  128.         "warcraft3/impalehit.wav",
  129.         "warcraft3/impalelaunch1.wav"
  130.     }
  131.    
  132.    
  133. public plugin_init()
  134. {
  135.     register_plugin( Info[ 0 ], Info[ 1 ], Info[ 2 ] );
  136.    
  137.     register_clcmd( "say", "CmdSay" );
  138.     register_clcmd( "jointeam", "CmdMenu" );
  139.     register_clcmd( "chooseteam", "CmdMenu" );
  140.    
  141.     /* Events */
  142.     register_logevent( "evRoundStart", 2, "1=Round_Start" );
  143.     register_event( "DeathMsg", "evDeathMsg", "a" );
  144.     register_event("ScreenFade","evFlash","be","4=255","5=255","6=255","7>199")
  145.     register_event("CurWeapon", "evCurWeapon", "be", "1=1")
  146.    
  147.     g_FlashMsg = get_user_msgid( "ScreenFade" )
  148.    
  149.     register_event( "ResetHUD", "evResetHud", "b" );
  150.     register_event( "HideWeapon", "evHideWeapon", "b" );
  151.    
  152.     /* Forwards */
  153.     RegisterHam( Ham_Spawn, "player", "FwdSpawn", 1 );
  154.     RegisterHam( Ham_TakeDamage, "player", "FwdTakeDamage", 0 );
  155.     RegisterHam( Ham_TakeDamage, "player", "FwdBlockDamage", 0 );
  156.     RegisterHam( Ham_Weapon_SecondaryAttack, "weapon_scout", "FwdZoom" );
  157.    
  158.     /* Blocks */
  159.     register_forward( FM_ClientKill, "BlockKill" );
  160.    
  161.     /* Messages */
  162.     register_message( get_user_msgid( "SendAudio" ), "MsgAudio" );
  163.     register_message( get_user_msgid( "TextMsg" ), "MsgText" );
  164.    
  165.     /* Frostnades */
  166.     register_forward( FM_SetModel, "Fwd_SetModel_Pre" );
  167.    
  168.     g_Vault = nvault_open("s");
  169.    
  170.     register_forward( FM_PlaybackEvent, "fwShot" );
  171.    
  172.     unregister_forward( FM_PrecacheEvent, g_FwIndex, 1 );
  173.    
  174.     gMaxPlayers = global_get( glb_maxClients );
  175.    
  176.     set_task( 75.0, "AdMessage1", _,_,_, "b" );
  177.     set_task( 90.0, "AdMessage2", _,_,_, "b" );
  178. }
  179.  
  180. public AdMessage1( )
  181. {
  182.     ColorPrint( 0, "^1This server is running^4 %s^3 %s^1 by^4 %s", Info[ 0 ], Info[ 1 ], Info[ 2 ] );
  183.     ColorPrint( 0, "^1This plugin is for^4 Sale^1! Want to^4 Buy^1 it?^3 Contact Skype:^4 Yan1255" );
  184. }
  185. public AdMessage2( )
  186.     ColorPrint( 0, "^1Want to buy^4 Admin^1? Type^4 /^3Buy^1 or^4 Contact Skype:^3 Yan1255", Info[ 0 ], Info[ 1 ], Info[ 2 ] );
  187.  
  188. public plugin_end( )
  189.     nvault_close( g_Vault );
  190.  
  191. public plugin_cfg( )
  192. {
  193.     set_cvar_num( "mp_autoteambalance", 0 );
  194.     set_cvar_num( "mp_limitteams", 0 );
  195.     set_cvar_num( "mp_freezetime", 0 );
  196.     set_cvar_num( "mp_roundtime", 9 );
  197.     set_cvar_num( "sv_airaccelerate", 100 );
  198.     set_cvar_string( "humans_join_team", "any" );
  199.    
  200.     register_message( get_user_msgid( "StatusIcon" ), "Message_StatusIcon" );
  201. }
  202. public plugin_precache()
  203. {
  204.     Shockwave   = precache_model( shock_spr );  
  205.     Laserbeam   = precache_model ( laser_spr )
  206.     Lightning   = precache_model ( light_spr )
  207.     White       = precache_model ( white_spr )
  208.     Trail       = precache_model ( smoke_spr )
  209.     Zbim = precache_model( "sprites/zbeam2.spr" );
  210.    
  211.     precache_model( v_He );
  212.     precache_model( v_Flash );
  213.     precache_model( v_Smoke );
  214.    
  215.     precache_model( "models/Galactic/HNR/Scouts/v_scout3.mdl" );
  216.    
  217.     precache_model( "models/player/alien3/alien3.mdl" );
  218.    
  219.     /*for ( new i = 0; i < MaxScouts; i++ )
  220.         precache_model( v_Scout[ i ] );*/
  221.    
  222.     g_FwIndex = register_forward( FM_PrecacheEvent, "fwPrecache", 1 );
  223.    
  224.    
  225.     for( new i = 0 ; i < FrostSounds ; i ++ )
  226.         precache_sound( szFrostSoundsPath[ i ] );
  227.        
  228.     g_iBeaconSprite = precache_model( "sprites/shockwave.spr" );
  229. }
  230. public GetRandomInfected( )
  231. {
  232.     new Players[ 32 ], PNum;
  233.     get_players( Players, PNum, "aceh", "TERRORIST" );
  234.    
  235.     new iPlayer = Players[ random( PNum ) ];
  236.    
  237.     if ( IsInfected[ iPlayer ] )    return GetRandomInfected( );
  238.    
  239.     IsInfected[ iPlayer ] = true;
  240.    
  241.     fm_set_user_rendering( iPlayer, kRenderFxGlowShell, 0, 255, 255, kRenderNormal, 16 );
  242.    
  243.     if ( Invis )
  244.         fm_set_user_rendering( iPlayer, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0 );
  245.    
  246.     cs_set_user_model( iPlayer, "alien3" );
  247.    
  248.     ShakeScreen( iPlayer );
  249.    
  250.     Choose[ iPlayer ] += 1;
  251.    
  252.     return PLUGIN_HANDLED;
  253. }
  254. /* Forwards */
  255. public FwdTakeDamage( victim, inflictor, attacker, Float:damage, damage_bits )
  256. {
  257.     if ( IsInfected[ attacker ] && !IsInfected[ victim ] && hnr_game )
  258.     {
  259.         IsInfected[ victim ] = true;
  260.         IsInfected[ attacker ] = false;
  261.        
  262.         fm_set_user_rendering( attacker );
  263.         fm_set_user_rendering( victim, kRenderFxGlowShell, 0, 255, 255, kRenderNormal, 16 );
  264.        
  265.         if ( Invis )
  266.             fm_set_user_rendering( victim, kRenderFxGlowShell, 0, 255, 255, kRenderTransAlpha, 0 );
  267.        
  268.         ShakeScreen( victim );
  269.        
  270.         cs_set_user_model( victim, "alien3" );
  271.         cs_reset_user_model( attacker );
  272.        
  273.         hnr_last[ victim ] = hnr_timer;
  274.        
  275.         Hits2[ attacker ] += 1;
  276.         Hits[ victim ] += 1;
  277.        
  278.         /*static szName[ 32 ];get_user_name( attacker, szName, charsmax( szName ) );
  279.         static szName2[ 32 ];get_user_name( victim, szName2, charsmax( szName2 ) );
  280.        
  281.         ColorPrint( 0, "^4%s^3 attacked^4 %s", szName, szName2 );*/
  282.     }
  283. }
  284. public FwdBlockDamage( victim, inflictor, attacker, Float:damage, damage_bits )
  285.     return HAM_SUPERCEDE;
  286.  
  287. public FwdSpawn( client )
  288. {
  289.     fm_strip_user_weapons( client );
  290.    
  291.     AntiFlash[ client ] = false;
  292.     AntiFrost[ client ] = false;
  293.    
  294.     if ( hnr_game ) return user_kill( client );
  295.    
  296.     if ( is_user_alive( client ) )
  297.     {
  298.         fm_strip_user_weapons( client );
  299.        
  300.         fm_give_item( client, "weapon_knife" );
  301.         fm_give_item( client, "weapon_scout" );
  302.         fm_give_item( client, "weapon_hegrenade" );
  303.         fm_give_item( client, "weapon_flashbang" );
  304.         fm_give_item( client, "weapon_flashbang" );
  305.         fm_give_item( client, "weapon_smokegrenade" );
  306.        
  307.         cs_set_user_bpammo( client, CSW_SCOUT, Level[ client ] );
  308.     }
  309.     set_task( 1.0, "FwdRemoveBeam", client );
  310.     IsInfected[ client ] = false;
  311.     cs_reset_user_model( client );
  312.     fm_set_user_rendering( client );
  313.    
  314.     return PLUGIN_HANDLED;
  315. }
  316. public FwdRemoveBeam( client )
  317.     remove_task( client );
  318.    
  319. public grenade_throw( client, GrenadeID, WeaponID )
  320. {
  321.     new r, g, b;
  322.     static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  323.    
  324.     Grenades[ client ] += 1;
  325.    
  326.     switch( WeaponID )
  327.     {
  328.         case CSW_HEGRENADE:
  329.         {
  330.             r = 255;
  331.             g = 0;
  332.             b = 0;
  333.            
  334.             ColorPrint( 0, "^4%s^3 threw an^4 Explosive Grenade^3!", szName );
  335.         }
  336.         case CSW_FLASHBANG:
  337.         {
  338.             r = random( 255 );
  339.             g = random( 255 );
  340.             b = random( 255 );
  341.            
  342.             ColorPrint( 0, "^4%s^3 threw a^4 Flashbang^3!", szName );
  343.         }
  344.         case CSW_SMOKEGRENADE:
  345.         {
  346.             r = 0;
  347.             g = 255
  348.             b = 255;
  349.            
  350.             ColorPrint( 0, "^4%s^3 threw a^4 Frostnade^3!", szName );
  351.         }
  352.     }
  353.     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
  354.     write_byte(TE_BEAMFOLLOW)
  355.     write_short( GrenadeID )
  356.     write_short( Trail )
  357.     write_byte(10)
  358.     write_byte(5)
  359.     write_byte(r)
  360.     write_byte(g)
  361.     write_byte(b)
  362.     write_byte(255)
  363.     message_end()
  364. }
  365. public FwdZoom( )   return BlockZoom ? HAM_SUPERCEDE : HAM_IGNORED;
  366. /* Events */
  367. public evCurWeapon( client )
  368. {
  369.     new Clip, Ammo, Weapon = get_user_weapon( client, Clip, Ammo );
  370.    
  371.     if ( Weapon == CSW_SCOUT )
  372.         set_pev( client, pev_viewmodel2, scout );
  373.        
  374.         //set_pev( client, pev_viewmodel2, v_Scout[ Level[ client ] - 1 ] );
  375.    
  376.     if ( Weapon == CSW_HEGRENADE )
  377.         set_pev( client, pev_viewmodel2, v_He );
  378.        
  379.     if ( Weapon == CSW_FLASHBANG )
  380.         set_pev( client, pev_viewmodel2, v_Flash );
  381.        
  382.     if ( Weapon == CSW_SMOKEGRENADE )
  383.         set_pev( client, pev_viewmodel2, v_Smoke );
  384.    
  385.     return PLUGIN_CONTINUE;
  386. }
  387. public evRoundStart()
  388. {  
  389.     Round += 1;
  390.    
  391.     BlockZoom = false
  392.    
  393.     g_Vote = false;
  394.    
  395.     Voting = 0;
  396.    
  397.     remove_task( 115 );
  398.    
  399.     Event = false;
  400.    
  401.     Invis = false;
  402.    
  403.     switch ( Round )
  404.     {
  405.         case 6:
  406.         {
  407.             evNR( );
  408.         }
  409.         case 7:
  410.         {
  411.             switch ( NR )
  412.             {
  413.                 case 1:
  414.                 {
  415.                     for ( new i; i<get_maxplayers( ); i++ )
  416.                     {
  417.                         if ( !is_user_alive( i ) || !is_user_connected( i ) )   continue;
  418.                        
  419.                         fm_strip_user_weapons( i );
  420.                        
  421.                         fm_give_item( i, "weapon_knife" );
  422.                     }
  423.                 }
  424.                 case 2:
  425.                 {
  426.                     for ( new i; i<get_maxplayers( ); i++ )
  427.                     {
  428.                         if ( !is_user_alive( i ) || !is_user_connected( i ) )   continue;
  429.                        
  430.                         fm_strip_user_weapons( i );
  431.                        
  432.                         fm_give_item( i, "weapon_glock18" );
  433.                         cs_set_user_bpammo( i, CSW_GLOCK18, 40 );
  434.                     }
  435.                 }
  436.                 case 3: BlockZoom = true;
  437.                
  438.                 case 4: Invis = true;
  439.                
  440.                 case 5:
  441.                 {
  442.                    
  443.                     for ( new i; i<get_maxplayers( ); i++ )
  444.                     {
  445.                         if ( !is_user_alive( i ) || !is_user_connected( i ) )   continue;
  446.                        
  447.                         fm_strip_user_weapons( i );
  448.                        
  449.                         fm_give_item( i, "weapon_knife" );
  450.                         fm_give_item( i, "weapon_scout" );
  451.                        
  452.                         cs_set_user_bpammo( i, CSW_SCOUT, Level[ i ] );
  453.                     }
  454.                 }
  455.             }
  456.            
  457.             Round = 0;
  458.             Event = true;
  459.         }
  460.     }
  461.     hnr_game = false;
  462.    
  463.     remove_task( 110 );
  464.     remove_task( 111 );
  465.     remove_task( 112 );
  466.     remove_task( 113 );
  467.     remove_task( 114 );
  468.    
  469.    
  470.     new Players[ 32 ], PNum;
  471.        
  472.     get_players( Players, PNum, "aceh", "TERRORIST" );
  473.        
  474.     if ( PNum < 2 )
  475.     {
  476.         //set_cvar_num( "sv_restart", 4 );
  477.         return ColorPrint( 0, "The game will not start if there are less than^4 2 Players^1!" );
  478.     }
  479.    
  480.     hnr_count = 5;
  481.    
  482.     set_task( 2.0, "evCountdown", 110 );
  483.    
  484.     return PLUGIN_HANDLED;
  485. }
  486. public evCountdown( )
  487. {
  488.     if ( hnr_count <= 0 )
  489.     {
  490.         new Players[ 32 ], PNum;
  491.        
  492.         get_players( Players, PNum, "aceh", "TERRORIST" );
  493.        
  494.         if ( PNum < 2 )
  495.         {
  496.             //set_cvar_num( "sv_restart", 4 );
  497.             return ColorPrint( 0, "The game will not start if there are less than^4 2 Players^1!" );
  498.         }
  499.        
  500.         if ( PNum > 25 )
  501.             GetRandomInfected( );
  502.        
  503.         if ( PNum > 18 )
  504.             GetRandomInfected( );
  505.        
  506.         GetRandomInfected( );
  507.        
  508.         hnr_game = true;
  509.        
  510.         hnr_timer = 20.0;
  511.        
  512.         evTimer( );
  513.        
  514.         return PLUGIN_HANDLED;
  515.     }
  516.    
  517.     set_hudmessage( 255, 130, 0, -1.0, 0.35, 0, 0.0, 1.0, 0.1, 0.1 );
  518.     show_hudmessage( 0, "The game will start in %d Seconds!", hnr_count );
  519.    
  520.     new Vox[ 32 ]; num_to_word( hnr_count, Vox, charsmax( Vox ) );
  521.     client_cmd( 0, "spk ^"vox/%s^"", Vox, (hnr_count>1)?"s":"" );
  522.    
  523.     hnr_count -= 1;
  524.    
  525.     set_task( 1.0, "evCountdown", 110 );
  526.    
  527.     return PLUGIN_HANDLED;
  528. }
  529. public evTimer( )
  530. {
  531.     if ( hnr_timer <= 0.0 )
  532.     {
  533.         new Players[ 32 ], PNum;
  534.        
  535.         get_players( Players, PNum, "aceh", "TERRORIST" );
  536.        
  537.         if ( PNum > 25 )
  538.             set_task( 5.0, "GetRandomInfected", 113 );
  539.        
  540.         if ( PNum > 18 )
  541.             set_task( 5.0, "GetRandomInfected", 112 );
  542.        
  543.         if ( PNum > 1 )
  544.             set_task( 5.0, "GetRandomInfected", 111 );
  545.            
  546.         else return PLUGIN_HANDLED;
  547.            
  548.         set_task( 5.0, "evTimer", 114 );
  549.        
  550.         for ( new z; z<get_maxplayers( ); z++ )
  551.             hnr_last[ z ] = 0.0;
  552.        
  553.         hnr_timer = 20.0;
  554.        
  555.         for ( new i; i<PNum; i++ )
  556.         {
  557.             new iPlayer = Players[ i ];
  558.            
  559.             if ( IsInfected[ iPlayer ] )
  560.                 user_kill( iPlayer );
  561.         }
  562.        
  563.         return PLUGIN_HANDLED;
  564.     }
  565.    
  566.     new szInfected[ 512 ], szInfect[ 64 ], InfectedPlayers[ 32 ], InfectedNum;
  567.    
  568.     get_players( InfectedPlayers, InfectedNum, "aceh", "TERRORIST" );
  569.    
  570.     for ( new i; i<InfectedNum; i++ )
  571.     {
  572.         new iPlayer = InfectedPlayers[ i ];
  573.        
  574.         if ( IsInfected[ iPlayer ] )
  575.         {
  576.             new szName[ 32 ];
  577.             get_user_name( iPlayer, szName, 31 );
  578.            
  579.             formatex( szInfect, charsmax( szInfect ), "^n%s is Infected! [ Hit: %.1f ]", szName, hnr_last[ iPlayer ] );
  580.             add( szInfected, charsmax( szInfected ), szInfect );
  581.         }
  582.     }
  583.    
  584.     //set_hudmessage( 0, 255, 255, -0.75, -0.35, 1, 0.1, 0.1, 0.1, 0.1 );
  585.     set_hudmessage( 0, 255, 255, -1.0, -0.35, 1, 0.1, 0.1, 0.1, 0.1 );
  586.     show_hudmessage( 0, "%.1f Seconds Left!%s", hnr_timer, szInfected );
  587.    
  588.     hnr_timer -= 0.1;
  589.    
  590.     set_task( 0.1, "evTimer", 114 );
  591.    
  592.     return PLUGIN_HANDLED;
  593. }
  594. public evDeathMsg( )
  595. {
  596.     new victim = read_data( 2 );
  597.    
  598.     /*if ( hnr_timer > 0.0 )
  599.     {
  600.         if ( IsInfected[ victim ] )
  601.             GetRandomInfected( );
  602.     }*/
  603.     IsInfected[ victim ] = false;
  604.    
  605.     if ( !hnr_game )    return PLUGIN_HANDLED;
  606.    
  607.     Lose[ victim ] += 1;
  608.    
  609.     new Players[ 32 ], PNum;
  610.    
  611.     get_players( Players, PNum, "aceh", "TERRORIST" );
  612.    
  613.     if ( PNum == 1 )
  614.     {
  615.         for ( new i; i<PNum; i++ )
  616.         {
  617.             new iPlayer = Players[ i ];
  618.            
  619.             hnr_game = false;
  620.            
  621.             remove_task( 110 );
  622.             remove_task( 111 );
  623.             remove_task( 112 );
  624.             remove_task( 113 );
  625.             remove_task( 114 );
  626.            
  627.             BlockZoom = false
  628.            
  629.             new szName[ 32 ];get_user_name( iPlayer, szName, charsmax( szName ) );
  630.            
  631.             Wins[ iPlayer ] += 1;
  632.            
  633.             if ( !g_Beacon[ iPlayer ] )
  634.                 set_task( 0.1, "WinnerBeam", iPlayer, _,_, "b" );
  635.                
  636.             new sPlayers[ 32 ], SNum;
  637.            
  638.             get_players( sPlayers, SNum );
  639.            
  640.             /*for ( new i; i<SNum; i++ )
  641.             {
  642.                 new g_Player = sPlayers[ i ];
  643.                
  644.                 if ( !g_Sounds[ g_Player ] )
  645.                     client_cmd( i, "Music" );
  646.             }*/
  647.            
  648.             set_dhudmessage( 255, 0, 0, -1.0, 0.45, 1, 6.0, 6.0, 0.3, 0.3, true );
  649.             show_dhudmessage( 0, "%s is the winner!", szName );
  650.            
  651.             set_task( 5.0, "RRound", 114 );
  652.            
  653.             hnr_game = false;
  654.            
  655.             new tPlayers[ 32 ], TNum;
  656.            
  657.             get_players( tPlayers, TNum, "ceh", "TERRORIST" );
  658.            
  659.             Exp[ iPlayer ] += TNum;
  660.            
  661.             Cash[ iPlayer ] += TNum * 50
  662.            
  663.             ColorPrint( 0, "^4%s^1 won this round! And he recieved^4 %d Cash^1 and^3 %d Exp^1!", szName, TNum * 50,TNum );
  664.            
  665.             CmdCheckLevel( iPlayer );
  666.         }
  667.     }
  668.    
  669.     if ( PNum == 2 )
  670.     {
  671.         switch ( random_num( 1, 10 ) )
  672.         {
  673.             case 9,10:
  674.             {
  675.                 ColorPrint( 0, "^4Special Finals! No Zoom - Activated" );
  676.                 BlockZoom = true;
  677.             }
  678.         }
  679.     }
  680.    
  681.     return PLUGIN_HANDLED;
  682. }
  683. public evFlash( client )
  684. {
  685.     if ( AntiFlash[ client ] )
  686.     {
  687.         message_begin( MSG_ONE, g_FlashMsg, {0,0,0}, client );
  688.         write_short( 1 );
  689.         write_short( 1 );
  690.         write_short( 1 );
  691.         write_byte( 0 );
  692.         write_byte( 0 );
  693.         write_byte( 0 );
  694.         write_byte(255 );
  695.         message_end( );
  696.        
  697.         return PLUGIN_HANDLED;
  698.     }
  699.    
  700.     new r = random( 255 );
  701.     new g = random( 255 );
  702.     new b = random( 255 );
  703.    
  704.     message_begin( MSG_ONE,g_FlashMsg,{0,0,0},client )
  705.     write_short( read_data( 1 ) )   // Duration
  706.     write_short( read_data( 2 ) )   // Hold time
  707.     write_short( read_data( 3 ) )   // Fade type
  708.     write_byte ( r )        // Red
  709.     write_byte ( g )        // Green
  710.     write_byte ( b )        // Blue
  711.     write_byte ( read_data( 7 ) )   // Alpha
  712.     message_end()
  713.  
  714.     return PLUGIN_HANDLED
  715. }
  716. public evResetHud( client )
  717. {
  718.     set_pdata_int( client, 362, 0 );
  719.     set_pdata_int( client, 361, 1<<3 );
  720. }
  721.  
  722. public evHideWeapon( id )
  723. {
  724.     new iFlags = read_data( 1 );
  725.    
  726.     new HudFlags;
  727.    
  728.     for ( new i = 0; i <= 7; i++ )
  729.     {
  730.         HudFlags |= 1<<i;
  731.     }
  732.    
  733.     if( 1<<3 && (iFlags & 1<<3 != 1<<3) )
  734.     {
  735.         set_pdata_int(id, 362, 0);
  736.         set_pdata_int(id, 361, iFlags|1<<3);
  737.     }
  738.     if( iFlags & HudFlags && !(1<<3 & 1<<7) && is_user_alive(id) )
  739.         set_pdata_cbase(id, 374, FM_NULLENT);
  740. }
  741. /* Others */
  742. public RRound( )    set_cvar_num( "sv_restart", 1 );
  743. public WinnerBeam( client )
  744. {
  745.     new iOrigin[ 3 ]
  746.    
  747.     get_user_origin( client , iOrigin, 1 );
  748.    
  749.     /*new bOrigin[ 3 ];
  750.    
  751.     get_user_origin( client , bOrigin, 3 );
  752.  
  753.     Laser( iOrigin, bOrigin );*/
  754.    
  755.     message_begin(MSG_PVS, SVC_TEMPENTITY, iOrigin)
  756.     write_byte(TE_BEAMCYLINDER);
  757.     write_coord(iOrigin[0]);
  758.     write_coord(iOrigin[1]);
  759.     write_coord(iOrigin[2]);
  760.     write_coord(iOrigin[0]);
  761.     write_coord(iOrigin[1]);
  762.     write_coord(iOrigin[2] + 600);
  763.    
  764.     write_short( White );
  765.    
  766.     write_byte(0);
  767.     write_byte(0);
  768.     write_byte(20);
  769.     write_byte(160);
  770.     write_byte(0);
  771.     write_byte ( random_num( 0, 255 ) );    // Red
  772.     write_byte ( random_num( 0, 255 ) );    // Green
  773.     write_byte ( random_num( 0, 255 ) );    // Blue
  774.     write_byte(100);
  775.     write_byte(0);
  776.     message_end();
  777.    
  778.     set_task( 0.2, "WinnerBeam2", client );
  779. }
  780. public WinnerBeam2( client )
  781. {
  782.     new RGB[ 3 ];
  783.     RGB[ 0 ] = random( 250 );
  784.     RGB[ 1 ] = random( 250 );
  785.     RGB[ 2 ] = random( 250 );
  786.    
  787.     static Origin[ 3 ];
  788.     get_user_origin( client, Origin );
  789.    
  790.     message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
  791.     write_byte( TE_BEAMTORUS );
  792.     write_coord( Origin[ 0 ] );
  793.     write_coord( Origin[ 1 ] );
  794.     write_coord( Origin[ 2 ] );
  795.     write_coord( Origin[ 0 ] );
  796.     write_coord( Origin[ 1 ] );
  797.     write_coord( Origin[ 2 ] + 600 );
  798.     write_short( Zbim );
  799.     write_byte( 0 );
  800.     write_byte( 1 );
  801.     write_byte( 7 );
  802.     write_byte( 80 );  
  803.     write_byte( 1 );
  804.     write_byte( RGB[ 0 ] );
  805.     write_byte( RGB[ 1 ] );
  806.     write_byte( RGB[ 2 ] );
  807.     write_byte( 75 );
  808.     write_byte( 0 );       
  809.     message_end( );
  810. }
  811. /* Block */
  812. public BlockJointeam( client )
  813.     return (CS_TEAM_T <= cs_get_user_team( client ) <= CS_TEAM_CT) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
  814.  
  815. public Message_StatusIcon( iMsgId, iMsgDest, id )  
  816. {  
  817.     static szIcon[ 8 ];  
  818.     get_msg_arg_string( 2, szIcon, charsmax( szIcon ) );  
  819.     if( equal(szIcon, "buyzone") )
  820.     {  
  821.         if( get_msg_arg_int( 1 ) )  
  822.         {  
  823.             set_pdata_int( id, 235, get_pdata_int(id, 235) & ~(1<<0) );
  824.             return PLUGIN_HANDLED;  
  825.         }  
  826.     }
  827.     return PLUGIN_CONTINUE;  
  828. }
  829.  
  830. public BlockKill( client )  return FMRES_SUPERCEDE;
  831.  
  832. /* Client Side */
  833. public client_putinserver( client )
  834. {
  835.     CmdLoad( client );
  836.    
  837.     IsInfected[ client ] = false;
  838.    
  839.     new Players[ 32 ], PNum;
  840.    
  841.     get_players( Players, PNum, "ceh", "TERRORIST" );
  842.    
  843.     if ( PNum < 2 ) set_cvar_num( "sv_restart", 2 );
  844. }
  845.  
  846. public client_disconnect( client )
  847. {
  848.     CmdSave( client );
  849.    
  850.     if ( IsInfected[ client ] )
  851.         GetRandomInfected( );
  852.        
  853.     FwdRemoveBeam( client );
  854.        
  855.     IsInfected[ client ] = false;
  856. }
  857.  
  858. public CmdSay( client )
  859. {
  860.     new szMsg[ 192 ], Arg[ 38 ], Arg2[ 38 ], Arg3[ 32 ];
  861.     read_argv( 1, szMsg, charsmax( szMsg ) );
  862.     parse( szMsg, Arg, charsmax( Arg ), Arg2, charsmax( Arg2 ) , Arg3, charsmax( Arg3 ) );
  863.    
  864.     if ( equal( szMsg, "/menu" ) )  return CmdMenu( client );
  865.    
  866.     if ( equal( szMsg, "/buy" ) || equal( szMsg, "/buyadmin" ) )    return CmdBuy( client );
  867.    
  868.     if ( equal( szMsg, "/shop" ) )  return CmdShop( client );
  869.    
  870.     if ( equal( szMsg, "!rr" ) )
  871.     {
  872.         if ( get_user_flags( client ) & ADMIN_KICK )
  873.             hnr_game = false;
  874.     }
  875.    
  876.     if( equal( Arg, "/stat" ) || equal( Arg, "/stats" ) )
  877.     {
  878.         new g_Player = cmd_target( client, Arg2, 8 );
  879.        
  880.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  881.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  882.        
  883.         if ( equali( szMsg, "/stat" ) || equali( szMsg, "/stats" ) )
  884.         {
  885.             ColorPrint( client, "^4-----------^3%s Stats^4-----------", szName );
  886.            
  887.             ColorPrint( client, "^4[^1 Wins:^3 %d times ^4|^1 Loses:^3 %d times ^4|^1 Chosen:^3 %d times ^4|^1 Hits on You:^3 %d times ^4]", Wins[ client ], Lose[ client ], Choose[ client ], Hits[ client ] );
  888.            
  889.             ColorPrint( client, "^4[^1 Hits on Players:^3 %d times ^4|^1 Shots:^3 %d ^4|^1 Grenades Thrown:^3 %d ^4]", Hits2[ client ], Shots[ client ], Grenades[ client ] );
  890.            
  891.             return ColorPrint( client, "^4-----------^3HNR Stats %s by ^1%s^4-----------", Info[ 1 ], Info[ 2 ] );
  892.         }
  893.        
  894.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  895.        
  896.         ColorPrint( client, "^4-----------^3%s Stats^4----------", szName2 );
  897.        
  898.         ColorPrint( client, "^4[^1 Wins:^3 %d times ^4|^1 Loses:^3 %d times ^4|^1 Chosen:^3 %d times ^4|^1 Hits on You:^3 %d times ^4]", Wins[ g_Player ], Lose[ g_Player ], Choose[ g_Player ], Hits[ g_Player ] );
  899.        
  900.         ColorPrint( client, "^4[^1 Hits on Players:^3 %d times ^4|^1 Shots:^3 %d ^4|^1 Grenades Thrown:^3 %d ^4]", Hits2[ g_Player ], Shots[ g_Player ], Grenades[ g_Player ] );
  901.        
  902.         return ColorPrint( client, "^4-----------^3HNR Stats %s by ^1%s^4-----------", Info[ 1 ], Info[ 2 ] );
  903.     }
  904.    
  905.     if( equal( Arg, "/cash" ) )
  906.     {
  907.         new g_Player = cmd_target( client, Arg2, 8 );
  908.        
  909.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  910.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  911.        
  912.         if ( equali( szMsg, "/cash" ) ) return ColorPrint( client, "^4%s^3 have^4 %d Cash^3.", szName, Cash[ client ] );
  913.        
  914.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  915.        
  916.         return ColorPrint( client, "^4%s^3 have^4 %d Cash^3.", szName2, Cash[ g_Player ] );
  917.     }
  918.    
  919.     if ( equal( Arg, "/gamble" ) )
  920.     {
  921.         if ( equali( szMsg, "/gamble" ) || !is_str_num( Arg2 ) )    return ColorPrint( client, "Syntax: /^4gamble^1 <^4amount^1>" );
  922.        
  923.         new g_Amount = str_to_num( Arg2 );
  924.        
  925.         if ( g_Amount > Cash[ client ] )    return ColorPrint( client, "You don't have this amount of cash." );
  926.        
  927.         if ( g_Amount < 1 ) return ColorPrint( client, "The minimum amount to gamble on is^4 1 Cash^3." );
  928.        
  929.         if ( g_Amount > 10000 ) return ColorPrint( client, "The maxmimum amount to gamble on is^4 10000 Cash^3." );
  930.        
  931.         if ( g_Amount + Cash[ client ] > 100000 )   return ColorPrint( client, "You've reached the maximum amount of cash." );
  932.        
  933.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  934.        
  935.         switch ( random_num( 1, 100 ) )
  936.         {
  937.             case 1..45:
  938.             {
  939.                 ColorPrint( 0, "^4%s^1 gambled on^3 %d Cash^1 and^4 Won^1!", szName, g_Amount );
  940.                 Cash[ client ] += g_Amount;
  941.             }
  942.             case 46..100:
  943.             {
  944.                 ColorPrint( 0, "^4%s^1 gambled on^3 %d Cash^1 and^4 Lost^1!", szName, g_Amount );
  945.                 Cash[ client ] -= g_Amount;
  946.             }
  947.         }
  948.        
  949.         CmdSave( client );
  950.     }
  951.    
  952.     if ( equal( Arg, "/send" ) || equal( Arg, "/transfer" ) )
  953.     {
  954.         new g_Player = cmd_target( client, Arg2, 8 );
  955.        
  956.         if ( equali( szMsg, "/send" ) || equali( szMsg, "/transfer" ) ) return ColorPrint( client, "Syntax: /^4send^1 <^4name^1> <^4amount^1>" );
  957.        
  958.         if ( !g_Player )        return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  959.        
  960.         if ( client == g_Player )   return ColorPrint( client, "You canno't transfer cash to yourself." );
  961.        
  962.         if ( !is_str_num( Arg3 ) )  return ColorPrint( client, "You must type^4 valid^3 numbers only." );
  963.        
  964.         new g_Amount = str_to_num( Arg3 );
  965.        
  966.         if ( g_Amount < 1 ) return ColorPrint( client, "The minimum amount to transfer is^4 1 Cash^3." );
  967.        
  968.         if ( g_Amount + Cash[ g_Player ] > 100000 ) return ColorPrint( client, "If you transfer your cash to this player he will have more than the^4 Max Cash^3." );
  969.        
  970.         if ( Cash[ client ] < g_Amount )        return ColorPrint( client, "You don't have this amount of cash." );
  971.        
  972.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  973.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  974.        
  975.         Cash[ client ] -= g_Amount;
  976.         Cash[ g_Player ] += g_Amount;
  977.        
  978.         CmdSave( client );
  979.         CmdSave( g_Player );
  980.        
  981.         return ColorPrint( client, "^4%s^1 transfered^3 %d Cash^1 to^4 %s^1.", szName, g_Amount, szName2 );
  982.     }
  983.    
  984.     if( equal( Arg, "/exp" ) || equal( Arg, "/xp" ) )
  985.     {
  986.         new g_Player = cmd_target( client, Arg2, 8 );
  987.        
  988.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  989.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  990.        
  991.         if ( equali( szMsg, "/exp" ) || equali( szMsg, "/xp" ) )    return ColorPrint( client, "^4%s^3 have^4 %d Exp^3.", szName, Exp[ client ] );
  992.        
  993.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  994.        
  995.         return ColorPrint( client, "^4%s^3 have^4 %d Exp^3.", szName2, Exp[ g_Player ] );
  996.     }
  997.    
  998.     if( equal( Arg, "/level" ) || equal( Arg, "/lvl" ) )
  999.     {
  1000.         new g_Player = cmd_target( client, Arg2, 8 );
  1001.        
  1002.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  1003.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  1004.        
  1005.         if ( equali( szMsg, "/level" ) || equali( szMsg, "/lvl" ) ) return ColorPrint( client, "^4%s's^3 Level is^4 %d^3.", szName, Level[ client ] );
  1006.        
  1007.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  1008.        
  1009.         return ColorPrint( client, "^4%s's^3 Level is^4 %d^3.", szName2, Level[ g_Player ] );
  1010.     }
  1011.    
  1012.     if( equal( Arg, "/next" ) )
  1013.     {
  1014.         new g_Player = cmd_target( client, Arg2, 8 );
  1015.        
  1016.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  1017.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  1018.        
  1019.         if ( equali( szMsg, "/next" ) ) return ColorPrint( client, "^4%s^3 is missing^4 %d Exp^3 to levelup to^4 Level %d", szName, g_Levels[ Level[ client ] ] - Exp[ client ], Level[ client ] + 1 );
  1020.        
  1021.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  1022.        
  1023.         return ColorPrint( client, "^4%s^3 is missing^4 %d Exp^3 to levelup to^4 Level %d", szName2, g_Levels[ Level[ g_Player ] ] - Exp[ g_Player ], Level[ g_Player ] + 1 );
  1024.     }
  1025.    
  1026.     if( equal( Arg, "/setlevel" ) || equal( Arg, "/slevel" ) || equal( Arg, "/slvl" ) || equal( Arg, "/setlvl" ) )
  1027.     {
  1028.         if ( !(get_user_flags( client ) & ADMIN_IMMUNITY ) )    return ColorPrint( client, "Only^4 Owners^3 can use this command." );
  1029.        
  1030.         new g_Player = cmd_target( client, Arg2, 8 );
  1031.        
  1032.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  1033.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  1034.        
  1035.         if ( equali( szMsg, "/setlevel" ) || equali( szMsg, "/slevel" ) || equali( szMsg, "/slvl" ) || equali( szMsg, "/setlvl" ) ) return ColorPrint( client, "Syntax: /^4setlevel^1 <^4name^1> <^4amount^1>" );
  1036.        
  1037.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  1038.        
  1039.         if( !is_str_num( Arg3 ) )   return ColorPrint( client, "You must type^4 valid numbers^3!" );
  1040.        
  1041.         new g_Amount = str_to_num( Arg3 );
  1042.        
  1043.         if ( g_Amount > 50 )    return ColorPrint( client, "The maximum level is^4 50^3." );
  1044.        
  1045.         Level[ g_Player ] = g_Amount;
  1046.        
  1047.         Exp[ g_Player ] = g_Levels[ Level[ g_Player ] - 1 ];
  1048.        
  1049.         ColorPrint( client, "You set^4 %s's^3 level to^4 %d^3.", szName2, g_Amount );
  1050.        
  1051.         ColorPrint( g_Player, "^1Owner:^4 %s^3 set your level to^4 %d^3.", szName, g_Amount );
  1052.        
  1053.         CmdSave( g_Player );
  1054.        
  1055.         return PLUGIN_HANDLED;
  1056.     }
  1057.    
  1058.     if( equal( Arg, "/setcash" ) || equal( Arg, "/scash" ) || equal( Arg, "/setc" ) )
  1059.     {
  1060.         if ( !(get_user_flags( client ) & ADMIN_IMMUNITY ) )    return ColorPrint( client, "Only^4 Owners^3 can use this command." );
  1061.        
  1062.         new g_Player = cmd_target( client, Arg2, 8 );
  1063.        
  1064.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  1065.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  1066.        
  1067.         if ( equali( szMsg, "/setcash" ) || equali( szMsg, "/scash" ) || equali( szMsg, "/setc" ) ) return ColorPrint( client, "Syntax: /^4setcash^1 <^4name^1> <^4amount^1>" );
  1068.        
  1069.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  1070.        
  1071.         if( !is_str_num( Arg3 ) )   return ColorPrint( client, "You must type^4 valid numbers^3!" );
  1072.        
  1073.         new g_Amount = str_to_num( Arg3 );
  1074.        
  1075.         if ( g_Amount > 100000 )    return ColorPrint( client, "The maximum cash is^4 100000 Cash^3." );
  1076.        
  1077.         Cash[ client ] = g_Amount;
  1078.        
  1079.         ColorPrint( client, "You set^4 %s's^3 cash to^4 %d^3.", szName2, g_Amount );
  1080.        
  1081.         ColorPrint( g_Player, "^1Owner:^4 %s^3 set your cash to^4 %d^3.", szName, g_Amount );
  1082.        
  1083.         CmdSave( g_Player );
  1084.        
  1085.         return PLUGIN_HANDLED;
  1086.     }
  1087.    
  1088.     if( equal( Arg, "/addcash" ) || equal( Arg, "/acash" ) )
  1089.     {
  1090.         if ( !(get_user_flags( client ) & ADMIN_IMMUNITY ) )    return ColorPrint( client, "Only^4 Owners^3 can use this command." );
  1091.        
  1092.         new g_Player = cmd_target( client, Arg2, 8 );
  1093.        
  1094.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  1095.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  1096.        
  1097.         if ( equali( szMsg, "/addcash" ) || equali( szMsg, "/acash" ) ) return ColorPrint( client, "Syntax: /^4addcash^1 <^4name^1> <^4amount^1>" );
  1098.        
  1099.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  1100.        
  1101.         if( !is_str_num( Arg3 ) )   return ColorPrint( client, "You must type^4 valid numbers^3!" );
  1102.        
  1103.         new g_Amount = str_to_num( Arg3 );
  1104.        
  1105.         if ( Cash[ client ] + g_Amount > 100000 )   return ColorPrint( client, "The maximum cash is^4 100000^3." );
  1106.        
  1107.         Cash[ client ] += g_Amount;
  1108.        
  1109.         ColorPrint( client, "You gave^4 %d Cash^3 to^4 %d^3.", g_Amount, szName2 );
  1110.        
  1111.         ColorPrint( g_Player, "^1Owner:^4 %s^3 gave you^4 %d Cash^3.", szName, g_Amount );
  1112.        
  1113.         CmdSave( g_Player );
  1114.        
  1115.         return PLUGIN_HANDLED;
  1116.     }
  1117.    
  1118.     if( equal( Arg, "/removecash" ) || equal( Arg, "/rcash" ) )
  1119.     {
  1120.         if ( !(get_user_flags( client ) & ADMIN_IMMUNITY ) )    return ColorPrint( client, "Only^4 Owners^3 can use this command." );
  1121.        
  1122.         new g_Player = cmd_target( client, Arg2, 8 );
  1123.        
  1124.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  1125.         static szName2[ 32 ];get_user_name( g_Player, szName2, charsmax( szName2 ) );
  1126.        
  1127.         if ( equali( szMsg, "/addcash" ) || equali( szMsg, "/acash" ) ) return ColorPrint( client, "Syntax: /^4addcash^1 <^4name^1> <^4amount^1>" );
  1128.        
  1129.         if( !g_Player ) return ColorPrint( client, "^4%s^3 was not found!", Arg2 );
  1130.        
  1131.         if( !is_str_num( Arg3 ) )   return ColorPrint( client, "You must type^4 valid numbers^3!" );
  1132.        
  1133.         new g_Amount = str_to_num( Arg3 );
  1134.        
  1135.         if ( Cash[ client ] + g_Amount > 100000 )   return ColorPrint( client, "The maximum cash is^4 100000^3." );
  1136.        
  1137.         Cash[ client ] += g_Amount;
  1138.        
  1139.         if ( Cash[ client ] < 0 || Cash[ client ] > 100000 )    Cash[ client ] = 0;
  1140.        
  1141.         ColorPrint( client, "You removed^4 %d Cash^3 from^4 %d^3.", g_Amount, szName2 );
  1142.        
  1143.         ColorPrint( g_Player, "^1Owner:^4 %s^3 removed ^4 %d Cash^3 from you.", szName, g_Amount );
  1144.        
  1145.         CmdSave( g_Player );
  1146.        
  1147.         return PLUGIN_HANDLED;
  1148.     }
  1149.    
  1150.     if ( equal( szMsg, "/admin" ) || equal( szMsg, "/admins" ) )
  1151.     {
  1152.         new Owner[ 5 ], oCounter = 0;
  1153.    
  1154.         new Manager[ 16 ], mCounter = 0;
  1155.        
  1156.         new SuperAdmin[ 16 ], saCounter = 0;
  1157.        
  1158.         new Admins[ 16 ], aCounter = 0;
  1159.        
  1160.         new VIP[ 16 ], vCounter = 0;
  1161.        
  1162.         new szPlayers[ 32 ], pCounter, player;
  1163.        
  1164.         get_players( szPlayers, pCounter, "ch" );
  1165.        
  1166.         for ( new i=0 ; i < pCounter ; i++ )
  1167.         {
  1168.             player = szPlayers[ i ];
  1169.            
  1170.             if ( access( player, ADMIN_IMMUNITY ) )
  1171.             {  
  1172.                 Owner[ oCounter ] = player;
  1173.                
  1174.                 oCounter++;
  1175.                
  1176.                 continue;
  1177.             }
  1178.            
  1179.             if ( access( player, ADMIN_RESERVATION ) )
  1180.             {
  1181.                 Manager[ mCounter ] = player;
  1182.                
  1183.                 mCounter++;
  1184.                
  1185.                 continue;
  1186.             }
  1187.            
  1188.             if ( access( player, ADMIN_BAN ) )
  1189.             {
  1190.                 SuperAdmin[ mCounter ] = player;
  1191.                
  1192.                 saCounter++;
  1193.                
  1194.                 continue;
  1195.             }
  1196.            
  1197.             if ( access( player, ADMIN_KICK ) )
  1198.             {
  1199.                 Admins[ aCounter ] = player;
  1200.                
  1201.                 aCounter++;
  1202.                
  1203.                 continue;
  1204.             }
  1205.            
  1206.             if ( access( player, ADMIN_SLAY ) )
  1207.             {
  1208.                 VIP[ vCounter ] = player;
  1209.                 vCounter++;
  1210.                 continue;
  1211.             }
  1212.         }
  1213.        
  1214.         if (oCounter == 0)  ColorPrint( client, "No ^3Owners^1 Online.");
  1215.        
  1216.         else  
  1217.         {  
  1218.             new szMsg[ 256 ], iPlayer;  
  1219.            
  1220.             for (new z=0 ; z<oCounter ; z++)  
  1221.             {  
  1222.                 iPlayer = Owner[ z ];
  1223.                
  1224.                 add( szMsg, charsmax( szMsg ), GetName( iPlayer ) );
  1225.                
  1226.                 if (z != oCounter-1)    add( szMsg, charsmax( szMsg ), "^1,^4 ");
  1227.             }
  1228.            
  1229.             ColorPrint( client, "Online ^3Owners^1: ^4%s", szMsg );
  1230.         }
  1231.        
  1232.         if (mCounter == 0)  ColorPrint( client,"No ^3Managers^1 Online.");
  1233.        
  1234.         else  
  1235.         {  
  1236.             new szMsg[ 256 ], iPlayer;  
  1237.            
  1238.             for ( new z=0 ; z < mCounter ; z++ )  
  1239.             {  
  1240.                 iPlayer = Manager[ z ];
  1241.                
  1242.                 add( szMsg, charsmax( szMsg ), GetName( iPlayer ) );
  1243.                
  1244.                 if (z != mCounter-1)    add( szMsg, charsmax( szMsg ), "^1,^4 ");
  1245.             }
  1246.            
  1247.             ColorPrint( client, "Online ^3Managers^1: ^4%s", szMsg );
  1248.         }
  1249.        
  1250.         if ( saCounter == 0 )   ColorPrint( client, "No ^3Super-Admins^1 Online." );
  1251.        
  1252.         else  
  1253.         {  
  1254.             new szMsg[ 256 ], iPlayer;  
  1255.            
  1256.             for ( new z=0 ; z < saCounter ; z++ )  
  1257.             {  
  1258.                 iPlayer = SuperAdmin[ z ];
  1259.                
  1260.                 add( szMsg, charsmax( szMsg ), GetName( iPlayer ) );
  1261.                
  1262.                 if (z != saCounter-1)   add( szMsg, charsmax( szMsg ), "^1,^4 " );
  1263.                
  1264.                
  1265.             }
  1266.             ColorPrint( client, "Online ^3Super-Admins^1: ^4%s", szMsg );
  1267.         }
  1268.        
  1269.         if ( aCounter == 0 )    ColorPrint( client, "No ^3Admins^1 Online." );
  1270.        
  1271.         else  
  1272.         {  
  1273.             new szMsg[ 256 ], iPlayer;  
  1274.            
  1275.             for ( new z=0 ; z < aCounter ; z++ )  
  1276.             {  
  1277.                 iPlayer = Admins[ z ];
  1278.                
  1279.                 add( szMsg, charsmax( szMsg ), GetName( iPlayer ) );
  1280.                
  1281.                 if (z != aCounter-1)    add( szMsg, charsmax( szMsg ), "^1,^4 " );
  1282.                
  1283.                
  1284.             }
  1285.             ColorPrint( client, "Online ^3Admins^1: ^4%s", szMsg );
  1286.         }
  1287.        
  1288.         if (vCounter == 0)  ColorPrint( client, "No ^3VIPs^1 Online." );
  1289.        
  1290.         else
  1291.         {
  1292.             new szMsg[ 256 ], iPlayer;
  1293.            
  1294.             for (new z = 0 ; z < vCounter ; z++ )  
  1295.             {  
  1296.                 iPlayer = VIP[ z ];
  1297.                
  1298.                 add( szMsg, charsmax( szMsg ), GetName( iPlayer ) );
  1299.                
  1300.                 if (z != vCounter-1)    add( szMsg, charsmax( szMsg ), "^1,^4 ");
  1301.                
  1302.             }
  1303.            
  1304.             ColorPrint( client, "Online ^3VIPs^1: ^4%s", szMsg );
  1305.         }
  1306.         return PLUGIN_HANDLED;
  1307.     }
  1308.    
  1309.     return PLUGIN_CONTINUE;
  1310. }
  1311. /* Shop */
  1312. public CmdShop( client )
  1313. {
  1314.     new szItem[ 128 ];
  1315.     formatex( szItem, charsmax( szItem ), "HNR Shop Menu \d%s\y by\r %s^n\yYou have\r %d\y cash", Info[ 1 ], Info[ 2 ], Cash[ client ] );
  1316.     new Menu = menu_create( szItem, "SubShop" );
  1317.    
  1318.     menu_additem( Menu, "\rGrenades \yShop", "0" );
  1319.     menu_additem( Menu, "\rWeapons \yShop", "1" );
  1320.     menu_additem( Menu, "\rAmmo \yShop", "2" );
  1321.     menu_additem( Menu, "\rPowers \yShop", "3" );
  1322.    
  1323.     return menu_display( client, Menu );
  1324. }
  1325. public SubShop( client, Menu, Item )
  1326. {
  1327.     if ( Item == MENU_EXIT || Event )   return menu_destroy( Menu );
  1328.    
  1329.     new szItem[ 128 ];
  1330.    
  1331.     switch ( Item )
  1332.     {
  1333.         case 0:
  1334.         {
  1335.             formatex( szItem, charsmax( szItem ), "HNR Grenades Shop \d%s\y by\r %s^n\yYou have\r %d\y cash", Info[ 1 ], Info[ 2 ], Cash[ client ] );
  1336.             new Menu = menu_create( szItem, "SubGrenades" );
  1337.            
  1338.             menu_additem( Menu, "\yExplosive\r [\w 1000\d Cash \r]\d Level 6 Needed", "0" );
  1339.             menu_additem( Menu, "\yFlashbang\r [\w 600\d Cash \r]\d Level 3 Needed", "1" );
  1340.             menu_additem( Menu, "\yFrostnade\r [\w 750\d Cash \r]\d Level 4 Needed", "2" );
  1341.            
  1342.             return menu_display( client, Menu );
  1343.         }
  1344.         case 1:
  1345.         {
  1346.             formatex( szItem, charsmax( szItem ), "HNR Weapons Shop \d%s\y by\r %s^n\yYou have\r %d\y cash", Info[ 1 ], Info[ 2 ], Cash[ client ] );
  1347.             new Menu = menu_create( szItem, "SubWeapons" );
  1348.            
  1349.             menu_additem( Menu, "\yM4A1\r [\w 3500\d Cash \r]\d Level 15 Needed", "0" );
  1350.             menu_additem( Menu, "\yAk47\r [\w 3500\d Cash \r]\d Level 15 Needed", "1" );
  1351.             menu_additem( Menu, "\yGalil\r [\w 3200\d Cash \r]\d Level 13 Needed", "2" );
  1352.             menu_additem( Menu, "\yFamas\r [\w 3000\d Cash \r]\d Level 12 Needed", "3" );
  1353.             menu_additem( Menu, "\yMp5\r [\w 2350\d Cash \r]\d Level 11 Needed", "4" );
  1354.            
  1355.             return menu_display( client, Menu );
  1356.         }
  1357.         case 2:
  1358.         {
  1359.             formatex( szItem, charsmax( szItem ), "HNR Ammo Shop \d%s\y by\r %s^n\yYou have\r %d\y cash", Info[ 1 ], Info[ 2 ], Cash[ client ] );
  1360.             new Menu = menu_create( szItem, "SubAmmo" );
  1361.            
  1362.             menu_additem( Menu, "\y+10 Extra Bullets\r [\w 300\d Cash \r]", "0" );
  1363.             menu_additem( Menu, "\y+20 Extra Bullets\r [\w 600\d Cash \r]", "1" );
  1364.             menu_additem( Menu, "\y+30 Extra Bullets\r [\w 900\d Cash \r]", "2" );
  1365.            
  1366.             return menu_display( client, Menu );
  1367.         }
  1368.         case 3:
  1369.         {
  1370.             formatex( szItem, charsmax( szItem ), "HNR Powers Shop \d%s\y by\r %s^n\yYou have\r %d\y cash", Info[ 1 ], Info[ 2 ], Cash[ client ] );
  1371.             new Menu = menu_create( szItem, "SubPowers" );
  1372.            
  1373.             menu_additem( Menu, "\yAnti-Flash\r [\w 1500\d Cash \r]\d Level 8 Needed", "0" );
  1374.             menu_additem( Menu, "\yAnti-Frost\r [\w 2250\d Cash \r]\d Level 12 Needed", "1" );
  1375.            
  1376.             return menu_display( client, Menu );
  1377.         }
  1378.     }
  1379.    
  1380.     return menu_destroy( Menu );
  1381. }
  1382.  
  1383. public SubGrenades( client, Menu, Item )
  1384. {
  1385.     if ( Item == MENU_EXIT || Event )   return menu_destroy( Menu );
  1386.    
  1387.     if ( !is_user_alive( client ) ) return ColorPrint( client, "You need to be^4 Alive^3 to purchase this." );
  1388.    
  1389.     if ( Cash[ client ] < g_GrenadesCost[ Item ] )  return ColorPrint( client, "Your missing^4 %d^3 cash to purchase this.", g_GrenadesCost[ Item ] - Cash[ client ] );
  1390.    
  1391.     if ( Level[ client ] < g_GrenadesLvls[ Item ] ) return ColorPrint( client, "You need to be^4 Level %d^3 to purchase this.", g_GrenadesLvls[ Item ] );
  1392.    
  1393.     fm_give_item( client, g_GrenadesClass[ Item ] );
  1394.    
  1395.     Cash[ client ] -= g_GrenadesCost[ Item ];
  1396.    
  1397.     return menu_destroy( Menu );
  1398. }
  1399.  
  1400. public SubWeapons( client, Menu, Item )
  1401. {
  1402.     if ( Item == MENU_EXIT || Event )   return menu_destroy( Menu );
  1403.    
  1404.     if ( !is_user_alive( client ) ) return ColorPrint( client, "You need to be^4 Alive^1 to purchase this." );
  1405.    
  1406.     if ( Cash[ client ] < g_WeaponsCost[ Item ] )   return ColorPrint( client, "Your missing^4 %d^3 cash to purchase this.", g_WeaponsCost[ Item ] - Cash[ client ] );
  1407.    
  1408.     if ( Level[ client ] < g_WeaponsLvls[ Item ] )  return ColorPrint( client, "You need to be^4 Level %d^3 to purchase this.", g_WeaponsLvls[ Item ] );
  1409.    
  1410.     if ( user_has_weapon( client, g_WeaponsCSW[ Item ] ) )  return ColorPrint( client, "You already own this item." );
  1411.    
  1412.     fm_give_item( client, g_WeaponsClass[ Item ] );
  1413.    
  1414.     Cash[ client ] -= g_WeaponsCost[ Item ];
  1415.    
  1416.     return menu_destroy( Menu );
  1417. }
  1418.  
  1419. public SubAmmo( client, Menu, Item )
  1420. {
  1421.     if ( Item == MENU_EXIT || Event )   return menu_destroy( Menu );
  1422.    
  1423.     if ( !is_user_alive( client ) ) return ColorPrint( client, "You need to be^4 Alive^1 to purchase this." );
  1424.    
  1425.     if ( Cash[ client ] < g_AmmoCost[ Item ] )  return ColorPrint( client, "Your missing^4 %d^3 cash to purchase this.", g_AmmoCost[ Item ] - Cash[ client ] );
  1426.    
  1427.     new Clip, Ammo, Weapon = get_user_weapon( client, Clip, Ammo );
  1428.    
  1429.     if ( Weapon == CSW_KNIFE || Weapon == CSW_C4 )  return ColorPrint( client, "You canno't purchase ammo for this weapon." );
  1430.    
  1431.     cs_set_user_bpammo( client, Weapon, cs_get_user_bpammo( client, Weapon ) + g_AmmoAmount[ Item ] );
  1432.    
  1433.     Cash[ client ] -= g_AmmoCost[ Item ];
  1434.    
  1435.     return menu_destroy( Menu );
  1436. }
  1437.  
  1438. public SubPowers( client, Menu, Item )
  1439. {
  1440.     if ( Item == MENU_EXIT || Event )   return menu_destroy( Menu );
  1441.    
  1442.     if ( !is_user_alive( client ) ) return ColorPrint( client, "You need to be^4 Alive^1 to purchase this." );
  1443.    
  1444.     if ( Cash[ client ] < g_PowersCost[ Item ] )    return ColorPrint( client, "Your missing^4 %d^3 cash to purchase this.", g_PowersCost[ Item ] - Cash[ client ] );
  1445.    
  1446.     if ( Level[ client ] < g_PowersLvls[ Item ] )   return ColorPrint( client, "You need to be^4 Level %d^3 to purchase this.", g_PowersLvls[ Item ] );
  1447.    
  1448.     switch ( Item )
  1449.     {
  1450.         case 0:
  1451.         {
  1452.             if ( AntiFlash[ client ] )  return ColorPrint( client, "You already own this power." );
  1453.            
  1454.             AntiFlash[ client ] = true;
  1455.         }
  1456.         case 1:
  1457.         {
  1458.             if ( AntiFrost[ client ] )  return ColorPrint( client, "You already own this power" );
  1459.            
  1460.             AntiFrost[ client ] = true;
  1461.         }
  1462.     }
  1463.    
  1464.     Cash[ client ] -= g_PowersCost[ Item ];
  1465.    
  1466.     return menu_destroy( Menu );
  1467. }
  1468.    
  1469. /* Levels */
  1470. public CmdLevelUp( client )
  1471. {
  1472.     new iOrigin[ 3 ];get_user_origin( client, iOrigin );
  1473.    
  1474.     message_begin(MSG_PVS, SVC_TEMPENTITY, iOrigin)
  1475.     write_byte(TE_EXPLOSION2)   // TE_
  1476.     write_coord( iOrigin[0] )   // X
  1477.     write_coord( iOrigin[1] )   // Y
  1478.     write_coord( iOrigin[2] )   // Z
  1479.     write_byte(188)         // start color
  1480.     write_byte(10)          // num colors
  1481.     message_end()
  1482. }
  1483. public CmdCheckLevel( client )
  1484. {
  1485.     while ( Exp[ client ] >= g_Levels[ Level[ client ] ] )
  1486.     {
  1487.         Level[ client ] += 1;
  1488.        
  1489.         static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  1490.        
  1491.         ColorPrint( client, "^4%s^3 just leveled up to^4 Level %d^3.", szName, Level[ client ] );
  1492.        
  1493.         CmdFlashScreen( client );
  1494.        
  1495.         CmdSave( client );
  1496.        
  1497.         CmdLevelUp( client );
  1498.        
  1499.         break;
  1500.     }
  1501. }
  1502.  
  1503. public CmdFlashScreen( client )
  1504. {
  1505.     message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, client);
  1506.     write_short(1<<10);
  1507.     write_short(1<<10);
  1508.     write_short(0);
  1509.     write_byte(0);
  1510.     write_byte(255);
  1511.     write_byte(215);
  1512.     write_byte(100);
  1513.     message_end( );
  1514. }
  1515. public CmdSave( client )
  1516. {
  1517.     static szAuthid[ 35 ];get_user_authid( client, szAuthid, charsmax( szAuthid ) );
  1518.     static szAddress[ 35 ];get_user_ip( client, szAddress, charsmax( szAddress ) );
  1519.    
  1520.     new VaultKey[ 64 ], VaultData[ 256 ];
  1521.    
  1522.     if ( equali( "STEAM_ID_LAN", szAuthid ) )
  1523.         formatex( VaultKey, charsmax( VaultKey ), "%s-HNRLevels", szAddress );
  1524.        
  1525.     else formatex( VaultKey, charsmax( VaultKey ), "%s-HNRLevels", szAuthid );
  1526.        
  1527.     formatex( VaultData, charsmax( VaultData ), "%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#",
  1528.     Exp[ client ], Level[ client ], Cash[ client ],Wins[ client ], Lose[ client ],
  1529.     Shots[ client ], Hits[ client ], Hits2[ client ], Choose[ client ], Grenades[ client ], g_Scout[ client ] );
  1530.    
  1531.     nvault_set( g_Vault, VaultKey, VaultData );
  1532. }
  1533.  
  1534. public CmdLoad( client )
  1535. {
  1536.     static szAuthid[ 35 ];get_user_authid( client, szAuthid, charsmax( szAuthid ) );
  1537.     static szAddress[ 35 ];get_user_ip( client, szAddress, charsmax( szAddress ) );
  1538.    
  1539.     new VaultKey[ 64 ], VaultData[ 256 ];
  1540.    
  1541.     if ( equali( "STEAM_ID_LAN", szAuthid ) )
  1542.         formatex( VaultKey, charsmax( VaultKey ), "%s-HNRLevels", szAddress );
  1543.        
  1544.     else formatex( VaultKey, charsmax( VaultKey ), "%s-HNRLevels", szAuthid );
  1545.    
  1546.     formatex( VaultData, charsmax( VaultData ), "%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#%d#",
  1547.     Exp[ client ], Level[ client ], Cash[ client ],Wins[ client ], Lose[ client ],
  1548.     Shots[ client ], Hits[ client ], Hits2[ client ], Choose[ client ], Grenades[ client ], g_Scout[ client ] );
  1549.    
  1550.     nvault_get( g_Vault, VaultKey, VaultData, charsmax( VaultData ) );
  1551.    
  1552.     replace_all( VaultData, charsmax( VaultData ), "#", " ");
  1553.    
  1554.     new SetExp[ 32 ], SetLevel[ 32 ], SetCash[ 32 ], SetWins[ 32 ], SetLose[ 32 ], SetShots[ 32 ],
  1555.     SetHits[ 32 ], SetHits2[ 32 ], SetChoose[ 32 ], SetGrenades[ 32 ];
  1556.    
  1557.     parse( VaultData, SetExp, 31, SetLevel, 31, SetCash, 31, SetWins, 31, SetLose, 31, SetShots, 31,
  1558.     SetHits, 31, SetHits2, 31, SetChoose, 31, SetGrenades, 31 );
  1559.    
  1560.     Exp[ client ]       = str_to_num( SetExp );
  1561.     Level[ client ]     = str_to_num( SetLevel );
  1562.     Cash[ client ]      = str_to_num( SetCash );
  1563.    
  1564.     Wins[ client ]      = str_to_num( SetWins );
  1565.     Lose[ client ]      = str_to_num( SetLose );
  1566.     Shots[ client ]     = str_to_num( SetShots );
  1567.     Hits[ client ]      = str_to_num( SetHits );
  1568.     Hits2[ client ]     = str_to_num( SetHits2 );
  1569.     Choose[ client ]    = str_to_num( SetChoose );
  1570.     Grenades[ client ]  = str_to_num( SetGrenades );
  1571. }
  1572.  
  1573. /* Main Menu */
  1574.  
  1575. public CmdMenu( client )
  1576. {
  1577.     new szItem[ 128 ];
  1578.     formatex( szItem, charsmax( szItem ), "HNR Main Menu \d%s\y by\r %s", Info[ 1 ], Info[ 2 ] );
  1579.    
  1580.     new Menu = menu_create( szItem, "SubMenu" );
  1581.    
  1582.     formatex( szItem, charsmax( szItem ), "\ySounds\w:\r %s", g_Sounds[ client ]?"Disabled":"Enabled" );
  1583.     menu_additem( Menu, szItem, "0" );
  1584.    
  1585.     formatex( szItem, charsmax( szItem ), "\yLaser Shot\w:\r %s", g_Laser[ client ]?"Disabled":"Enabled" );
  1586.     menu_additem( Menu, szItem, "1" );
  1587.    
  1588.     formatex( szItem, charsmax( szItem ), "\yBeacon\w:\r %s^n", g_Beacon[ client ]?"Disabled":"Enabled" );
  1589.     menu_additem( Menu, szItem, "2" );
  1590.    
  1591.     menu_additem( Menu, "\rPlayers \dMenus^n", "3" );
  1592.     menu_additem( Menu, "\yOpen\r Shop", "4" );
  1593.    
  1594.     return menu_display( client, Menu );
  1595. }
  1596. public SubMenu( client, Menu, Item )
  1597. {
  1598.     if ( Item == MENU_EXIT )    return menu_destroy( Menu );
  1599.    
  1600.     switch ( Item )
  1601.     {
  1602.         case 0: g_Sounds[ client ] = !g_Sounds[ client ];
  1603.         case 1: g_Laser[ client ] = !g_Laser[ client ];
  1604.         case 2: g_Beacon[ client ] = !g_Beacon[ client ];
  1605.         case 3: return CmdPlayers( client );
  1606.         case 4: return CmdShop( client );
  1607.     }
  1608.    
  1609.     CmdMenu( client );
  1610.     return menu_destroy( Menu );
  1611. }
  1612. public CmdPlayers( client )
  1613. {
  1614.     new szItem[ 128 ];
  1615.     formatex( szItem, charsmax( szItem ), "HNR Players Menu\d %s\y by\r %s", Info[ 1 ], Info[ 2 ] );
  1616.    
  1617.     new Menu = menu_create( szItem, "SubPlayers" );
  1618.    
  1619.     new Players[ 32 ], PNum, szTempid[ 32 ];
  1620.    
  1621.     get_players( Players, PNum, "ch" );
  1622.    
  1623.     for ( new i; i<PNum; i++ )
  1624.     {
  1625.         new iPlayer = Players[ i ];
  1626.        
  1627.         new szName[ 32 ];get_user_name( iPlayer, szName, charsmax( szName ) );
  1628.        
  1629.         num_to_str( iPlayer, szTempid, charsmax( szTempid ) );
  1630.        
  1631.         formatex( szItem, charsmax( szItem ), "\y%s\r [\w Lvl %d \d|\w %d Exp \d|\w %d Cash \r]", szName, Level[ iPlayer ], Exp[ iPlayer ], Cash[ iPlayer ] );
  1632.        
  1633.         menu_additem( Menu, szItem, szTempid );
  1634.     }
  1635.    
  1636.     return menu_display( client, Menu );
  1637. }
  1638.  
  1639. public SubPlayers( client, Menu, Item )
  1640. {
  1641.     if ( Item == MENU_EXIT )    return menu_destroy( Menu );
  1642.    
  1643.     CmdPlayers( client );
  1644.    
  1645.     return menu_destroy( Menu );
  1646. }
  1647.            
  1648.  
  1649. /* Buy Menu */
  1650. new gMonth[ 33 ], gAccess[ 33 ];
  1651.  
  1652. new const g_Access[ ][ ] =
  1653. {
  1654.     "VIP", "Admin", "Super-Admin", "Manager"
  1655. };
  1656. new const g_Cost[ ] =
  1657. {
  1658.     20, 40, 50, 60
  1659. };
  1660. public CmdBuy( client )
  1661. {
  1662.     new szItem[ 128 ];
  1663.     formatex( szItem, charsmax( szItem ), "HNR Players Menu\d %s\y by\r %s", Info[ 1 ], Info[ 2 ] );
  1664.    
  1665.     new Menu = menu_create( szItem, "SubBuy" );
  1666.    
  1667.     formatex( szItem, charsmax( szItem ), "I want to buy\r %s Access", g_Access[ gAccess[ client ] ] );
  1668.     menu_additem( Menu, szItem, "0" );
  1669.    
  1670.     formatex( szItem, charsmax( szItem ), "I want the\r %s Access\w for\r %d Months", g_Access[ gAccess[ client ] ], gMonth[ client ] );
  1671.     menu_additem( Menu, szItem, "1" );
  1672.    
  1673.     formatex( szItem, charsmax( szItem ), "It will cost\r %d Shekels^n^n\yContact Skype:\r Yan1255", g_Cost[ gAccess[ client ] ] * gMonth[ client ] );
  1674.     menu_additem( Menu, szItem, "2" );
  1675.    
  1676.     return menu_display( client, Menu );
  1677. }
  1678. public SubBuy( client, Menu, Item )
  1679. {
  1680.     if ( Item == MENU_EXIT )    return menu_destroy( Menu );
  1681.    
  1682.     switch ( Item )
  1683.     {
  1684.         case 0:
  1685.         {
  1686.             if ( gAccess[ client ] == 3 )
  1687.             {
  1688.                 gAccess[ client ] = 0;
  1689.                 return CmdBuy( client );
  1690.             }
  1691.            
  1692.             gAccess[ client ] += 1;
  1693.         }
  1694.         case 1:
  1695.         {
  1696.             if ( gMonth[ client ] == 12 )
  1697.             {
  1698.                 gMonth[ client ] = 0;
  1699.                 return CmdBuy( client );
  1700.             }
  1701.            
  1702.             gMonth[ client ] += 1;
  1703.         }
  1704.     }
  1705.    
  1706.     CmdBuy( client );
  1707.     return menu_destroy( Menu );
  1708. }
  1709.        
  1710. /* Messages */
  1711. public MsgAudio( )
  1712. {
  1713.     new szString[ 32 ];
  1714.     get_msg_arg_string( 2, szString, charsmax( szString ) )
  1715.    
  1716.     if ( equali( szString, "%!MRAD_FIREINHOLE" ) )
  1717.         return PLUGIN_HANDLED;
  1718.    
  1719.     return PLUGIN_CONTINUE;
  1720. }
  1721. public MsgText()
  1722. {
  1723.     new szString[ 32 ];
  1724.    
  1725.     if ( str_to_num( szString ) > 0 )
  1726.     {
  1727.         get_msg_arg_string( 3, szString, charsmax( szString ) );
  1728.         if ( equali( szString, "#Game_radio" ) )
  1729.         {
  1730.             get_msg_arg_string( 5, szString, charsmax( szString ) );
  1731.            
  1732.             if ( equali( szString, "#Fire_in_the_hole" ) )
  1733.                 return PLUGIN_HANDLED;
  1734.         }
  1735.     }
  1736.     return PLUGIN_CONTINUE;
  1737. }
  1738. /* Laser Shot */
  1739.  
  1740. new const g_GunsEvents[ ][ ] = { "events/scout.sc" };
  1741.  
  1742. public fwPrecache( type, const name[ ] )
  1743. {
  1744.     for ( new i = 0; i < sizeof g_GunsEvents; ++i )
  1745.     {
  1746.         if ( equal( g_GunsEvents[ i ], name ) )
  1747.         {
  1748.             g_GunsEvents_Bitsum |= ( 1<<get_orig_retval( ) );
  1749.             return FMRES_HANDLED;
  1750.         }
  1751.     }
  1752.    
  1753.     return FMRES_IGNORED;
  1754. }
  1755. public fwShot( flags, shooter, eventid )
  1756. {
  1757.     Shots[ shooter ] += 1;
  1758.    
  1759.     if ( !( g_GunsEvents_Bitsum & ( 1<<eventid ) ) || !(1 <= shooter <= gMaxPlayers ) || g_Laser[ shooter ] )
  1760.         return FMRES_IGNORED;
  1761.    
  1762.     new iOrigin[ 3 ], bOrigin[ 3 ];
  1763.    
  1764.     get_user_origin( shooter , iOrigin, 1 );
  1765.     get_user_origin( shooter , bOrigin, 3 );
  1766.     Laser( iOrigin, bOrigin );
  1767.    
  1768.     return FMRES_HANDLED;
  1769. }
  1770.  
  1771. /* FrostNade */
  1772. public Fwd_SetModel_Pre( iEnt, const Model[] )
  1773. {
  1774.     new iOwner = pev( iEnt, pev_owner );
  1775.     if( !pev_valid( iEnt ) || !equal( Model, "models/w_smokegrenade.mdl" ) || !is_user_connected( iOwner ) )
  1776.         return;
  1777.     set_pev( iEnt, pev_nextthink, get_gametime( ) + 5.0 );
  1778.     set_task( 1.5, "fnExplodeNade", TASK_EXPLODE( iEnt ) );
  1779. }
  1780.  
  1781. public fnExplodeNade( Task_ID )
  1782. {
  1783.     new iEnt = UNTASK_EXPLODE( Task_ID );
  1784.     if( !pev_valid( iEnt ) )
  1785.         return;
  1786.     new iOwner = pev( iEnt, pev_owner ), Float: g_flOrigin[ 3 ], g_iOrigin[ 3 ], Float: g_flPlayerOrigin[ 3 ];
  1787.    
  1788.     pev( iEnt, pev_origin, g_flOrigin );
  1789.    
  1790.     g_iOrigin[ 0 ] = floatround( g_flOrigin[ 0 ] );
  1791.     g_iOrigin[ 1 ] = floatround( g_flOrigin[ 1 ] );
  1792.     g_iOrigin[ 2 ] = floatround( g_flOrigin[ 2 ] );
  1793.        
  1794.     CmdExplodeBeacon( g_iOrigin )
  1795.    
  1796.     engfunc( EngFunc_EmitSound, iEnt, CHAN_WEAPON, szFrostSoundsPath[ Explode ], 1.0, ATTN_NORM, 0, PITCH_NORM );
  1797.    
  1798.     for( new i = 1 ; i < get_maxplayers( ) ; i ++ )
  1799.     {
  1800.         if( !is_user_connected( i ) || !is_user_alive( i ) || i == iOwner || g_bFreezed[ i ] || AntiFrost[ i ] )
  1801.             continue;
  1802.            
  1803.         pev( i, pev_origin, g_flPlayerOrigin );
  1804.        
  1805.         if( get_distance_f( g_flPlayerOrigin, g_flOrigin ) > 240.0 )
  1806.             continue;
  1807.        
  1808.         g_bFreezed[ i ] = true;
  1809.        
  1810.         set_task( 2.5, "Fwd_Unfreeze", TASK_UNFREEZE( i ) );
  1811.            
  1812.         new Float: g_flGlowColor[ 3 ];
  1813.         g_flGlowColor[ 0 ] = 0.0;
  1814.         g_flGlowColor[ 1 ] = 80.0;
  1815.         g_flGlowColor[ 2 ] = 200.0;
  1816.        
  1817.         set_pev( i, pev_renderfx, kRenderFxGlowShell );
  1818.         set_pev( i, pev_rendercolor, g_flGlowColor );
  1819.         set_pev( i, pev_rendermode, kRenderNormal );
  1820.         set_pev( i, pev_renderamt, 80.0 );
  1821.        
  1822.         set_pev( i, pev_flags, pev( i, pev_flags ) | FL_FROZEN );
  1823.        
  1824.         engfunc( EngFunc_EmitSound, i, CHAN_WEAPON, szFrostSoundsPath[ Hit ], 1.0, ATTN_NORM, 0, PITCH_NORM)   
  1825.            
  1826.         message_begin( MSG_ONE, get_user_msgid("ScreenFade"), _, i);
  1827.         write_short( ~0 );
  1828.         write_short( ~0 );
  1829.         write_short( 0x0004 );
  1830.         write_byte( 0 );
  1831.         write_byte( 255 );
  1832.         write_byte( 255 );
  1833.         write_byte( 100 );
  1834.         message_end( );
  1835.         set_pev( i, pev_flags, pev( i, pev_flags ) | FL_FROZEN );
  1836.     }
  1837.    
  1838.     engfunc( EngFunc_RemoveEntity , iEnt )
  1839. }
  1840.  
  1841. public Fwd_Unfreeze( Task_ID )
  1842. {
  1843.     new client = UNTASK_UNFREEZE( Task_ID );
  1844.    
  1845.     new Float: g_flGlowColor[ 3 ];
  1846.     g_flGlowColor[ 0 ] = 250.0;
  1847.     g_flGlowColor[ 1 ] = 250.0;
  1848.     g_flGlowColor[ 2 ] = 250.0;
  1849.    
  1850.     if ( Invis && IsInfected[ client ] )
  1851.         fm_set_user_rendering( client, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 0 );
  1852.        
  1853.     else {
  1854.         set_pev( client, pev_renderfx, kRenderFxNone );
  1855.         set_pev( client, pev_rendercolor, g_flGlowColor );
  1856.         set_pev( client, pev_rendermode, kRenderNormal );
  1857.         set_pev( client, pev_renderamt, 16.0 );
  1858.     }
  1859.    
  1860.     message_begin( MSG_ONE, get_user_msgid("ScreenFade"), _, client);
  1861.     write_short( 0 );
  1862.     write_short( 0 );
  1863.     write_short( 0 );
  1864.     write_byte( 0 );
  1865.     write_byte( 0 );
  1866.     write_byte( 0 );
  1867.     write_byte( 0 );
  1868.     message_end( );
  1869.    
  1870.     g_bFreezed[ client ] = false;
  1871.    
  1872.     set_pev( client, pev_flags, pev( client, pev_flags ) & ~FL_FROZEN );
  1873.    
  1874.     engfunc( EngFunc_EmitSound, client, CHAN_WEAPON, szFrostSoundsPath[ Unfreeze ], 1.0, ATTN_NORM, 0, PITCH_NORM)
  1875. }
  1876.  
  1877. public CmdExplodeBeacon( const g_iOrigin[3] )
  1878. {
  1879.     message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
  1880.     write_byte( TE_BEAMCYLINDER );
  1881.     write_coord( g_iOrigin[0] );
  1882.     write_coord( g_iOrigin[1] );
  1883.     write_coord( g_iOrigin[2] );
  1884.     write_coord( g_iOrigin[0] );
  1885.     write_coord( g_iOrigin[1] );
  1886.     write_coord( g_iOrigin[2] + 360);
  1887.     write_short( g_iBeaconSprite );
  1888.     write_byte( 0 );
  1889.     write_byte( 0 );
  1890.     write_byte( 8 );
  1891.     write_byte( 60 );
  1892.     write_byte( 0 );
  1893.     write_byte( 0 );
  1894.     write_byte( 255 );
  1895.     write_byte( 255 );
  1896.     write_byte( 200 );
  1897.     write_byte( 3 );
  1898.     message_end();
  1899. }
  1900. /* Events */
  1901.  
  1902. public evNR( )
  1903. {
  1904.     g_Random    = random_num( 3, 4 );
  1905.    
  1906.     g_Num       = g_Random;
  1907.    
  1908.     Voting = 0;
  1909.    
  1910.     vCount = 15;
  1911.    
  1912.     Votes[ 0 ] = Votes[ 1 ] = Votes[ 2 ] = Votes[ 3 ] = 0;
  1913.    
  1914.     g_Vote = true;
  1915.    
  1916.     CmdVote( );
  1917.    
  1918.     set_task( 1.0, "CmdVote", 115, _,_, "a", 15 );
  1919.    
  1920.     return PLUGIN_HANDLED;
  1921. }
  1922. public CmdVote( )
  1923. {
  1924.     if ( !g_Vote )  return PLUGIN_HANDLED;
  1925.    
  1926.     new szItem[ 128 ];
  1927.     formatex( szItem, charsmax( szItem ), "HNR Vote Menu\d %s\y by\r %s^n\yVote for the event you want for\r Next Round\y!", Info[ 1 ], Info[ 2 ] );
  1928.    
  1929.     VoteMenu = menu_create( szItem, "SubVote" );
  1930.    
  1931.     if ( Voting == 0 )
  1932.     {
  1933.         menu_additem( VoteMenu, "Knife Only - \r[\d 0% \r]\w - \r[\d 0 Votes \r]", "0" );
  1934.         menu_additem( VoteMenu, "Pistols Only - \r[\d 0% \r]\w - \r[\d 0 Votes \r]", "1" );
  1935.         menu_additem( VoteMenu, "No Zoom - \r[\d 0% \r]\w - \r[\d 0 Votes \r]", "2" );
  1936.        
  1937.         formatex( szItem, charsmax( szItem ), "%s - \r[\d 0% \r]\w - \r[\d 0 Votes \r]\w -^n^n\r%d\w Seconds Left to vote!", g_EventsNames[ g_Num ], vCount  );
  1938.         menu_additem( VoteMenu, szItem, "3" );
  1939.     }
  1940.     else
  1941.     {
  1942.         formatex( szItem, charsmax( szItem ), "Knife Only - \r[\d %d%% \r]\w - \r[\d %d Votes \r]", Votes[ 0 ] * 100 / Voting, Votes[ 0 ] );
  1943.         menu_additem( VoteMenu, szItem, "0" );
  1944.        
  1945.         formatex( szItem, charsmax( szItem ), "Pistols Only - \r[\d %d%% \r]\w - \r[\d %d Votes \r]", Votes[ 1 ] * 100 / Voting, Votes[ 1 ] );
  1946.         menu_additem( VoteMenu, szItem, "1" );
  1947.        
  1948.         formatex( szItem, charsmax( szItem ), "No Zoom - \r[\d %d%% \r]\w - \r[\d %d Votes \r]", Votes[ 2 ] * 100 / Voting, Votes[ 2 ] );
  1949.         menu_additem( VoteMenu, szItem, "2" );
  1950.        
  1951.         formatex( szItem, charsmax( szItem ), "%s - \r[\d %d%% \r]\w - \r[\d %d Votes \r]\w -^n^n\r%d\w Seconds Left to vote!", g_EventsNames[ g_Num ], Votes[ 3 ] * 100 / Voting, Votes[ 3 ], vCount  );
  1952.         menu_additem( VoteMenu, szItem, "3" );
  1953.     }
  1954.    
  1955.     vCount -= 1;
  1956.    
  1957.     new Players[ 32 ], PNum;
  1958.    
  1959.     get_players( Players, PNum, "ch" );
  1960.    
  1961.     for ( new i; i<PNum; i++ )
  1962.     {
  1963.         new iPlayer = Players[ i ];
  1964.        
  1965.         CloseMenu( iPlayer );
  1966.        
  1967.         if ( vCount <= 0 )
  1968.         {
  1969.             CmdEndVote( );
  1970.            
  1971.             Voted[ iPlayer ] = false;
  1972.            
  1973.             return PLUGIN_HANDLED;
  1974.         }
  1975.        
  1976.         menu_setprop( VoteMenu, MPROP_EXIT, MEXIT_NEVER );
  1977.        
  1978.         menu_display( iPlayer, VoteMenu );
  1979.     }
  1980.    
  1981.    
  1982.     return PLUGIN_HANDLED;
  1983. }
  1984. public SubVote( client, Menu, Item )
  1985. {
  1986.     if ( Voted[ client ] || !g_Vote )   return PLUGIN_HANDLED;
  1987.    
  1988.     Votes[ Item ] += 1;
  1989.     Voted[ client ] = true;
  1990.     Voting += 1;
  1991.    
  1992.     static szName[ 32 ];get_user_name( client, szName, charsmax( szName ) );
  1993.    
  1994.     switch ( Item )
  1995.     {
  1996.         case 3:     return ColorPrint( 0, "^4%s^1 voted for^3 %s^1!", g_EventsNames[ g_Num ] );
  1997.         default:    return ColorPrint( 0, "^4%s^1 voted for^3 %s^1!", g_EventsNames[ Item ] );
  1998.     }
  1999.    
  2000.     return PLUGIN_HANDLED;
  2001. }
  2002.  
  2003. public CloseMenu( client )  show_menu( client, 0, "^n", 1 );
  2004.  
  2005. public CmdEndVote( )
  2006. {
  2007.     if ( !g_Vote )  return PLUGIN_HANDLED;
  2008.    
  2009.     if ( Votes[ 0 ] > Votes[ 1 ] || Votes[ 0 ] > Votes[ 2 ] || Votes[ 0 ] > Votes[ 3 ] )
  2010.     {
  2011.         NR = 1;
  2012.         ColorPrint( 0, "^4Knife Only^1 will be the^3 Next Round^4 Event^1!" );
  2013.     }
  2014.     else if ( Votes[ 1 ] > Votes[ 0 ] || Votes[ 1 ] > Votes[ 2 ] || Votes[ 1 ] > Votes[ 3 ] )
  2015.     {
  2016.         NR = 2;
  2017.         ColorPrint( 0, "^4Pistols Only^1 will be the^3 Next Round^4 Event^1!" );
  2018.     }
  2019.     else if ( Votes[ 2 ] > Votes[ 0 ] || Votes[ 2 ] > Votes[ 1 ] || Votes[ 2 ] > Votes[ 3 ] )
  2020.     {
  2021.         NR = 3;
  2022.         ColorPrint( 0, "^4No Zoomy^1 will be the^3 Next Round^4 Event^1!" );
  2023.     }
  2024.     else if ( Votes[ 3 ] > Votes[ 0 ] || Votes[ 3 ] > Votes[ 1 ] || Votes[ 3 ] > Votes[ 2 ] )
  2025.     {
  2026.         NR = g_Num;
  2027.         ColorPrint( 0, "^4%s^1 will be the^3 Next Round^4 Event^1!", g_EventsNames[ g_Num ] );
  2028.     }
  2029.    
  2030.     else
  2031.     {
  2032.         evNR( );
  2033.         ColorPrint( 0, "The votes are tied!^4 Revote^3 Starting^1!" );
  2034.     }
  2035.     return PLUGIN_HANDLED;
  2036. }
  2037.        
  2038. /* Stocks */
  2039. stock ColorPrint( const client, const string[], any:... )
  2040. {
  2041.     new msg[ 191 ], players[ 32 ], count = 1;
  2042.    
  2043.     static len; len = formatex( msg, charsmax( msg ), "^3[^4 HitAndRun ^3] " );
  2044.    
  2045.     vformat( msg[ len ], charsmax( msg ) - len, string, 3 );
  2046.    
  2047.     if( client )  players[ 0 ] = client;
  2048.    
  2049.     else    get_players( players,count,"ch" );
  2050.    
  2051.     for ( new i = 0; i < count; i++ )
  2052.     {
  2053.         if( is_user_connected( players[ i ] ) )
  2054.         {
  2055.             message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] );
  2056.            
  2057.             write_byte( players[ i ] );
  2058.            
  2059.             write_string( msg );
  2060.            
  2061.             message_end( );
  2062.         }
  2063.     }
  2064.     return PLUGIN_HANDLED;
  2065. }
  2066.  
  2067. stock Laser( iOrigin[3] , bOrigin[3] )
  2068. {
  2069.     message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
  2070.     write_byte(0);
  2071.     write_coord(iOrigin[0]);        // X
  2072.     write_coord(iOrigin[1]);        // Y
  2073.     write_coord(iOrigin[2]);        // Z
  2074.     write_coord(bOrigin[0]);        // X Axis
  2075.     write_coord(bOrigin[1]);        // Y Axis
  2076.     write_coord(bOrigin[2]);        // Z Axis
  2077.    
  2078.     switch ( random_num( 1, 3) )        // Sprite
  2079.     {
  2080.         case 1: write_short( Shockwave );
  2081.         case 2: write_short( Laserbeam );
  2082.         case 3: write_short( Lightning );
  2083.         case 4: write_short( White );
  2084.     }
  2085.    
  2086.     write_byte(1);              // STart Frame
  2087.     write_byte(5);              // Frame Rate
  2088.     write_byte(7);              // Life
  2089.     write_byte(30);             // Width
  2090.     write_byte(10);             // Noise
  2091.     write_byte ( random_num( 0, 255 ) );    // Red
  2092.     write_byte ( random_num( 0, 255 ) );    // Green
  2093.     write_byte ( random_num( 0, 255 ) );    // Blue
  2094.     write_byte(255);            // Alpha
  2095.     write_byte(0);              // Speed
  2096.     message_end();
  2097. }
  2098.  
  2099. stock ShakeScreen( client )
  2100. {
  2101.     message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "ScreenShake" ), _, client );
  2102.     write_short( 10 << 12 );
  2103.     write_short( 5 << 12 );
  2104.     write_short( 10 << 12 );
  2105.     message_end( );
  2106. }
  2107. stock GetName( const client )
  2108. {
  2109.     static Name[ 128 ];
  2110.    
  2111.     get_user_name( client, Name, charsmax( Name ) );
  2112.    
  2113.     return Name;
  2114. }
Advertisement
Add Comment
Please, Sign In to add comment