Cerere plugin VIP Gold

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
Reloader
Membru, skill 0
Membru, skill 0
Posts: 47
Joined: 30 Aug 2013, 19:53
Detinator Steam: Da
CS Status: Ma joc pe SURF.ECILA.RO:27015
Detinator server CS: DA - SURF.ECILA.RO
Has thanked: 1 time
Contact:

15 Dec 2013, 10:55

-Sa aibe VIPS_Players.ini (nu conteaza numele) unde sa adaug vipurile. Cer asta deoarece daca vreau sa dau cuiva si admin si VIP, daca ii adaug flagul H (de exemplu) nu mai apare la /who .
-Grenazi gratis in fiecare runda (1 he, 2 flashbang, 1 smoke)
-Sa aibe /vips unde sa arate VIP`s conectati.
-In fiecare runda sa apara un meniu cu 2 seturi de arme : 1. Golden m4a1 + golden deagle, 2. Golden ak47 + golden deagle.
-Armele golden sa aibe +50 damage (nu neaparat 50, orice plus de damage e bun, X2 damage, 30 etc.)
-VIP`s sa aibe NoRecoil.
-Sa necesite flagul V.
-Sa aibe vip.html (motd cu detalii despre vip).
-Sa aibe skin special.

Am aici un plugin care are armele golden, grenazi, /vips, vip.html , dar mai trebuie vips.ini , norecoil, skin, sa modificati flagul, si as mai dori si sa modificati numele la aceste modele: v_golden_m4a1, p_golden_m4a1 ; in v_m4a1_golden, p_m4a1_golden .
Sursa plugin:
SMA | Afiseaza codul
/*                
   // CVAR 
    
   bonus_status "1"         // CVAR sa fie activat Pluginul BONUS 1- ON /0 - OFF 
   bonus_maxhealth "255"      // CVAR MAXIMUM de bonus cat sa aibe un player default 255 

   bonus_knife "0"            // CVAR BONUS kill cutit kill 0 dezactivat / default 10 
   bonus_knifeheadshot "20"    // CVAR BONUS kill cutit kill/headshot 0 dezactivat / default 20 
   bonus_kill "25"            // BOnus kill 
   bonus_hs", "55")         // Bonus kill HS    
       
*/ 
#include <amxmodx> 
#include <fun> 
#include <amxmisc> 
#include <cstrike> 
#include <colorchat> 
#include <hamsandwich> 
#include <fakemeta_util> 


#define PLUGIN   "Classic VIP" 
#define VERSIUNE "0.1" 

#define CLASSIC_VIP ADMIN_LEVEL_H 

static const COLORG[] = "^x04" 
static const COLORD[] = "^x01" 
static const COLORT[] = "^x03" 

/* 
new v_Ak47_Gold [ ] = "models/v_golden_ak47.mdl" 
new p_Ak47_Gold [ ] = "models/p_golden_ak47.mdl" 

new v_M4a1_Gold [ ] = "models/v_golden_m4a1_UP.mdl" 
new p_M4a1_Gold [ ] = "models/p_golden_m4a1_UP.mdl" 

new v_Golden_Deagle [ ] = "models/v_golden_deagle.mdl" 
new p_Golden_Deagle [ ] = "models/p_golden_deagle.mdl" 
*/ 

new b_Status, b_MaxHealth, b_Kill, b_Knife, b_Headshot, b_KnifeHeadshot 
new maxplayers, gmsgSayText 
//, g_msgSayText 

new ViewModels [ ] [ ] = { 
    
   "models/v_golden_m4a1.mdl", 
   "models/v_golden_ak47.mdl", 
   "models/v_golden_deagle.mdl" 
} 

new PlayersModels [ ] [ ] = { 
    
   "models/p_golden_m4a1.mdl",    
   "models/p_golden_ak47.mdl", 
   "models/p_golden_deagle.mdl" 
} 

