Float:checkCoords
#1

Hello,

I do not know how to take : {Xmax, Xmin, Ymax, Ymin}

Код:
new Float:checkCoords[MAX_POINTS][4] = {
{692.9751,-1468.8489,772.1730,-1419.9862}, //Chek1Ent

Sorry for my English, i am french
Reply
#2

What you mean? You mean you want to take the coordinates from the array you have given?
If yes, then using
pawn Код:
printf("%f",checkCoords[0][0]);
will give you
Код:
692.9751
and so on...
Reply
#3

No I just want to change a CP of place, I have make:

Код:
new Float:checkpoints[MAX_POINTS][4] = {
{2808.2341,-1177.3995,25.3685,3.0}, //Chek1Ent


And I understands not here:

Код:
new Float:checkCoords[MAX_POINTS][4] = {
{692.9751,-1468.8489,772.1730,-1419.9862}, //Chek1Ent
Reply
#4

Are you sure they are Xmax, Xmin, Ymax, Ymin.
It seems like X, Y, Z, Angle.
Reply
#5

I do not know how to have Xmax, Xmin, Ymax, Ymin
Reply
#6

Sorry man, I cant understand what you're asking...
Reply
#7

How to obtain Xmax, Xmin, Ymax, Ymin?
Reply
#8

pawn Код:
stock CheckCoordinates( playerid, Float:XMin, Float:YMin, Float:XMax, Float:YMax )
{
    new RetValue = 0;
    new Float: PosX, Float: PosY, Float: PosZ;
    GetPlayerPos( playerid, PosX, PosY, PosZ );

    if( PosX >= XMin && PosY >= YMin && PosX < XMax && PosY < YMax )
    {
      RetValue = 1;
    }
    return RetValue;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)