SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Thread Tools Display Modes
Old 21/03/2013, 05:31 PM   #1
Join Date: Jun 2011
Posts: 887
Reputation: 45
Default Arrays question

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];
PaulDinam is offline   Reply With Quote
Old 21/03/2013, 05:33 PM   #2
Glad2BeHere's Avatar
Join Date: Oct 2012
Posts: 759
Reputation: 136
Default Re: Arrays question

0-4 =5
Glad2BeHere is offline   Reply With Quote
Old 21/03/2013, 05:35 PM   #3
Big Clucker
Jewell's Avatar
Join Date: Jan 2013
Posts: 136
Reputation: 23
Default Re: Arrays question

yes. you can. trunkammo[0], trunkammo[1], ect
Jewell is offline   Reply With Quote
Old 21/03/2013, 05:37 PM   #4
Misiur's Avatar
Join Date: Jul 2009
Location: Poland
Posts: 2,528
Reputation: 556
Default Re: Arrays question

Why not
pawn Code:
VehicleInfo[PlayerInfo[playerid][pCarKey]][carTrunkWep] = trunkwep;
VehicleInfo[PlayerInfo[playerid][pCarKey]][carTrunkAmmo] = trunkammo;
Misiur is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Arrays question! Kush Scripting Help 4 09/09/2012 07:10 PM
Arrays Wesley221 Scripting Help 5 01/02/2012 08:53 AM
Question about arrays and tables xtremedeblin Help Archive 0 14/08/2010 02:04 AM
[Question] Arrays ArTisT Help Archive 1 20/06/2010 06:44 PM
Question about arrays Outbreak Help Archive 5 23/04/2009 10:56 PM

All times are GMT. The time now is 05:54 PM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.