public plugin_init ( ) { 

   register_plugin ( PLUGIN, VERSIUNE, "zenix aka lucylucy" ); 

   register_clcmd ( "say /goldmenu", "ApperNext", CLASSIC_VIP ); 
   register_clcmd ( "say_team /goldmenu", "ApperNext", -1 ); 
   register_clcmd("say /wantgold", "ShowMotd"); 

   register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" ); 
   register_event( "DeathMsg", "EventKillBonus", "a", "1>0" ); 

   RegisterHam ( Ham_Spawn, "player", "ApperNext", 1 ); 
   RegisterHam ( Ham_Spawn, "player", "Player_Spawn", 1); 
   RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" ); 
    
   maxplayers = get_maxplayers() 
   gmsgSayText = get_user_msgid("SayText") 
   register_clcmd("say", "handle_say") 
    
   register_logevent("round_start", 2, "1=Round_Start") 
    
   // CVAR-uri    
    
   b_Status = register_cvar("bonus_status", "1");   // CVAR sa fie activat Pluginul BONUS 1- ON /0 - OFF 
   b_MaxHealth = register_cvar("bonus_maxhealth", "2000");   // CVAR MAXIMUM de bonus cat sa aibe un player default 255 

   b_Knife = register_cvar("bonus_knife", "0");      // CVAR BONUS kill cutit kill 0 dezactivat / default 10 
   b_KnifeHeadshot = register_cvar("bonus_knifeheadshot", "1000"); // CVAR BONUS kill cutit kill/headshot 0 dezactivat / default 20 
   b_Kill = register_cvar("bonus_kill", "500");   // BOnus kill 
   b_Headshot = register_cvar("bonus_hs", "500");   // Bonus kill HS 
    

} 

public plugin_precache ( ) { 
/* 
   precache_model ( v_Ak47_Gold ) 
   precache_model ( p_Ak47_Gold ) 

   precache_model ( v_M4a1_Gold ) 
   precache_model ( p_M4a1_Gold ) 

   precache_model ( v_Golden_Deagle ) 
   precache_model ( p_Golden_Deagle ) 
*/ 
   new lucy; 
   for ( lucy = 0; lucy < sizeof ( ViewModels ); lucy++ ) 
      engfunc ( EngFunc_PrecacheModel, ViewModels [ lucy ] ); 
   new zenix; 
   for ( zenix = 0; zenix < sizeof ( PlayersModels ); zenix++ ) 
      engfunc ( EngFunc_PrecacheModel, PlayersModels [ zenix ] );    
       
   m_spriteTexture = precache_model("sprites/dot.spr")    
} 

    
public Player_Spawn(id) 
{ 
      new iPlayers [ 32 ], iNum, i; 
   get_players ( iPlayers, iNum ); 
    
   for ( i = 0; i < iNum; i++ ) 
   { 
      if( !is_user_alive ( iPlayers [ i ] ) ) 
         continue; 

      if(get_user_flags(id) & CLASSIC_VIP) { 
       
      fm_strip_user_weapons ( iPlayers [ i ] ); 
      set_pdata_int ( iPlayers [ i ], 116, 0 ); 
      give_item(id, "weapon_deagle") 
      give_item(id, "weapon_knife") 
      fm_give_item(id, "weapon_hegrenade") 
                fm_give_item(id, "weapon_hegrenade")              
                give_item(id, "weapon_flashbang")  
                give_item(id, "weapon_flashbang") 
      give_item(id, "weapon_smokegrenade") 
   } 
   } 
} 

/* 
 if(is_user_alive(id)) 
    { 
        new CsTeams:team = cs_get_user_team(id) 
        switch(team) 
        { 
            case 0: 
            { 
                strip_user_weapons(id) 
                give_item(id, "weapon_knife") 
      give_item(id, "weapon_hegrenade") 
                give_item(id, "weapon_hegrenade")                
                give_item(id, "weapon_flashbang") 
                give_item(id, "weapon_flashbang") 
      give_item(id, "weapon_smokegrenade") 
            } 

   } 

    } 
*/ 

public ApperNext ( id ) { 
    
   if ( get_user_team ( id ) == 1 && get_user_flags(id) & CLASSIC_VIP ) { 
       
      set_task( 0.1, "ArmeVip", id ); 
   } 
    
   if ( get_user_team ( id ) == 2 && get_user_flags(id) & CLASSIC_VIP ) { 
       
      set_task( 0.1, "ArmeVip", id ); 
   } 
    
} 

public ArmeVip ( id, level, cid ) { 

   new menu = menu_create ( "\rARME \yVIP", "ArmeVipGiver" ); 

   menu_additem ( menu, "\wM4A1 + Deagle \yGOLDEN \r X2 DMG", "1", 0); 
   menu_additem ( menu, "\wAK47 + Deagle \yGOLDEN \r X2 DMG", "2", 0); 
    
   menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL ); 
   menu_display ( id, menu, 0 ); 
    
    
   return 1; 
} 

