SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 30/01/2019, 06:09 PM   #1
Wajttachu
Little Clucker
 
Join Date: Oct 2018
Location: Belgrade, Serbia
Posts: 20
Reputation: 0
Default CA_RayCastLine

First look at this: https://imgur.com/a/HMyLKYc

How can I check is player inside that circle? Its object not cp...
Object 's coordinates: 823.91779, -1360.27185, -48.48538
Object model: 18657
I need this like Anti SpawnKill zone where player cannot use guns nor can be damaged...
Here is spawn coordinates (this object is cirle so i cannot us IsPlayerInRangeOfPoint)
823.9178, -1360.6879, -0.5078
I need this check (if you didn't understand yet) :
I want to check is player in that object, not outside but INSIDE that object. ( Not outside this red light )
Its like check for is player in checkpoint but with object..
__________________
Quote:
Originally Posted by Wajttachu View Post
If you do not know basics:
Hire scripter for money
...or if you are "poor", knowledge is free:
https://wiki.sa-mp.com/wiki/Scripting_Basics
Do not expect that someone would do these free, even if its 5min job
Wajttachu is offline   Reply With Quote
Old 30/01/2019, 06:18 PM   #2
Florin48
Huge Clucker
 
Join Date: Nov 2015
Location: Romania
Posts: 266
Reputation: 5
Default Re: CA_RayCastLine

you can use IsPlayerInRangeOfPoint or GetPlayerDistanceFromPoint
__________________
Quote:
If I helped you for a while, do not forget to reward me with a good reputation.
Discord: [ SherKan#8573 ]
Support me: [ http://bit.do/suppor_my ]
Gamemode for sale: [ http://bit.do/gamemode ]
Support Scripting(beta project): [ http://bit.do/support_scripting ]
Florin48 is offline   Reply With Quote
Old 30/01/2019, 06:22 PM   #3
Banditul18
Huge Clucker
 
Join Date: Nov 2014
Location: Brasov,Romania
Posts: 408
Reputation: 32
Default Re: CA_RayCastLine

You can use streamer dynamic areas and make use of OnPlayerEnterDynamicArea and OnPlayerLeaveDynamicArea

https://github.com/samp-incognito/sa...Natives-(Areas)
Banditul18 is online now   Reply With Quote
Old 30/01/2019, 06:41 PM   #4
Wajttachu
Little Clucker
 
Join Date: Oct 2018
Location: Belgrade, Serbia
Posts: 20
Reputation: 0
Default Re: CA_RayCastLine

Its circle so IsPlayerInRangeOfPoint isn't useful as i mentioned rep hunter
__________________
Quote:
Originally Posted by Wajttachu View Post
If you do not know basics:
Hire scripter for money
...or if you are "poor", knowledge is free:
https://wiki.sa-mp.com/wiki/Scripting_Basics
Do not expect that someone would do these free, even if its 5min job
Wajttachu is offline   Reply With Quote
Old 30/01/2019, 06:58 PM   #5
Calisthenics
High-roller
 
Join Date: May 2018
Posts: 1,228
Reputation: 205
Default Re: CA_RayCastLine

Quote:
Originally Posted by Wajttachu View Post
Its circle so IsPlayerInRangeOfPoint isn't useful as i mentioned rep hunter
Banditul18 suggested dynamic areas which includes circle, cylinder, sphere, rectangle, cuboid and polygon.
Calisthenics is offline   Reply With Quote
Old 30/01/2019, 07:04 PM   #6
Deadpoop
Big Clucker
 
Deadpoop's Avatar
 
Join Date: Jul 2016
Posts: 131
Reputation: 5
Default Re: CA_RayCastLine

Quote:
Originally Posted by Wajttachu View Post
Its circle so IsPlayerInRangeOfPoint isn't useful as i mentioned rep hunter
pls sir rep me I will rep u back and give u $5 just pls rep me sir!!!!!!!!!!!!!!!!!!
__________________
Deadpoop is offline   Reply With Quote
Old 30/01/2019, 07:10 PM   #7
Wajttachu
Little Clucker
 
Join Date: Oct 2018
Location: Belgrade, Serbia
Posts: 20
Reputation: 0
Default Re: CA_RayCastLine

Quote:
Originally Posted by Deadpoop View Post
pls sir rep me I will rep u back and give u $5 just pls rep me sir!!!!!!!!!!!!!!!!!!
Look at his bio lmao
__________________
Quote:
Originally Posted by Wajttachu View Post
If you do not know basics:
Hire scripter for money
...or if you are "poor", knowledge is free:
https://wiki.sa-mp.com/wiki/Scripting_Basics
Do not expect that someone would do these free, even if its 5min job
Wajttachu is offline   Reply With Quote
Old 30/01/2019, 07:39 PM   #8
m4karow
Huge Clucker
 
Join Date: Oct 2015
Posts: 288
Reputation: 37
Default Re: CA_RayCastLine

Quote:
Originally Posted by Wajttachu View Post
First look at this: https://imgur.com/a/HMyLKYc

How can I check is player inside that circle? Its object not cp...
Object 's coordinates: 823.91779, -1360.27185, -48.48538
Object model: 18657
I need this like Anti SpawnKill zone where player cannot use guns nor can be damaged...
Here is spawn coordinates (this object is cirle so i cannot us IsPlayerInRangeOfPoint)
823.9178, -1360.6879, -0.5078
I need this check (if you didn't understand yet) :
I want to check is player in that object, not outside but INSIDE that object. ( Not outside this red light )
Its like check for is player in checkpoint but with object..
you can make your own dynamic area using this zone editor
m4karow is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Help]ColAndreas CA_RayCastLine PhamHoang Scripting Help 2 29/03/2017 02:41 PM


All times are GMT. The time now is 09:03 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.