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

getting random damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-02-2012 , 09:36   getting random damage
Reply With Quote #1

Code:
#include <amxmodx> #include <amxmisc> #include <fakemeta> #define PLUGIN "skating" #define VERSION "1.0" #define AUTHOR "Jim Richardson" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_forward(FM_PlayerPreThink, "PreThink") } public PreThink(id) {         if (fm_distance_to_floor(id) < 4.0) {         new Float:origin[3]         pev(id, pev_origin, origin)         origin[2] += 4         set_pev(id, pev_origin, origin)     } } stock Float:fm_distance_to_floor(index, ignoremonsters = 1) {     new Float:start[3], Float:dest[3], Float:end[3]     pev(index, pev_origin, start)     dest[0] = start[0]     dest[1] = start[1]     dest[2] = -8191.0     engfunc(EngFunc_TraceLine, start, dest, ignoremonsters, index, 0)     get_tr2(0, TR_vecEndPos, end)     pev(index, pev_absmin, start)     new Float:ret = start[2] - end[2]     return ret > 0 ? ret : 0.0 }

why do i keep getting randomly damage when using this?
jimaway is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-02-2012 , 09:37   Re: getting random damage
Reply With Quote #2

You should set Z velocity to 0 as well.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-02-2012 , 09:50   Re: getting random damage
Reply With Quote #3

thanks, the damage part is now fixed, but i keep "jumping" up and down constantly (you can feel the z origin changing), how could i change it so its smoother, something like if youre floating with sv_gravity 0
jimaway is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-02-2012 , 09:51   Re: getting random damage
Reply With Quote #4

You can set player's gravity to 0.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-02-2012 , 10:07   Re: getting random damage
Reply With Quote #5

how would i do that?
http://www.amxmodx.org/funcwiki.php?go=func&id=125
Quote:
Also, be aware 0.0 sets gravity to normal the same as 1.0.
jimaway is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-02-2012 , 11:05   Re: getting random damage
Reply With Quote #6

0.000001 would work.

EDIT: Also, don't make another topic if you already have this one open.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 07-02-2012 at 11:06.
Exolent[jNr] is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-02-2012 , 11:40   Re: getting random damage
Reply With Quote #7

i made a new topic cause this one has misleading title since the damage thing is already fixed

but can you tell me how many units shorter does player get when hes ducking?
jimaway is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-02-2012 , 11:47   Re: getting random damage
Reply With Quote #8

18 units difference from ducking and standing.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
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 02:01.


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