I seriously don't know what to so here
#1

Hi, can someone explain these to me because I have no idea how they should be set. I know they're wrong but I have no idea how I should fix it.
pawn Код:
new Float:RandLSAirports[][] =
{
    {2053.9658,-2493.7380,13.8293, -1303.8068,192.8536,14.4444, "Los Santos Airport to San Fierro Airport"},
    {2053.9658,-2493.7380,13.8293, 1476.8574,1385.6697,11.7578, "Los Santos Airport to Las Venturas Airport"}
};

new Float:RandSFAirports[][] =
{
    {-1641.7721,-149.7614,13.8755, 2053.9658,-2493.7380,13.8293, "San Fierro Airport to Los Santos Airport"},
    {-1641.7721,-149.7614,13.8755, 1476.8574,1385.6697,11.7578,"San Fierro Airport to Las Venturas Airport"}
};
Cheers!
Reply
#2

Text is not a float, is it?
that's all I know about it :/
Reply
#3

Make 2 arrays
That's what I do
Reply
#4

You can do something like this:
pawn Код:
enum ainport_info
{
    Float: fromx,
    Float: fromy,
    Float: fromz,
    Float: tox,
    Float: toy,
    Float: toz,
    traveldesc[35]
}
new
    gLocation[][ainport_info] = {
    {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, "Description"},
    {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, "Description"}
};

// Now you can use that like so:
SetPlayerPos(playerid, gLocation[0][fromx], gLocation[0][fromy], gLocation[0][fromz]);

new
    iStr[50];
format(iStr, sizeof(iStr), "Location description: %s", gLocation[0][traveldesc]);
SendClientMessage(playerid, -1, iStr);
Reply
#5

pawn Код:
new Float:RandLSAirports[] =
{
    {2053.9658,-2493.7380,13.8293, -1303.8068,192.8536,14.4444, "Los Santos Airport to San Fierro Airport"},
    {2053.9658,-2493.7380,13.8293, 1476.8574,1385.6697,11.7578, "Los Santos Airport to Las Venturas Airport"}
};

new Float:RandSFAirports[] =
{
    {-1641.7721,-149.7614,13.8755, 2053.9658,-2493.7380,13.8293, "San Fierro Airport to Los Santos Airport"},
    {-1641.7721,-149.7614,13.8755, 1476.8574,1385.6697,11.7578,"San Fierro Airport to Las Venturas Airport"}
};
Just gotta remove the last [].
Reply
#6

Thanks Lethal, its working.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)