Raised This Month: $ Target: $400
 0% 

[ H3LP ] Check player stuck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 06-21-2017 , 06:26   Re: [ H3LP ] Check player stuck
Reply With Quote #1

Quote:
Originally Posted by edon1337 View Post
I'm not good at calculations either but I hope this can lead you somewhere lol. Basically I'm hooking Ham_Touch and checking if Touched player's origin minus Toucher player's origin is less or equal to 10 (that should be enough to confirm they're stuck). I'm not sure which dimension of array I should check though..
Code:
#include < amxmodx > #include < hamsandwich > #include < engine > #define MIN_DISTANCE 10.0 public plugin_init( ) {     RegisterHam( Ham_Touch, "player", "fw_HamTouchPost", 1 ) ; } public fw_HamTouchPost( iTouched, iToucher ) {     new Float:iTouchedOrigin[ 3 ], Float:iToucherOrigin[ 3 ] ;     entity_get_vector( iTouched, EV_VEC_origin, iTouchedOrigin ) ;     entity_get_vector( iTouched, EV_VEC_origin, iToucherOrigin ) ;     if( floatabs ( ( iTouchedOrigin[ 1 ] - iToucherOrigin[ 1 ] ) ) <= MIN_DISTANCE ) {         // stuck     }     return HAM_IGNORED ; }
Thanks, will check it out
DarthMan 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 22:46.


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