Raised This Month: $ Target: $400
 0% 

Setting origin with set_pev vs set_user_origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-04-2009 , 11:24   Setting origin with set_pev vs set_user_origin
Reply With Quote #1

PHP Code:
set_user_origing_BotID fVictimOrigin )

set_pev g_BotIDpev_origin fVictimOrigin 
I tried using both in my aimbot detection plugin but when I use set_pev, the bot is unable to be shot once I set the origin. Ham_TakeDamage never gets called when I shoot it.

When I use set_user_origin, it functions properly and takedamage gets called when shot. Is there something else I need to call after the set_pev?
__________________

Last edited by Bugsy; 02-04-2009 at 11:39.
Bugsy is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-04-2009 , 12:18   Re: Setting origin with set_pev vs set_user_origin
Reply With Quote #2

Look at fm_set_user_origin in fakemeta_util.inc
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 02-04-2009 , 12:19   Re: Setting origin with set_pev vs set_user_origin
Reply With Quote #3

-Removed- Connor is faster.

Also, isn't the origin parameter of set_user_origin an Integer?
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-04-2009 , 21:36   Re: Setting origin with set_pev vs set_user_origin
Reply With Quote #4

Quote:
Originally Posted by Dores View Post
-Removed- Connor is faster.

Also, isn't the origin parameter of set_user_origin an Integer?
ConnorMcLeod: I will try it, thanks.

Dores: Oops yes it is. I posted that for just this thread, in the actual code it is an integer. I am using other functions that require the origin to be a float so I am changing all of the get\set origins to floats as well.
__________________
Bugsy is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-05-2009 , 00:37   Re: Setting origin with set_pev vs set_user_origin
Reply With Quote #5

fm_set_user_origin requires an int origin param.
fm_set_user_origin( id , param )

Per fakemeta_util.inc, the above function converts the origin to a float and then calls fm_entity_set_origin( id , floatrigin ). I am using the fm_entity_set_origin call directly and it is working +karma
__________________
Bugsy is offline
Old 02-06-2009, 16:37
MeRcyLeZZ
This message has been deleted by MeRcyLeZZ. Reason: crap
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 01:42.


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