Aller au contenu
News ticker
  • Bienvenue sur le nouveau forum VeryGames
  • Welcome to the new VeryGames forum
  • VeryNews

    VIP : Aides


    Tempestia

    Messages recommandés

    #include <sdktools>
    #include <sdkhooks>
    
    
    new bool:hook_sdk[MAXPLAYERS+1] = false;
    
    
    public Plugin:myinfo =
    {
       name = "Vip",
       description = "Vip bonus",
       author = "Slayzer",
       version = "1.0.0",
       url = "http://magnetik.verygames.net/forum"
    };
    
    
    public OnPluginStart()
    {
       HookEvent("player_spawn", OnPlayerSpawn);
    }
    
    
    public Action:OnPlayerSpawn(Handle:event, const String:name[], bool:dontBroadcast)
    {
       new client = GetClientOfUserId(GetEventInt(event, "userid"));
    
       if (GetUserFlagBits(client) & ADMFLAG_CUSTOM1)
       {
           SetEntPropFloat(client, Prop_Data, "m_flLaggedMovementValue", 1.2);
           SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamagePre);
           hook_sdk[client] = true;
       }
    }
    
    
    public Action:OnTakeDamagePre(victim, &attacker, &inflictor, &Float:damage, &damagetype)
    {
       if ((damagetype & DMG_FALL) == DMG_FALL)
       {
           return Plugin_Handled;
       }
       return Plugin_Continue;
    }
    
    
    public OnClientDisconnect(client)
    {
       if (IsClientInGame(client))
       {
           if (hook_sdk[client])
           {
               SDKUnhook(client, SDKHook_OnTakeDamage, OnTakeDamagePre);
           }
       }
    }
    

     

    le plugin requiert SDKHOOKS : http://forums.alliedmods.net/showthread.php?t=106748

     

    a compiler depuis ton PC.

     

    pour les trails ça existe déjà : http://forums.alliedmods.net/showthread.php?t=183131

    Modifié par Slayzer
    Lien vers le commentaire
    Partager sur d’autres sites

    Rejoindre la conversation

    Vous pouvez publier maintenant et vous inscrire plus tard. Si vous avez un compte, connectez-vous maintenant pour publier avec votre compte.

    Invité
    Répondre à ce sujet…

    ×   Collé en tant que texte enrichi.   Coller en tant que texte brut à la place

      Seulement 75 émoticônes maximum sont autorisées.

    ×   Votre lien a été automatiquement intégré.   Afficher plutôt comme un lien

    ×   Votre contenu précédent a été rétabli.   Vider l’éditeur

    ×   Vous ne pouvez pas directement coller des images. Envoyez-les depuis votre ordinateur ou insérez-les depuis une URL.

    ×
    ×
    • Créer...