public ArmeVipGiver ( id, menu, item ) { 

   if( item == MENU_EXIT ) 
      { 
         return 1; 
      } 
    
   new data [ 6 ], szName [ 64 ]; 
   new access, callback; 
   menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback ); 
   new key = str_to_num ( data ); 
    
   switch(key) 
   { 
      case 1: 
      { 
         fm_give_item(id, "weapon_m4a1"); 
         fm_give_item(id, "weapon_deagle");       
         cs_set_user_bpammo(id, CSW_M4A1, 90); 
         cs_set_user_bpammo(id, CSW_DEAGLE, 35) 

         ColorChat ( id, TEAM_COLOR, "Ai Primit M4A1 + Deagle Golden !"); 
      } 
      case 2: 
      { 
         fm_give_item(id, "weapon_ak47"); 
         fm_give_item(id, "weapon_deagle");       
         cs_set_user_bpammo(id, CSW_AK47, 90); 
         cs_set_user_bpammo(id, CSW_DEAGLE, 35);    
       
         ColorChat ( id, TEAM_COLOR, "Ai Primit AK47 + Deagle Golden !");          
      } 
   } 
   return 1; 
} 

public CurrentWeapon ( id ) { 
    
   new szWeapon = get_user_weapon ( id ) ; 
   if ( szWeapon == CSW_M4A1 && get_user_flags( id ) & CLASSIC_VIP ) { 
       
       
      set_pev ( id, pev_viewmodel2, ViewModels [ 0 ] ); 
      set_pev ( id, pev_weaponmodel2, PlayersModels [ 0 ] ); 
       
   } 
    
   if ( szWeapon == CSW_AK47 && get_user_flags( id ) & CLASSIC_VIP) { 
       
      set_pev ( id, pev_viewmodel2, ViewModels [ 1 ] ); 
      set_pev ( id, pev_weaponmodel2, PlayersModels [ 1 ] ); 
       
   } 

   if ( szWeapon == CSW_DEAGLE && get_user_flags( id ) & CLASSIC_VIP) { 
       
      set_pev ( id, pev_viewmodel2, ViewModels [ 2 ] ); 
      set_pev ( id, pev_weaponmodel2, PlayersModels [ 2 ] ); 
       
   } 
    
   return 1; 
} 

public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits ) { 

    if ( get_user_weapon ( iAttacker ) == CSW_M4A1 && get_user_flags( iAttacker ) & CLASSIC_VIP   ) { 
        
        SetHamParamFloat( 4, fDamage * 2.0); 
        return HAM_HANDLED; 
        
    } 
    
    if (  get_user_weapon ( iAttacker ) == CSW_AK47 && get_user_flags( iAttacker ) & CLASSIC_VIP ) { 
        
        SetHamParamFloat( 4, fDamage * 2.0); 
        return HAM_HANDLED; 
        
    } 
    
    if ( get_user_weapon ( iAttacker ) == CSW_DEAGLE && get_user_flags( iAttacker ) & CLASSIC_VIP ) { 
        
        SetHamParamFloat( 4, fDamage * 2.0); 
        return HAM_HANDLED; 
        
    } 
    
    return HAM_IGNORED; 
    
} 


public ShowMotd(id) { 
        new iCfgDir[32], iFile[192]; 
        
        get_configsdir(iCfgDir, charsmax(iCfgDir)); 
        formatex(iFile, charsmax(iFile), "%s/vip.html", iCfgDir); 

        show_motd(id, iFile); 
} 
/* 
public client_authorized ( id ) { 

   set_task(30.0, "PrintChat" ,id) 

} 

public PrintChat ( id ) { 

   //client_print(id, print_chat, "\r[VIP] \wScrie in chat \r/wantvip \wpentru a vedea Beneficile VIP.") 
   ColorChat ( id, GREEN, "Scrie in chat /wantvip pentru a vedea beneficiile VIP !"); 

} 
*/ 

/* 
    new killer = read_data(1); 
    new victim = read_data(2); 
    new headshot = read_data(3); 
*/ 

public EventKillBonus() { 
    new killer 
    new victim 
    new headshot 
    new weapon = get_user_weapon(killer); 
    new num; 
    
    if(killer == victim || !get_pcvar_num(b_Status) || !is_user_connected(victim) || !is_user_alive(killer) && get_user_flags( killer ) && CLASSIC_VIP) 
        return PLUGIN_HANDLED; 
    
    if(headshot && weapon == CSW_KNIFE ) { 
        num = get_pcvar_num(b_KnifeHeadshot) 
        GiveHealth(killer, num) 
        HudMessage(killer, "Ai primit +%ihp", num) 
    } else if(headshot) { 
        num = get_pcvar_num(b_Headshot) 
        GiveHealth(killer, num) 
        HudMessage(killer, "Ai primit +%ihp pentru HS", num) 
    } else if(weapon == CSW_KNIFE) { 
        num = get_pcvar_num(b_Knife) 
        GiveHealth(killer, num) 
        HudMessage(killer, "Ai primit +%ihp", num) 
    } else { 
        num = get_pcvar_num(b_Kill) 
        GiveHealth(killer, num) 
        HudMessage(killer, "Ai primit +%ihp pentru Kill", num) 
    } 
    return PLUGIN_CONTINUE; 
} 

