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

    Recherche de plugin


    Coyote570

    Recommended Posts

    Bonjours, je cherche un plugin rajoutant aux joueurs VIP portant le flag "o" 10 HP + 10 en armure et la commande !gift, existe il un plugin regroupant les 2 ou même 2 plugins à part ?

     

    J'ai trouvé un plugin qui rajoutais 20 de vie 20 d'armures mais également un usp et cela me convient pas pour certaines maps :-| : http://forum.verygames.net/showthread.php?62594-PARTAGE-Bonus-VIP-hp

     

    Pareil pour le gift mais il n'est pas restreint, tous les joueurs peuvent l'utilisé : https://forums.alliedmods.net/showthread.php?p=1653415

     

    Merci d'avance :-)

    Link to comment
    Share on other sites

    Bonsoir,

     

    Juste pour apporter une petite rectification, c'est ADMFLAG_CUSTOM1 (Custom qui en anglais veut dire personnalisé), et non pas ADMFLAG_COSTUM1 (Qui en français signifie tout autre chose sans aucun rapport avec la programmation ou Counter-Strike : Source).

    Link to comment
    Share on other sites

    Merci pour vos réponses !

     

    Ce code est il bon ?

     

    [color=#000000][color=#FF8000]
    #include <sdktools>
    #include <sourcemod>
    
    [/color][color=#007700]new [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]MAXPLAYERS[/color][color=#007700]+[/color][color=#0000BB]1[/color][color=#007700]];
    
    public [/color][color=#0000BB]Plugin[/color][color=#007700]:[/color][color=#0000BB]myinfo [/color][color=#007700]= 
    {
       [/color][color=#0000BB]name [/color][color=#007700]= [/color][color=#DD0000]"Gift"[/color][color=#007700],
       [/color][color=#0000BB]author [/color][color=#007700]= [/color][color=#DD0000]"Delachambre"[/color][color=#007700],
       [/color][color=#0000BB]description [/color][color=#007700]= [/color][color=#DD0000]"Plugin Gift"[/color][color=#007700],
       [/color][color=#0000BB]version [/color][color=#007700]= [/color][color=#DD0000]"1.0"[/color][color=#007700],
       [/color][color=#0000BB]url [/color][color=#007700]= [/color][color=#DD0000]"http://rp.team-magnetik.fr"
    [/color][color=#007700]}
    
    public [/color][color=#0000BB]OnPluginStart[/color][color=#007700]()
    {
       [/color]RegAdminCmd("sm_gift", Command_Gift, ADMFLAG_CUSTOM1[color=#007700]);
    
       [/color][color=#0000BB]HookEvent[/color][color=#007700]([/color][color=#DD0000]"player_spawn"[/color][color=#007700], [/color][color=#0000BB]OnPlayerSpawn[/color][color=#007700]);
    }
    
    public [/color][color=#0000BB]OnPlayerSpawn[/color][color=#007700]([/color][color=#0000BB]Handle[/color][color=#007700]:[/color][color=#0000BB]event[/color][color=#007700], const [/color][color=#0000BB]String[/color][color=#007700]:[/color][color=#0000BB]name[/color][color=#007700][], [/color][color=#0000BB]bool[/color][color=#007700]:[/color][color=#0000BB]dontBroadcast[/color][color=#007700])
    {
       new [/color][color=#0000BB]client [/color][color=#007700]= [/color][color=#0000BB]GetClientOfUserId[/color][color=#007700]([/color][color=#0000BB]GetEventInt[/color][color=#007700]([/color][color=#0000BB]event[/color][color=#007700], [/color][color=#DD0000]"userid"[/color][color=#007700]));
    
       if ([/color][color=#0000BB]IsPlayerAlive[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700]))
       {
           [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : Type !gift for a free grft!"[/color][color=#007700]);
           [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]] = [/color][color=#0000BB]1[/color][color=#007700];
       }
    }
    
    public [/color][color=#0000BB]Action[/color][color=#007700]:[/color][color=#0000BB]Command_Gift[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]args[/color][color=#007700])
    {
       if ([/color][color=#0000BB]IsPlayerAlive[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700]))
       {
           if ([/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]] > [/color][color=#0000BB]0[/color][color=#007700])
           {
               new [/color][color=#0000BB]bonus [/color][color=#007700]= [/color][color=#0000BB]GetRandomInt[/color][color=#007700]([/color][color=#0000BB]1[/color][color=#007700], [/color][color=#0000BB]19[/color][color=#007700]);
    
               if (([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]1[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]2[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]3[/color][color=#007700]))
               {
                   new [/color][color=#0000BB]health [/color][color=#007700]= [/color][color=#0000BB]GetClientHealth[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700]);
                   new [/color][color=#0000BB]nowhealth [/color][color=#007700]= [/color][color=#0000BB]health [/color][color=#007700]+ [/color][color=#0000BB]15[/color][color=#007700];
    
                   [/color][color=#0000BB]SetEntityHealth[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]nowhealth[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted extra HP!"[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               else if (([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]4[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]5[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]6[/color][color=#007700]))
               {
                   new [/color][color=#0000BB]armor [/color][color=#007700]= [/color][color=#0000BB]GetEntProp[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]Prop_Send[/color][color=#007700], [/color][color=#DD0000]"m_ArmorValue"[/color][color=#007700], [/color][color=#0000BB]4[/color][color=#007700]);
                   new [/color][color=#0000BB]nowarmor [/color][color=#007700]= [/color][color=#0000BB]armor [/color][color=#007700]+ [/color][color=#0000BB]15[/color][color=#007700];
    
                   [/color][color=#0000BB]SetEntProp[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]Prop_Send[/color][color=#007700], [/color][color=#DD0000]"m_ArmorValue"[/color][color=#007700], [/color][color=#0000BB]nowarmor[/color][color=#007700], [/color][color=#0000BB]1[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted extra Armor!"[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               else if ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]7[/color][color=#007700])
               {
                   [/color][color=#0000BB]GivePlayerItem[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"weapon_usp"[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted an USP!"[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               else if (([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]8[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]9[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]10[/color][color=#007700]))
               {
                   new [/color][color=#0000BB]Float[/color][color=#007700]:[/color][color=#0000BB]speed [/color][color=#007700]= [/color][color=#0000BB]GetEntPropFloat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]Prop_Data[/color][color=#007700], [/color][color=#DD0000]"m_flLaggedMovementValue"[/color][color=#007700]);
                   new [/color][color=#0000BB]Float[/color][color=#007700]:[/color][color=#0000BB]nowspeed [/color][color=#007700]= [/color][color=#0000BB]speed [/color][color=#007700]+ [/color][color=#0000BB]0.2[/color][color=#007700];
    
                   [/color][color=#0000BB]SetEntPropFloat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]Prop_Data[/color][color=#007700], [/color][color=#DD0000]"m_flLaggedMovementValue"[/color][color=#007700], [/color][color=#0000BB]nowspeed[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted a speed bonus!"[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               else if (([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]11[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]12[/color][color=#007700]))
               {
                   [/color][color=#0000BB]GivePlayerItem[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"weapon_hegrenade"[/color][color=#007700]);
                   [/color][color=#0000BB]GivePlayerItem[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"weapon_flashbang"[/color][color=#007700]);
                   [/color][color=#0000BB]GivePlayerItem[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"weapon_smokegrenade"[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted a grenade pack!"[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               else if (([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]13[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]14[/color][color=#007700]) || ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]15[/color][color=#007700]))
               {
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : Sorry, you didnt get any gifts."[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               else if (([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]16[/color][color=#007700]))
               {
                   new [/color][color=#0000BB]Float[/color][color=#007700]:[/color][color=#0000BB]speed [/color][color=#007700]= [/color][color=#0000BB]GetEntPropFloat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]Prop_Data[/color][color=#007700], [/color][color=#DD0000]"m_flLaggedMovementValue"[/color][color=#007700]);
                   new [/color][color=#0000BB]Float[/color][color=#007700]:[/color][color=#0000BB]nowspeed [/color][color=#007700]= [/color][color=#0000BB]speed [/color][color=#007700]- [/color][color=#0000BB]0.2[/color][color=#007700];
    
                   [/color][color=#0000BB]SetEntPropFloat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]Prop_Data[/color][color=#007700], [/color][color=#DD0000]"m_flLaggedMovementValue"[/color][color=#007700], [/color][color=#0000BB]nowspeed[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted a slower speed."[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               else if (([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]17[/color][color=#007700]))
               {
                   new [/color][color=#0000BB]armor [/color][color=#007700]= [/color][color=#0000BB]GetEntProp[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]Prop_Send[/color][color=#007700], [/color][color=#DD0000]"m_ArmorValue"[/color][color=#007700], [/color][color=#0000BB]4[/color][color=#007700]);
                   new [/color][color=#0000BB]nowarmor [/color][color=#007700]= [/color][color=#0000BB]armor [/color][color=#007700]- [/color][color=#0000BB]15[/color][color=#007700];
    
                   [/color][color=#0000BB]SetEntProp[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]Prop_Send[/color][color=#007700], [/color][color=#DD0000]"m_ArmorValue"[/color][color=#007700], [/color][color=#0000BB]nowarmor[/color][color=#007700], [/color][color=#0000BB]1[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted less armor."[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               if (([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]18[/color][color=#007700]))
               {
                   new [/color][color=#0000BB]health [/color][color=#007700]= [/color][color=#0000BB]GetClientHealth[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700]);
                   new [/color][color=#0000BB]nowhealth [/color][color=#007700]= [/color][color=#0000BB]health [/color][color=#007700]- [/color][color=#0000BB]15[/color][color=#007700];
    
                   [/color][color=#0000BB]SetEntityHealth[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#0000BB]nowhealth[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted less HP."[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
               else if ([/color][color=#0000BB]bonus [/color][color=#007700]== [/color][color=#0000BB]19[/color][color=#007700])
               {
                   [/color][color=#0000BB]GivePlayerItem[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"weapon_glock"[/color][color=#007700]);
    
                   [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You were gifted a Glock!"[/color][color=#007700]);
                   [/color][color=#0000BB]gift[/color][color=#007700][[/color][color=#0000BB]client[/color][color=#007700]]--;
    
                   return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
               }
           }
           else
           {
               [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You only get one gift per life!"[/color][color=#007700]);
    
               return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
           }
       }
       else
       {
           [/color][color=#0000BB]PrintToChat[/color][color=#007700]([/color][color=#0000BB]client[/color][color=#007700], [/color][color=#DD0000]"[VIP] : You must be alive to claim your gift!"[/color][color=#007700]);
    
           return [/color][color=#0000BB]Plugin_Handled[/color][color=#007700];
       }
       return [/color][color=#0000BB]Plugin_Continue[/color][color=#007700];
    }  [/color][/color]
    

     

    Parce que si oui, il ne fonctionne pas :-|

    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...