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

    VIP : Aides


    Tempestia

    Recommended Posts

    #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

    Edited by Slayzer
    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...