Jump to content
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    [Partage]Vip menu


    iNex

    Recommended Posts

    #include <sourcemod>
    #include <sdktools>
    #include "colors.inc"
    
    
    new Handle:g_vip_fumietat;
    new Handle:g_vip_flashetat;
    new Handle:g_vip_vieetat;
    new Handle:g_vip_vitesseetat;
    
    new Handle:g_vip_health = INVALID_HANDLE;
    new Handle:g_vip_speed = INVALID_HANDLE;
    
    new iHealth = 0;
    
    public Plugin:myinfo = 
    { 
    name = "Menu VIP", 
    author = "Delachambre / iNex", 
    description = "Vipmenu - Correction par iNex", 
    version = "1.0", 
    url = "http://vip-magnetik.fr / http://daily-studio.com/forum" 
    };
    
    
    public OnPluginStart()
    {
    RegAdminCmd("sm_vipmenu", Command_vipmenu, ADMFLAG_CUSTOM1);
    HookEvent("round_start", OnRoundStart); 
    g_vip_fumietat = CreateConVar("sm_vip_fumietat", "1.0", "Active le bonus Fumi", _, true, 0.0, true, 1.0);
    g_vip_flashetat = CreateConVar("sm_vip_flashetat", "1.0", "Active le bonus Flash", _, true, 0.0, true, 1.0);
    g_vip_vieetat = CreateConVar("sm_vip_vieetat", "1.0", "Active le bonus de vie", _, true, 0.0, true, 1.0);
    g_vip_vitesseetat = CreateConVar("sm_vip_vitesseetat", "1.0", "Active le bonus vitesse", _, true, 0.0, true, 1.0);
    g_vip_health = CreateConVar( "sm_vip_health", "120" );
    g_vip_speed = CreateConVar( "sm_vip_speed", "1.3" );
    AutoExecConfig(true, "vip-menu");
    }
    
    public OnConfigsExecuted()
    {
    iHealth = GetConVarInt(g_vip_health);
    }
    
    public Action:OnRoundStart(Handle:event, const String:name[], bool:dontBroadcast)
    {
    CPrintToChatAll("[JailMod]{green} Tapez !vipmenu pour ouvrir votre menu VIP");
    }
    
    
    public Action:Command_vipmenu(client, args)
    {
    new Handle:menu = CreateMenu(vipmenu);
    SetMenuTitle(menu, "Choisis ton bonus :");
    AddMenuItem(menu, "Fumigene", "Fumigene");
    AddMenuItem(menu, "Flash", "Flash");
    AddMenuItem(menu, "Vie", "Vie");
    AddMenuItem(menu, "Vitesse", "Vitesse");
    DisplayMenu(menu, client, 15);
    }
    
    
    public vipmenu(Handle:menu, MenuAction:action, param1, param2)
    {
    if (action == MenuAction_Select)
    {
    new client = GetClientOfUserId(GetEventInt(menu, "userid"));
    if (param2 == 0)
    {
    CPrintToChat( client, "{green}[VIP] : {lightgreen}Tu as choisi un bonus de : {green}Fumigene.");
    if (GetConVarInt(g_vip_fumietat) > 0)
    GivePlayerItem( client, "weapon_smokegrenade");
    }
    else if (param2 == 1)
    {
    CPrintToChat( client, "{green}[VIP] : {lightgreen}Tu as choisi un bonus de : {green}Flash.");
    if (GetConVarInt(g_vip_flashetat) > 0)
    GivePlayerItem( client, "weapon_flashbang");
    }
    else if (param2 == 2)
    {
    CPrintToChat( client, "{green}[VIP] : {lightgreen}Tu as choisi un bonus de : {green}Vie.");
    if (GetConVarInt(g_vip_vieetat) > 0)
    SetEntityHealth( client, iHealth);
    }
    else if (param2 == 3)
    {
    CPrintToChat( client, "{green}[VIP] : {lightgreen}Tu as choisi un bonus de: {green}Vitesse.");
    if (GetConVarInt(g_vip_vitesseetat) > 0)
    SetEntPropFloat( client, Prop_Data, "m_flLaggedMovementValue", GetConVarFloat(g_vip_speed));
    }
    }
    else if (action == MenuAction_End)
    {
    CloseHandle(menu);
    }
    }
    

    Bug Répertorier : 0

    Bug corriger : 1

     

    Correctif du menu de delachambre . quand un vip sélectionne un option elle ne s'active que pour lui.

     

    Si vous trouver une erreur ou un bug en jeu merci de me l'ai faire parvenir sur le Forum / steam ou message priver sur ce forum

     

    cordialement,

    iNex

    Edited by iNex
    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...