This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Solved No fall damage problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lihing
Member
Join Date: Oct 2023
Old Yesterday , 09:13   No fall damage problem
Reply With Quote #1

https://forums.alliedmods.net/showthread.php?t=23824

Could he please just change it to
Does the bot have no fall damage?
or TR
Attached Files
File Type: sma Get Plugin or Get Source (no_fall_damage.sma - 13 views - 763 Bytes)

Last edited by Lihing; Today at 03:17.
Lihing is online now
v120kaaimcfg
Member
Join Date: Apr 2024
Old Yesterday , 09:28   Re: No fall damage problem
Reply With Quote #2

Quote:
Originally Posted by Lihing View Post
https://forums.alliedmods.net/showthread.php?t=23824

Could he please just change it to
Does the bot have no fall damage?
or TR
What? Explain better
v120kaaimcfg is offline
Lihing
Member
Join Date: Oct 2023
Old Yesterday , 11:48   Re: No fall damage problem
Reply With Quote #3

Quote:
Originally Posted by v120kaaimcfg View Post
What? Explain better
I hope that the plug-in function can only be implemented on bots
Lihing is online now
v120kaaimcfg
Member
Join Date: Apr 2024
Old Yesterday , 12:34   Re: No fall damage problem
Reply With Quote #4

Quote:
Originally Posted by Lihing View Post
I hope that the plug-in function can only be implemented on bots
Here:
Code:
#include <amxmodx>
#include <hamsandwich>

#define DMG_FALL (1<<5)

public plugin_init()
{
	register_plugin("No Fall Damage", "1", "")
	RegisterHam(Ham_TakeDamage, "player", "HamTakeDamagePre", 0)
}

public HamTakeDamagePre(victim, inflictor, attacker, Float:dmg, bits)
{
	return (bits & DMG_FALL && is_user_bot(victim)) ? HAM_SUPERCEDE : HAM_IGNORED
}

Last edited by v120kaaimcfg; Yesterday at 12:35.
v120kaaimcfg is offline
Lihing
Member
Join Date: Oct 2023
Old Today , 03:16   Re: No fall damage problem
Reply With Quote #5

Quote:
Originally Posted by v120kaaimcfg View Post
Here:
Code:
#include <amxmodx>
#include <hamsandwich>

#define DMG_FALL (1<<5)

public plugin_init()
{
	register_plugin("No Fall Damage", "1", "")
	RegisterHam(Ham_TakeDamage, "player", "HamTakeDamagePre", 0)
}

public HamTakeDamagePre(victim, inflictor, attacker, Float:dmg, bits)
{
	return (bits & DMG_FALL && is_user_bot(victim)) ? HAM_SUPERCEDE : HAM_IGNORED
}

Thank you. It works after testing it.
Lihing is online now
Reply



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 21:50.


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