AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [HELP] Only take world damage (Fall damage) (https://forums.alliedmods.net/showthread.php?t=288952)

Artline__ 10-11-2016 13:09

[HELP] Only take world damage (Fall damage)
 
So I'm creating my first plugin :) and I want to disable all player damage but not world damage.
I found this but I'm not sure what it does...
Code:

SetEntProp(Client, Prop_Data, "m_takeDamage", 0, 0);
I both want to know how to enable and disable it.

Game: CS:GO if it matters...

Mitchell 10-11-2016 13:32

Re: [HELP] Only take world damage (Fall damage)
 
You would need to use SDKHooks to catch the damage then check to see if it's fall damage.
You could just take a anti-falldamage plugin and negate it.

Artline__ 10-11-2016 13:37

Re: [HELP] Only take world damage (Fall damage)
 
Okay, I'll try that Thank's! :)

thecount 10-11-2016 15:55

Re: [HELP] Only take world damage (Fall damage)
 
PHP Code:

public OnClientPutInServer(client){
    
SDKHook(clientSDKHook_OnTakeDamageOnTakeDamage);
}

public 
Action:OnTakeDamage(victim, &attacker, &inflictor, &Float:damage, &damagetype){
    if(
attacker >= && attacker <= MaxClients){
        
damage 0.0;
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;



Artline__ 10-12-2016 10:31

Re: [HELP] Only take world damage (Fall damage)
 
Thanks! :D


All times are GMT -4. The time now is 04:51.

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