new Float:checkCoords[MAX_POINTS][4] ???
#1

Hey SA-MP User's.

Cheers for Comming to Yet Again, Another thread of Mine.


Now....

I'm Currently having a Query?

Whats the Point of this?

Code:
new Float:checkCoords[MAX_POINTS][4] = {
{-32.100069,-94.627357,-24.100069,-85.626357}, //Store 1.1 Entrance
As well as Having this (The Actual Checkpoints them Self's with a Size Para)

Code:
new playerCheckpoint[MAX_PLAYERS];
new Float:checkpoints[MAX_POINTS][4] = {
{-28.100069,-89.627357,1003.5469,3.0}, //Store 1.1 Entrance
Can Anyone Explain?

Iv'e went into the Game /saved all my Locations, But I Found It Trippy when that Array has Diffrent Coords to the Checkpoints Array,


Gah, Can anyone Please Explain the Differance, Hopefully you DONT State the nightmare of me having to re-do all the checkpoints iv'e already done it 2 time's xD



Cheers iiKyle
Reply
#2

Quote:
Originally Posted by iiKyle
View Post
Hey SA-MP User's.

Cheers for Comming to Yet Again, Another thread of Mine.


Now....

I'm Currently having a Query?

Whats the Point of this?

Code:
new Float:checkCoords[MAX_POINTS][4] = {
{-32.100069,-94.627357,-24.100069,-85.626357}, //Store 1.1 Entrance
As well as Having this (The Actual Checkpoints them Self's with a Size Para)

Code:
new playerCheckpoint[MAX_PLAYERS];
new Float:checkpoints[MAX_POINTS][4] = {
{-28.100069,-89.627357,1003.5469,3.0}, //Store 1.1 Entrance
Can Anyone Explain?

Iv'e went into the Game /saved all my Locations, But I Found It Trippy when that Array has Diffrent Coords to the Checkpoints Array,


Gah, Can anyone Please Explain the Differance, Hopefully you DONT State the nightmare of me having to re-do all the checkpoints iv'e already done it 2 time's xD



Cheers iiKyle
I'm assuming the first one is X,Y,Z and Rotation. And the second one is X,Y,Z and a size (like for creating a checkpoint)
Reply
#3

Thankyou so Much for Your Reply,


Rotation? Could you Explain a Little Further?
Reply
#4

The rotation could possibly be for setting the players position, one array stores the location and size for the CP and one stores the location and rotation that the player gets sent to.
Reply
#5

so what can i set the Rotation to for Deafult?
Reply
#6

stop the guessing ...

checkCoords uses Float: min_x, Float: min_y, Float: max_x, Float: max_y which is mostly used in IsPlayerArea
and checkpoints uses Float: x, Float: y, Float: z, Float: size for SetPlayerCheckpoint

I dont know who wrote that code but who the heck checks for an area if its a checkpoint :/
And why does he even saves the edges if he could calculate them from the center...
Reply
#7

Yeah Nero_3D, That was Great.

Thankyou so Much, Its Very Weird i Find.


But i Still have No Idea why?

Hm... So What Would i have to Do With the Coords

{1481.0179,-1772.3137,18.7958,179.4715},?


For an Example?
Reply
#8

I dont know what you want to do with the coords

If you want to know what the original scripter did with the coords than you only need to check the code where he used that array
Reply
#9

Code:
new Float:checkCoords[MAX_POINTS][4] = {
{-32.100069,-94.627357,-24.100069,-85.626357}, //69 Cent Store
{242.375991, 103.245994, 250.375991, 113.245994},//SFPD Exit
{1480.7555,-1777.3855 , 1485.7555, -1766.3855}, //CP_PrisonEnter
{1506.011352, -1064.139526, 1514.011352, -1056.139526}, // bank
{2300.7012, -24.0591, 2308.7012, -12.0591}, //CP BANK EXIT
{2307.645019, -8.784074, 2315.645019, -0.784075}, // Inside Bank
{2170.755615, -2253.109130, 2178.755615, -2245.109130}, //Explosives
{973.451416, -773.852722, 981.451416, -765.852722}, // Admin House
{2313.830322, -1030.757690, 2321.830322, -1022.757690}, //Admin House Exit
{1926.014160, -2126.011474, 1950.014160, -2106.011474}, //Sex Shop enter
{-114.511611, -33.429290, -90.511611, -13.429288}, // Sex Shop Exit
{-119.566085, -20.617439, -95.566085, -0.617439}, // Sex Shop Counter
{1914.582031, -1786.320434, 1938.582031, -1766.320434}, // Gas Station Enter
{-24.311285, -188.242904, -0.311285, -168.242904}, // Gas station checkpoint
{-40.028060, -197.120574, -16.028060, -177.120574}, // Store one exit
{462.096069, -25.185485, 486.096069, -5.185485}, // dance Rob
{279.810852, -44.787994, 303.810852, -24.787994}, // Ammunation (Center LS) Robbery Spot
{363.797363, -77.435653, 387.797363, -57.435653}, // Burger Shot Robbery Spot
{1166.014282, -1333.302246, 1186.014282, -1313.302246}, // Hospital
{-211.742660, -33.566627, -191.742660, -13.566627}, // Tatoo Shop
{2476.337646, -1654.873291, 2496.337646, -1634.873291}, // House 1
{225.373641, 1176.680053, 245.373641, 1196.680053}, // House 1 Exit
{1970.387695, -1729.006713, 1990.387695, -1709.006713}, // House2Enter
{218.089996, 1104.303955, 238.089996, 1124.303955}, // House2 Exit
{270.929382, -1777.145751, 290.929382, -1757.145751}, // House3enter
{213.038757, 1278.227294, 233.038757, 1298.227294}, // House3Exit
{179.641677, -1318.114135, 199.641677, -1298.114135}, // House4Enter
{14.116802, 1330.033691, 34.116802, 1350.033691}, // House4Exit
{342.405242, -1207.921020, 362.405242, -1187.921020}, // House5Enter
{12.747611, 1394.215698, 32.747611, 1414.215698}, // House5Exit inside
{979.783447, -838.658874, 999.783447, -818.658874}, // House 6 enter
{437.005004, 1387.073608, 457.005004, 1407.073608}, // House Exit to outside
{1084.829467, -657.912902, 1104.829467, -637.912902}, // House 7 enter
{224.166671, 1055.024414, 244.166671, 1075.024414}, // House 7 Exit
{2080.942626, -1287.854370, 2100.942626, -1267.854370}, // House 8 enter loc
{2249.523193, -1145.836303, 2269.523193, -1125.836303}, // House 8 Exit Cp (THIS ONE)
{2101.024902, -1254.397460, 2121.024902, -1234.397460}, // House9Enter
{2457.589111, -1708.400024, 2477.589111, -1688.400024}, // House 9 Exit CP
{1204.997924, -23.298475, 1224.997924, -3.298475}, // Pig Pen Robbery Spot
{2024.464721, -1416.565551, 2044.464721, -1396.565551},// hospital
{1430.501220, -2297.199462, 1450.501220, -2277.199462}, // Airpot blow cp
{353.255249, -2019.069458, 373.255249, -1999.069458}, // park cp for blow
{-41.306762, -38.996452, -21.306764, -18.996454}, // Gas Station Rob
{1391.436889, -777.322265, 1411.436889, -757.322265}, // Vinewood sign blow cp
{1516.515136, -1081.242065, 1536.515136, -1061.242065}, // Blow bank CP
{2137.707763, -1377.095458, 2157.707763, -1357.095458}, // Drug house cp
{193.934204, -50.282241, 213.934204, -30.282241}, // SubUrban robbery checkpoint
{197.757797, -108.696815, 217.757797, -88.696815}, // Binco rob
{366.704528, -128.806335, 386.704528, -108.806343} // Pizza place robbery
};
Thats the Scripter's, I Only just Found it Cause im Redoing it, i Just Liked some Things he Added.

So... What Would i do Could i get an Example?
Reply
#10

Would the checkCoords be the Same as a Gang Zone?

Sorry for the Bump, But i Still need Help With this Issue,

iiKyle
Reply
#11

Quote:
Originally Posted by iiKyle
View Post
Would the checkCoords be the Same as a Gang Zone?

Sorry for the Bump, But i Still need Help With this Issue,

iiKyle
No it wouldnt, if we read the comments it looks like that the coords represent all kind of spots (entrance, exit, robbery, ...) which he used for certain events
Reply
#12

first coordinates are for minx,miny,maxx,max,maxy (not sure about the order) as said and the second coorinates are X,Y,Z,Size for checkpoint.
IsPlayerInArea is used for checkpoints, because you can see only 1 checkpoint at time, so it is used like a checkpoint streamer. If you are in checkpoint area it shows you the checkpoint.
Saw this solution in one cops and robbers script.
Reply
#13

Quote:
Originally Posted by veyron
View Post
first coordinates are for minx,miny,maxx,max,maxy (not sure about the order) as said and the second coorinates are X,Y,Z,Size for checkpoint.
IsPlayerInArea is used for checkpoints, because you can see only 1 checkpoint at time, so it is used like a checkpoint streamer. If you are in checkpoint area it shows you the checkpoint.
Saw this solution in one cops and robbers script.
I would call it stupid because a checkpoint is a circle and not a sqaure... secondly I would save an whole array because for a a range check I only need the center points which are already needed for the checkpoint
Reply
#14

I don't know much but i know this.

new Float:checkpoints[MAX_POINTS][3] = { // (X, Y, Z) this is the cordinate where it is.
{-2224.4453,330.7598,35.3203}, // CP_StMarkBistroEnter
{-794.9482,490.7345,1376.1953} // CP_StMarkBistroExit
};

new Float:checkCoords[MAX_POINTS][4] = { // (Xmin, Ymin, Xmax, Ymax) and this are the cord where you can see the checkpoint.
{-2225.9275,328.8817,-2223.1873,331.281}, //CP_StMarkBistroEnter
{-795.9858,490.2960,-793.9975,491.9152} //CP_StMarkBistroExit

By me its that way
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)