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

    plugins couteau de lancer vip question


    Guest miew627
     Share

    Recommended Posts

    Guest miew627

    bonjour ,

    comme je le dis dans mon titre je suis a la recherche d'un plugin css sous sourcemod de lancer de cut pour les flags : "o" donc les joueurs normaux ne disposent pas de cut de lancer mais les flags "o" en posséderé 3 avec comme dommage : ds le corps 50 dmg et ds la tete 115 ,

     

    j'avais deja essayer de faire ca en modifiant le plugin http://forums.alliedmods.net/showthread.php?t=125226

    en mettant :

    [color=#007700][font=monospace]
    public [/font][/color][color=#0000BB][font=monospace]EventPlayerSpawn[/font][/color][color=#007700][font=monospace]([/font][/color][color=#0000BB][font=monospace]Handle[/font][/color][color=#007700][font=monospace]:[/font][/color][color=#0000BB][font=monospace]event[/font][/color][color=#007700][font=monospace],const [/font][/color][color=#0000BB][font=monospace]String[/font][/color][color=#007700][font=monospace]:[/font][/color][color=#0000BB][font=monospace]name[/font][/color][color=#007700][font=monospace][],[/font][/color][color=#0000BB][font=monospace]bool[/font][/color][color=#007700][font=monospace]:[/font][/color][color=#0000BB][font=monospace]dontBroadcast[/font][/color][color=#007700][font=monospace]) {
    
       if ([/font][/color][color=#0000BB][font=monospace]GetConVarBool[/font][/color][color=#007700][font=monospace]([/font][/color][color=#0000BB][font=monospace]g_CVarEnable[/font][/color][color=#007700][font=monospace]) && [/font][/color][color=#0000BB][font=monospace]CheckCommandAccess[/font][/color][color=#007700][font=monospace]([/font][/color][color=#0000BB][font=monospace]client[/font][/color][color=#007700][font=monospace], [/font][/color][color=#DD0000][font=monospace]"sm_tknives_allow"[/font][/color][color=#007700][font=monospace], [/font][/color][color=#0000BB][font=monospace]ADMFLAG_CUSTOM1[/font][/color][color=#007700][font=monospace])) {
           new [/font][/color][color=#0000BB][font=monospace]client [/font][/color][color=#007700][font=monospace]= [/font][/color][color=#0000BB][font=monospace]GetClientOfUserId[/font][/color][color=#007700][font=monospace]([/font][/color][color=#0000BB][font=monospace]GetEventInt[/font][/color][color=#007700][font=monospace]([/font][/color][color=#0000BB][font=monospace]event[/font][/color][color=#007700][font=monospace], [/font][/color][color=#DD0000][font=monospace]"userid"[/font][/color][color=#007700][font=monospace]));
           [/font][/color][color=#0000BB][font=monospace]g_iKnives[/font][/color][color=#007700][font=monospace][[/font][/color][color=#0000BB][font=monospace]client[/font][/color][color=#007700][font=monospace]] = [/font][/color][color=#0000BB][font=monospace]GetConVarInt[/font][/color][color=#007700][font=monospace]([/font][/color][color=#0000BB][font=monospace]g_CVarKnives[/font][/color][color=#007700][font=monospace]);
       }
    }  [/font][/color]

    Link to comment
    Share on other sites

    Reprend la source d'origine.

     

    Remplace le Player_Spawn par ceci :

    public EventPlayerSpawn(Handle:event,const String:name[],bool:dontBroadcast) 
    {
       new client = GetClientOfUserId(GetEventInt(event, "userid"));
       if (GetConVarBool(g_CVarEnable)) 
       {
           g_iKnives[client] = GetConVarInt(g_CVarKnives);
       }
       if ((GetConVarBool(g_CVarEnable)) && IsVip(client))
       {
           g_iKnives[client] = GetConVarInt(g_CVarKnives);
       }
       else
       {
           g_iKnives[client] = 0
       }
    }
    

     

    et en dessous tu met cela :

    public IsVip(client)
    {
       if (GetUserFlagBits(client) & ADMFLAG_CUSTOM1) return true;
       else return false;
    }
    

    Link to comment
    Share on other sites

    Reprend la source d'origine.

     

    Remplace le Player_Spawn par ceci :

    public EventPlayerSpawn(Handle:event,const String:name[],bool:dontBroadcast) 
    {
       new client = GetClientOfUserId(GetEventInt(event, "userid"));
       if (GetConVarBool(g_CVarEnable)) 
       {
           g_iKnives[client] = GetConVarInt(g_CVarKnives);
       }
       if ((GetConVarBool(g_CVarEnable)) && IsVip(client))
       {
           g_iKnives[client] = GetConVarInt(g_CVarKnives);
       }
       else
       {
           g_iKnives[client] = 0
       }
    }
    

     

    et en dessous tu met cela :

    public IsVip(client)
    {
       if (GetUserFlagBits(client) & ADMFLAG_CUSTOM1) return true;
       else return false;
    }
    

     

    que le mec soit VIP ou pas, il recevra le même nombre de couteaux là et les NON VIP aurait des couteaux aussi :)

    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.

     Share

    ×
    ×
    • Create New...