Array adjustments. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Array adjustments. (
/showthread.php?tid=269981)
Array adjustments. -
Martin_M - 18.07.2011
Hello everybody.
I need some help. Is it possible to do like this
Код:
new const BuyableCars[][5] = {
{ integer, float, float, float, float },
{ integer, float, float, float, float }
};
Because if you not write Float: before BuyableCars, i get errors, but if you do - another errors.
Thanks for help.
Re: Array adjustments. -
BuLLeT[LTU] - 18.07.2011
pawn Код:
enum info
{
Integer,
Float:X,
etc...
}
new BuyableCars[2][info] = {
{ integer, float, float, float, float },
{ integer, float, float, float, float }
};
Re: Array adjustments. -
Martin_M - 18.07.2011
I found another way:
Код:
new const Float:BuyableCars[][5] = {
{ integer as float ( ex: 411.0 ), float, float, float, float },
{ integer as float ( ex: 411.0 ), float, float, float, float }
};
And then you gotta to create cars, you do like this:
Код:
CreateVehicle(floatround(BuyableCars[0][0]),BuyableCars[0][1],BuyableCars[0][2],BuyableCars[0][3],BuyableCars[0][4],-1,-1,-1);
But thanks for help anyway. Appreciate.
Re: Array adjustments. -
BuLLeT[LTU] - 18.07.2011
But you wont insert string as float
Re: Array adjustments. -
Martin_M - 18.07.2011
Quote:
Originally Posted by BuLLeT[LTU]
But you wont insert string as float
|
Problem is, i didn't need a string, i just needed integer between floats.