Raised This Month: $ Target: $400
 0% 

Solved Limited Map Zone


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-29-2018 , 15:16   Re: Limited Map Zone
Reply With Quote #1

Quote:
Originally Posted by Ghosted View Post
Yes cause it is checking origins in all three dimensions and if length is higher than radius it will slap
Yes, I figured as much, but there's something else, I don't know whether it's a normal thing or a miscalculation of the game:

It will be hard to understand, so make sure you read this twice:
- If I set the center origin of the zone in a high place, when you go close to the beams at the same height, you will get slapped as soon as you exceed the area, which is fine, but, if you go on a lower place, you'll get slapped even before touching the beam, is this a normal thing?

Something like this
__________________

Last edited by edon1337; 07-29-2018 at 15:23.
edon1337 is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-29-2018 , 15:58   Re: Limited Map Zone
Reply With Quote #2

Quote:
Originally Posted by edon1337 View Post
Yes, I figured as much, but there's something else, I don't know whether it's a normal thing or a miscalculation of the game:

It will be hard to understand, so make sure you read this twice:
- If I set the center origin of the zone in a high place, when you go close to the beams at the same height, you will get slapped as soon as you exceed the area, which is fine, but, if you go on a lower place, you'll get slapped even before touching the beam, is this a normal thing?

Something like this
Thats when you checking height in length too (FIND ENT IN SPHERE Does That), if you don't want then it must be coded manually and distance will be calculated with SquareRootOf(Origin[0] * Origin[0] + Origin[1] * Origin[1])

EDIT

it will be like:

while (ent = find_ent_by_classname(ent, "player"))
{
// get user origin
// create origin which will be : playerOrigin - centerOrigin
// calculate its 2D length with that formula
// check if it is higher than ur radius
}
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-29-2018 at 16:01.
Ghosted is offline
Old 07-29-2018, 16:00
edon1337
This message has been deleted by edon1337.
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-29-2018 , 16:07   Re: Limited Map Zone
Reply With Quote #4

Wouldn't saving every beams origin when it is created and then checking with a task work?
PHP Code:
get_distance_f(PlayerOriginBeamOrigin) <= 0.0
__________________

Last edited by edon1337; 07-29-2018 at 16:07.
edon1337 is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-29-2018 , 16:12   Re: Limited Map Zone
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
Wouldn't saving every beams origin when it is created and then checking with a task work?
PHP Code:
get_distance_f(PlayerOriginBeamOrigin) <= 0.0
(4got get_distance) get_distance_f is same thing as i said there, just check distance between center origin and player and if its higher than radius slap him. Why you need to check with beams, this one is way smooth
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM
Ghosted is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-29-2018 , 16:30   Re: Limited Map Zone
Reply With Quote #6

Quote:
Originally Posted by Ghosted View Post
(4got get_distance) get_distance_f is same thing as i said there, just check distance between center origin and player and if its higher than radius slap him. Why you need to check with beams, this one is way smooth
Now you're confusing me lol, so one time you said get_distance_f returns wrong values and now you're saying to check distance between center origin and player origin, which again requires get_distance_f?
__________________

Last edited by edon1337; 07-29-2018 at 16:30.
edon1337 is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-29-2018 , 16:34   Re: Limited Map Zone
Reply With Quote #7

Quote:
Originally Posted by edon1337 View Post
Now you're confusing me lol, so one time you said get_distance_f returns wrong values and now you're saying to check distance between center origin and player origin, which again requires get_distance_f?
Yeah my bad, 4got about 3rd dimension , use first one i typed

while (ent = find_ent_by_classname(ent, "player"))
{
// get user origin
// create origin which will be : playerOrigin - centerOrigin
// calculate its 2D length with that formula
// check if it is higher than ur radius
}
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-29-2018 at 16:34.
Ghosted 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 12:16.


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