[HELP]minx, minx, maxx, maxy from X and Y
#1

PD: solved.

Hello, is there any way to make a little square on the map just having X and Y?

I need that because they'll be dynamic, so I guess you know it would be a headache get minx, minx, maxx and maxy for each position, they're hundred of them.

Any maths formula? Of course, using gang zones.

Thanks a lot.
Reply
#2

If you don't know how to make Gangzones, you can download gangzones creator.
Just drag and a box will be created and code will be given to you.
download it here - https://sampforum.blast.hk/showthread.php?tid=279647
Reply
#3

Read again my question, I didn't explain that good enough.
Reply
#4

Do you have any idea about how can I do that?
I need that to show to the player next checkpoint place on the radar.
Thanks for your help.
Reply
#5

Can't you just used the colored mapicon for that? Mapicon 0 is a square that you can give any color you want.
Reply
#6

do i understand it right: you want to use zones (1024 of them visible max) as checkpoint replacement?
if so, then yes, you can do that. 1 X+Y coordinate set is enough already.
i dont know the exact the size of a playericon type 0 (the square like a checkpoint or playerblip) on the radar, but i assume its like 10-20 units broad/wide. all you need to consider now, is:
-the upper mentioned check"zone"point size
-the exact definition of how the parameters for creating a zone looks like: minX,minY, maxX,maxY.
-how to evolve a formula fitting your demand.

my first thought solution is:
-size (treating it as radius) = 15.0 (units)
-min/max x/y as stated in https://sampwiki.blast.hk/wiki/GangZoneCreate - oops they're floats!
-read on ^^

lets assume you got a coordinate set @
X=1000.0;
Y=2500.0;
so those coordinates will be the middle of the zone/fake checkpoint
MinX=X-Radius;
MinY=Y-Radius;
MaxX=X+Radius;
MaxY=Y+Radius;
...to create the zone and assign its id, is your job. but to solve that formula: its parameters will compile as
985.0, 2485.0, 1015.0, 2515.0
Reply
#7

Quote:
Originally Posted by Vince
Посмотреть сообщение
Can't you just used the colored mapicon for that? Mapicon 0 is a square that you can give any color you want.
Great idea man. I'll give a try, could be a solution too. Thank you really much.

EDIT: it's really huge, I'll try with another one.

PD: great solution.
__________________________________
Quote:
Originally Posted by Babul
Посмотреть сообщение
do i understand it right: you want to use zones (1024 of them visible max) as checkpoint replacement?
if so, then yes, you can do that. 1 X+Y coordinate set is enough already.
i dont know the exact the size of a playericon type 0 (the square like a checkpoint or playerblip) on the radar, but i assume its like 10-20 units broad/wide. all you need to consider now, is:
-the upper mentioned check"zone"point size
-the exact definition of how the parameters for creating a zone looks like: minX,minY, maxX,maxY.
-how to evolve a formula fitting your demand.

my first thought solution is:
-size (treating it as radius) = 15.0 (units)
-min/max x/y as stated in https://sampwiki.blast.hk/wiki/GangZoneCreate - oops they're floats!
-read on ^^

lets assume you got a coordinate set @
X=1000.0;
Y=2500.0;
so those coordinates will be the middle of the zone/fake checkpoint
MinX=X-Radius;
MinY=Y-Radius;
MaxX=X+Radius;
MaxY=Y+Radius;
...to create the zone and assign its id, is your job. but to solve that formula: its parameters will compile as
985.0, 2485.0, 1015.0, 2515.0
Oh, actually, you got me wrong.
I just wanna show some checkpoint positions ahead, to know where is the next checkpoint.
And when I reach it delete the GangZone and create a new one. And I'll test that.

EDIT: You're my man, it worked. Thanks a lot.

Thank you for helping guys.
_________________________________
+rep for all.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)