GiveHealth(id, count) 
    set_user_health(id, min( (get_user_health(id) + count), get_pcvar_num(b_MaxHealth) )) 

stock HudMessage(const id, const input[], any:...) { 
    static msg[191]; 
    vformat(msg, 190, input, 3); 
    
    set_hudmessage(255, 255, 0, 0.27, 0.14, 0, 5.0, 5.0, 0.0, 0.0, -1); 
    show_hudmessage(id, "%s^n%s", msg) 
} 
/* 
stock client_printcolor(id, const message[], any:...) 
{ 
   static buffer[512], argscount 
   argscount = numargs() 
    
   if (!id) { 
       
      static players[32], num, player, i, i2 
      get_players(players, num , "ch") 
          
      for (i = 0; i < num; i++) { 
          
         player = players 
          
         static changed[5], changedcount 
         changedcount = 0 
          
         for (i2 = 2; i2 < argscount; i2++) 
         { 
            if (getarg(i2) == LANG_PLAYER) 
            { 
               setarg(i2, 0, player) 
               changed[changedcount] = i2 
               changedcount++ 
            } 
         } 
          
         vformat(buffer, charsmax(buffer), message, 3) 
          
         replace_all(buffer, charsmax(buffer), "/g", "^4") 
         replace_all(buffer, charsmax(buffer), "/y", "^1") 
       
         message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player) 
         write_byte(player) 
         write_string(buffer) 
         message_end() 
          
         for (i2 = 0; i2 < changedcount; i2++) 
            setarg(changed[i2], 0, LANG_PLAYER) 
      } 
   } 
   else { 
       
      vformat(buffer, charsmax(buffer), message, 3) 
       
      replace_all(buffer, charsmax(buffer), "/g", "^4") 
      replace_all(buffer, charsmax(buffer), "/y", "^1") 
       
      message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, id) 
      write_byte(id) 
      write_string(buffer) 
      message_end() 
   } 
} 
*/ 
public handle_say(id) { 
   new said[192] 
   read_args(said,192) 
   if( ( containi(said, "vips") != -1 && containi(said, "vips") != -1 ) || contain(said, "/vips") != -1 ) 
      set_task(0.1,"print_viplist",id) 
   return PLUGIN_CONTINUE 
} 

public print_viplist(user) 
{ 
   new adminnames[33][32] 
   new message[256] 
   new id, count, x, len 
    
   for(id = 1 ; id <= maxplayers ; id++) 
      if(is_user_connected(id)) 
         if(get_user_flags(id) & CLASSIC_VIP) 
            get_user_name(id, adminnames[count++], 31) 

   len = format(message, 255, "%s VIPI ONLINE: ",COLORG) 
   if(count > 0) { 
      for(x = 0 ; x < count ; x++) { 
         len += format(message[len], 255-len, "^x03%s%s ", adminnames[x], x < (count-1) ? ", ":"", COLORT) 
         if(len > 96 ) { 
            print_message(user, message) 
            len = format(message, 255, "%s ",COLORG) 
         } 
      } 
      print_message(user, message) 
   } 
   else { 
      len += format(message[len], 255-len, "^x01Nu sunt VIPI online.", COLORD) 
      print_message(user, message) 
   } 
    
} 

print_message(id, msg[]) { 
   message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id) 
   write_byte(id) 
   write_string(msg) 
   message_end() 
}
Image
---------------
ZM.ECILA.RO:27015
Contact : Y!M - alexandrucures
Reloader
Membru, skill 0
Membru, skill 0
Posts: 47
Joined: 30 Aug 2013, 19:53
Detinator Steam: Da
CS Status: Ma joc pe SURF.ECILA.RO:27015
Detinator server CS: DA - SURF.ECILA.RO
Has thanked: 1 time
Contact:

15 Dec 2013, 15:43

Vreau ca meniul sa fie doar pentru CT . ;]]
Image
---------------
ZM.ECILA.RO:27015
Contact : Y!M - alexandrucures
Reloader
Membru, skill 0
Membru, skill 0
Posts: 47
Joined: 30 Aug 2013, 19:53
Detinator Steam: Da
CS Status: Ma joc pe SURF.ECILA.RO:27015
Detinator server CS: DA - SURF.ECILA.RO
Has thanked: 1 time
Contact:

17 Dec 2013, 22:05

UP? :|
Image
---------------
ZM.ECILA.RO:27015
Contact : Y!M - alexandrucures
Post Reply

Return to “Cereri”

  • Information