AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Problem with entity & aim (https://forums.alliedmods.net/showthread.php?t=100617)

alan_el_more 08-16-2009 07:54

Problem with entity & aim
 
I created an entity and detect touch, detect if the player is aiming at the ent but is not solid and does nothing.

Someone has a solution?

Thanks in advance

One 08-16-2009 08:49

Re: Problem with entity & aim
 
code? & u can test ur functions if they works by printing a text. example:

if(player aims on xxx)
client_print(id,print_chat,"ok this function works")

alan_el_more 08-16-2009 09:00

Re: Problem with entity & aim
 
Quote:

Originally Posted by One (Post 902160)
code? & u can test ur functions if they works by printing a text. example:

if(player aims on xxx)
client_print(id,print_chat,"ok this function works")

I did & not work.

Code of touch:

PHP Code:

new body
get_user_aiming
(touchertouchedbody)
        
new 
classname[32]
pev(touchedpev_classnameclassnamesizeof(classname)-1)
        
if (
equali(classnameentclas))
{
        
client_print(toucherprint_chat"Aiming :D")



Jon 08-16-2009 09:07

Re: Problem with entity & aim
 
If the ent isn't solid you can't touch it, grab it etc.

alan_el_more 08-16-2009 09:36

Re: Problem with entity & aim
 
Quote:

Originally Posted by Jon (Post 902188)
If the ent isn't solid you can't touch it, grab it etc.

f*ck

joaquimandrade 08-16-2009 09:56

Re: Problem with entity & aim
 
Quote:

Originally Posted by alan_el_more (Post 902214)
f*ck

But, you can detect aimings to it with tracemodel

alan_el_more 08-16-2009 10:06

Re: Problem with entity & aim
 
Quote:

Originally Posted by joaquimandrade (Post 902221)
But, you can detect aimings to it with tracemodel

how?

joaquimandrade 08-16-2009 13:42

Re: Problem with entity & aim
 
Quote:

Originally Posted by alan_el_more (Post 902226)
how?

Check the plugin "Shoot Grenades"


All times are GMT -4. The time now is 15:01.

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