Raised This Month: $12 Target: $400
 3% 

Solved [HELP] Only take world damage (Fall damage)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Artline__
New Member
Join Date: Sep 2015
Old 10-11-2016 , 13:09   [HELP] Only take world damage (Fall damage)
Reply With Quote #1

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

Last edited by Artline__; 10-12-2016 at 10:32. Reason: Added game.
Artline__ is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 10-11-2016 , 13:32   Re: [HELP] Only take world damage (Fall damage)
Reply With Quote #2

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.
Mitchell is offline
Artline__
New Member
Join Date: Sep 2015
Old 10-11-2016 , 13:37   Re: [HELP] Only take world damage (Fall damage)
Reply With Quote #3

Okay, I'll try that Thank's!
Artline__ is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 10-11-2016 , 15:55   Re: [HELP] Only take world damage (Fall damage)
Reply With Quote #4

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;

thecount is offline
Artline__
New Member
Join Date: Sep 2015
Old 10-12-2016 , 10:31   Re: [HELP] Only take world damage (Fall damage)
Reply With Quote #5

Thanks!
Artline__ is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:05.


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