AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO] No Fall Damage (Updated: 02/16/2018) (https://forums.alliedmods.net/showthread.php?t=265856)

NeoxX 07-06-2015 08:53

[CS:GO] No Fall Damage (Updated: 02/16/2018)
 
1 Attachment(s)
Information:
• Original No Fall Damage plugin from alexip121093
• I found this code and have added this (Original Post)
• You get no falling damage + You can don't hear a fall damage sound.

Testet in [CS:GO] with
Sourcemod 1.8 - build 6040 Linux
Metamod:Source 1.10 - 961 Linux

Requirements:
SDKHooks
SDKTools
Compiler 1.8

Changelog:
Spoiler


Installation:
• Upload the addons file in your (csgo) folder.

Have Fun :grrr:

Abusador 06-22-2016 10:11

Re: [CS:S/CS:GO] No Fall Damage (07/06/2015)
 
Please, make no fall damage for only Terrorist, i need for my deathrun server.

Thankz

xines 06-22-2016 11:42

Re: [CS:S/CS:GO] No Fall Damage (07/06/2015)
 
Quote:

Originally Posted by Abusador (Post 2429631)
Please, make no fall damage for only Terrorist, i need for my deathrun server.

Thankz

Contact me, i'll do it for you :wink:

Franc1sco 06-22-2016 12:00

Re: [CS:S/CS:GO] No Fall Damage (07/06/2015)
 
1 Attachment(s)
Quote:

Originally Posted by Abusador (Post 2429631)
Please, make no fall damage for only Terrorist, i need for my deathrun server.

Thankz

Easy to do, done :wink:

xines 06-22-2016 15:59

Re: [CS:S/CS:GO] No Fall Damage (07/06/2015)
 
1 Attachment(s)
Quote:

Originally Posted by Franc1sco (Post 2429664)
Easy to do, done :wink:

Yeah easy but ughh old syntax.

Heres a transitional syntax updated version with some small changes:

eyal282 10-30-2018 06:30

Re: [CS:GO] No Fall Damage (Updated: 02/16/2018)
 
Code:


#pragma semicolon 1

#include <sourcemod>
#include <sdkhooks>
#include <sdktools>
#pragma newdecls required

#define DMG_FALL  (1 << 5)

public Plugin myinfo = 
{
        name = "[CS:GO] No Fall Damage",
        author = "alexip121093 & Neoxx",
        description = "No Falling Damage & No Fall Damage Sound",
        version = "1.0.1",
        url = "https://forums.alliedmods.net/showthread.php?p=2316188"
}

public void OnPluginStart()
{
        AddNormalSoundHook(SoundHook);
       
        for(int i=1;i <= MaxClients;i++)
        {
                if(!IsClientInGame(i))
                        continue;
                       
                SDKHook(i, SDKHook_OnTakeDamage, OnTakeDamage);
        }
}

public void OnClientPutInServer(int client)
{
        SDKHook(client, SDKHook_OnTakeDamage, OnTakeDamage);
}

public Action SoundHook(int clients[64], int &numClients, char sound[PLATFORM_MAX_PATH], int &entity, int &channel, float &volume, int &level, int &pitch, int &flags)
{
        if(StrContains(sound, "player/damage", false) >= 0)
                return Plugin_Handled;
       
        return Plugin_Continue;
}

public Action OnTakeDamage(int client, int &attacker, int &inflictor, float &damage, int &damagetype)
{
        if (damagetype & DMG_FALL)
        {
                damage = 0.0;
                return Plugin_Changed;
        }
        return Plugin_Continue;
}

I think setting damage to 0 removes a bug that makes the fun facts of the round say "%N took 500 damage from the earth"

aykocity 04-03-2019 23:25

Re: [CS:GO] No Fall Damage (Updated: 02/16/2018)
 
can you use only a flag ?

paulo_crash 06-08-2020 13:27

Re: [CS:GO] No Fall Damage (Updated: 02/16/2018)
 
Quote:

Originally Posted by aykocity (Post 2646196)
can you use only a flag ?

Someone? Could leave this option only for players with privileges?

SSheriFF 06-08-2020 15:59

Re: [CS:GO] No Fall Damage (Updated: 02/16/2018)
 
Quote:

Originally Posted by paulo_crash (Post 2704659)
Someone? Could leave this option only for players with privileges?

Change this:
PHP Code:

public Action OnTakeDamage(int clientint &attackerint &inflictorfloat &damageint &damagetype
{
    if (
damagetype DMG_FALL)
        return 
Plugin_Handled;
    
    return 
Plugin_Continue;


To this:
PHP Code:

public Action OnTakeDamage(int clientint &attackerint &inflictorfloat &damageint &damagetype
{
    if (
damagetype DMG_FALL &&CheckCommandAccess(client,"",ADMFLAG_RESERVATION))//edit "ADMFLAG_RESERVATION" to your desired flag.
        
return Plugin_Handled;
    
    return 
Plugin_Continue;



paulo_crash 06-08-2020 20:25

Re: [CS:GO] No Fall Damage (Updated: 02/16/2018)
 
Quote:

Originally Posted by SSheriFF (Post 2704691)
Change this:
PHP Code:

public Action OnTakeDamage(int clientint &attackerint &inflictorfloat &damageint &damagetype
{
    if (
damagetype DMG_FALL)
        return 
Plugin_Handled;
    
    return 
Plugin_Continue;


To this:
PHP Code:

public Action OnTakeDamage(int clientint &attackerint &inflictorfloat &damageint &damagetype
{
    if (
damagetype DMG_FALL &&CheckCommandAccess(client,"",ADMFLAG_RESERVATION))//edit "ADMFLAG_RESERVATION" to your desired flag.
        
return Plugin_Handled;
    
    return 
Plugin_Continue;



Thanks for sharing, I'll be testing. Any problems return contact.


All times are GMT -4. The time now is 11:01.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.