Advertisement
Akc3n7

All Vip

May 1st, 2023
580
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 4.33 KB | None | 0 0
  1. #include < amxmodx >
  2. #include < cstrike >
  3. #include < hamsandwich >
  4. #include < fakemeta_util >
  5.  
  6. new g_round[33]
  7.  
  8. const WEAPON_BITSUM = (1<<CSW_SCOUT) | (1<<CSW_XM1014) | (1<<CSW_MAC10) | (1<<CSW_AUG) | (1<<CSW_UMP45) | (1<<CSW_SG550) | (1<<CSW_P90) |
  9. (1<<CSW_FAMAS) | (1<<CSW_AWP) | (1<<CSW_MP5NAVY) | (1<<CSW_M249) | (1<<CSW_M3) | (1<<CSW_M4A1) | (1<<CSW_TMP) | (1<<CSW_G3SG1) | (1<<CSW_SG552) |
  10. (1<<CSW_AK47) | (1<<CSW_GALIL);
  11.  
  12. enum {
  13.     SCOREATTRIB_ARG_PLAYERID = 1,
  14.     SCOREATTRIB_ARG_FLAGS
  15. }
  16.  
  17. enum ( <<= 1 ) {
  18.     SCOREATTRIB_FLAG_NONE = 0,
  19.     SCOREATTRIB_FLAG_DEAD = 1,
  20.     SCOREATTRIB_FLAG_BOMB,
  21.     SCOREATTRIB_FLAG_VIP
  22. }
  23.  
  24. public plugin_init() {
  25.  
  26.        register_plugin("All Vip", "1.0", "A k c 3 n 7")
  27.        RegisterHam(Ham_Spawn, "player", "PlayerPostSpawn", 1)
  28.  
  29.        register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib")
  30.        set_task( 60.0, "message", _, _, _, "b" );
  31. }
  32.  
  33. public menu( id ) {
  34.                      
  35.        new menu = menu_create( "Weapons", "menu_handler" )  
  36.        menu_additem( menu, "\rM4A1-DG-HE-FLASH" );
  37.        menu_additem( menu, "\rAK47-DG-HE-FLASH" );
  38.        menu_additem( menu, "\rAWP-DG-HE-FLASH" );
  39.  
  40.        menu_setprop( menu, MPROP_EXIT, MEXIT_ALL)
  41.        menu_display( id, menu, 0 );
  42. }
  43.  
  44. public message(id) {
  45.  
  46.        print_color(0, "!eVIP Free pentru toti jucatorii nostri!")
  47. }
  48.  
  49. public MessageScoreAttrib(iMsgId, iDest, iReceiver) {
  50.  
  51.        set_msg_arg_int(SCOREATTRIB_ARG_FLAGS, ARG_BYTE, SCOREATTRIB_FLAG_VIP)
  52. }
  53.  
  54. public PlayerPostSpawn(id) {
  55.    
  56.     if(!is_user_alive(id)) return      
  57.    
  58.     if( g_round[ id ] > 1 ) {
  59.         menu( id )
  60.     }      
  61.     else {
  62.        
  63.         g_round[ id ]++
  64.     }
  65.    
  66.     if( g_round[ id ] > 0 ) {
  67.        
  68.         switch( cs_get_user_team( id ) )
  69.         {  
  70.             case  CS_TEAM_T:   fm_strip_user_gun( id, CSW_GLOCK18, "weapon_glock18"), fm_give_item( id, "weapon_deagle"), cs_set_user_bpammo( id, CSW_DEAGLE, 35 )
  71.             case  CS_TEAM_CT:  fm_strip_user_gun( id, CSW_USP, "weapon_usp"), fm_give_item( id, "weapon_deagle"), cs_set_user_bpammo( id, CSW_DEAGLE, 35 )
  72.  
  73.             }
  74.     }
  75.     g_round[id]++
  76. }
  77.        
  78. public menu_handler( id, menu, item )
  79. {  
  80.     switch( item )
  81.     {
  82.         case 0:
  83.         {
  84.                         drop_primary( id )
  85.                         fm_give_item(id, "weapon_m4a1"), cs_set_user_bpammo(id, CSW_M4A1, 90)
  86.                         fm_give_item(id, "weapon_deagle"), cs_set_user_bpammo( id, CSW_DEAGLE, 35 );
  87.                         fm_give_item(id, "weapon_hegrenade"), fm_give_item(id, "weapon_flashbang")
  88.                        
  89.         }
  90.         case 1:
  91.         {
  92.                         drop_primary( id )
  93.                         fm_give_item(id, "weapon_ak47"), cs_set_user_bpammo(id, CSW_M4A1, 90)
  94.                         fm_give_item(id, "weapon_deagle"), cs_set_user_bpammo( id, CSW_DEAGLE, 35 );
  95.                         fm_give_item(id, "weapon_hegrenade"), fm_give_item(id, "weapon_flashbang")
  96.         }
  97.                 case 2:
  98.         {
  99.                         drop_primary( id )
  100.                         fm_give_item(id, "weapon_awp"), cs_set_user_bpammo(id, CSW_M4A1, 90)
  101.                         fm_give_item(id, "weapon_deagle"), cs_set_user_bpammo( id, CSW_DEAGLE, 35 );
  102.                         fm_give_item(id, "weapon_hegrenade"), fm_give_item(id, "weapon_flashbang")
  103.         }
  104.         }
  105.     menu_destroy( menu )
  106.         return PLUGIN_HANDLED;
  107. }
  108.  
  109. drop_primary(id)
  110. {
  111.     static weapons[32], num
  112.     get_user_weapons(id, weapons, num)
  113.  
  114.     for (new i = 0; i < num; i++)
  115.     {
  116.         if (WEAPON_BITSUM & (1<<weapons[i]))
  117.         {
  118.             static wname[32];
  119.             get_weaponname(weapons[i], wname, sizeof wname - 1)
  120.  
  121.             engclient_cmd(id, "drop", wname)
  122.         }
  123.     }
  124. }
  125.  
  126. stock print_color( const id, const input[ ], any:... )
  127. {
  128.     new count = 1, players[ 32 ]
  129.    
  130.     static msg[ 191 ]
  131.     vformat( msg, 190, input, 3 )
  132.    
  133.     replace_all( msg, 190, "!v", "^4" ) //- verde
  134.     replace_all( msg, 190, "!g", "^1" ) //- galben
  135.     replace_all( msg, 190, "!e", "^3" ) //- echipa
  136.     replace_all( msg, 190, "!n", "^0" ) //- normal
  137.    
  138.     if( id ) players[ 0 ] = id; else get_players( players, count, "ch" )
  139.         {
  140.    
  141.     for( new i = 0; i < count; i++ )
  142.     {
  143.         if( is_user_connected( players[ i ] ) )
  144.         {
  145.             message_begin( MSG_ONE_UNRELIABLE, get_user_msgid( "SayText" ), _, players[ i ] )
  146.             write_byte( players[ i ] );
  147.             write_string( msg );
  148.             message_end( );
  149.         }
  150.     }
  151. }
  152. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement