SA-MP Forums Archive
Arrays question - 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)
+--- Thread: Arrays question (/showthread.php?tid=424329)



Arrays question - PaulDinam - 21.03.2013

Can I use this as an 5 space array for int?
new trunkwep[5], trunkammo[5];

For example:

pawn Code:
VehicleInfo[PlayerInfo[playerid][pCarKey]][carTrunkWep][0] = trunkwep[0];
        VehicleInfo[PlayerInfo[playerid][pCarKey]][carTrunkAmmo][0] = trunkammo[0];



Re: Arrays question - Glad2BeHere - 21.03.2013

yep
0-4 =5


Re: Arrays question - Jewell - 21.03.2013

yes. you can. trunkammo[0], trunkammo[1], ect


Re: Arrays question - Misiur - 21.03.2013

Why not
pawn Code:
VehicleInfo[PlayerInfo[playerid][pCarKey]][carTrunkWep] = trunkwep;
VehicleInfo[PlayerInfo[playerid][pCarKey]][carTrunkAmmo] = trunkammo;