AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   grab non-solid entities (https://forums.alliedmods.net/showthread.php?t=121307)

lkh1018 03-14-2010 08:14

grab non-solid entities
 
hi, i want to know how to grab a non-solid entities?
or how to get which entity that the user is aiming if the entity is no solid?
i am new comer and sorry for my ban english, thanks for help

wrecked_ 03-14-2010 13:14

Re: grab non-solid entities
 
If you use
PHP Code:

new aimedbody

get_user_aiming
indexaimedbody 

then aimed will return the index (if applicable) of whatever the user is aiming at. Make sure it's a player, alive, etc, and then check if it's solid or not.

Body is the part of body being aimed at (I think. Never really used that param).

Emp` 03-14-2010 15:10

Re: grab non-solid entities
 
Quote:

Originally Posted by wrecked_ (Post 1117245)
If you use
PHP Code:

new aimedbody

get_user_aiming
indexaimedbody 

then aimed will return the index (if applicable) of whatever the user is aiming at. Make sure it's a player, alive, etc, and then check if it's solid or not.

Body is the part of body being aimed at (I think. Never really used that param).

This does not work for non-solid entities.

wrecked_ 03-14-2010 15:12

Re: grab non-solid entities
 
Oh. My bad.

lkh1018 03-16-2010 07:35

Re: grab non-solid entities
 
so any people know how?_?


All times are GMT -4. The time now is 08:46.

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