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

Player in visible range


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gravi123
Member
Join Date: Feb 2016
Old 03-15-2017 , 18:09   Player in visible range
Reply With Quote #1

Is it possible to detect if a player is in visible range for each enemy (not behind a wall) when he shoots his gun?
gravi123 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-15-2017 , 18:54   Re: Player in visible range
Reply With Quote #2

https://www.amxmodx.org/api/engine/is_in_viewcone
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
gravi123
Member
Join Date: Feb 2016
Old 03-17-2017 , 16:38   Re: Player in visible range
Reply With Quote #3

Can someone explain to me a bit better how to use that
gravi123 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-17-2017 , 19:42   Re: Player in visible range
Reply With Quote #4

Quote:
Originally Posted by gravi123 View Post
Can someone explain to me a bit better how to use that
PHP Code:
new Float:fOrigin];
pevPlayer2ID pev_origin fOrigin );

if ( 
is_in_viewconePlayer1ID fOrigin ) )
{
     
//Player1ID can 'see' Player2ID

You can do a traceline to make sure nothing is in the way. There is a tutorial in the code snippets section.
__________________

Last edited by Bugsy; 03-17-2017 at 19:53.
Bugsy is offline
Kotoamatsukami
Member
Join Date: Jan 2017
Location: Malaysia
Old 03-18-2017 , 01:38   Re: Player in visible range
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
PHP Code:
new Float:fOrigin];
pevPlayer2ID pev_origin fOrigin );

if ( 
is_in_viewconePlayer1ID fOrigin ) )
{
     
//Player1ID can 'see' Player2ID

You can do a traceline to make sure nothing is in the way. There is a tutorial in the code snippets section.
Sorry, may I ask?
Does that involves all the 'INGNORE_MONSTERS' thingy?
Kotoamatsukami 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 17:33.


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