Array advice.
#5

pawn Код:
new Float:SkinCityPos[300][3][4]={//[Skin][City][xyza]
{{1000.0000,-1000.0000,0020.0000,000.0000},{-1000.0000,-2000.0000,0030.0000,090.0000},{2000.0000,2000.0000,0010.0000,180.0000}},//skin 0=line 0 i know, skin 0 not existing. you will need the same trick as for vehicles (+400 becomes +1 here)
{{1000.0000,-1000.0000,0020.0000,000.0000},{-1000.0000,-2000.0000,0030.0000,090.0000},{2000.0000,2000.0000,0010.0000,180.0000}},//skin 1 for santos, fierro, venturas
{{1000.0000,-1000.0000,0020.0000,000.0000},{-1000.0000,-2000.0000,0030.0000,090.0000},{2000.0000,2000.0000,0010.0000,180.0000}},//skin 2...
}
Skin=0-300; the first dimension [line] of the array
City=0-2; the second dimension {holding 3x coords{x,y,z} in it. oops, forgot to mention the angle ,a}
Float: x,y,z,a are stored in the array, so this
pawn Код:
{{santos},{fierro},{venturas}}
{{x,y,z,a},{x,y,z,a},{x,y,z,a}}
can be used like:
pawn Код:
SetPlayerPos(playerid,SkinCityPos[Skin][City][0],SkinCityPos[Skin][City][1],SkinCityPos[Skin][City][2]);
SetPlayerFacingAngle(playerid,SkinCityPos[Skin][City][3]);
.. or am i completedly wrong now?
Reply


Messages In This Thread
Array advice. - by MP2 - 29.01.2012, 22:20
Re: Array advice. - by Lorenc_ - 29.01.2012, 22:55
Re: Array advice. - by MP2 - 29.01.2012, 23:39
Re: Array advice. - by MP2 - 30.01.2012, 02:45
Re: Array advice. - by Babul - 30.01.2012, 03:40

Forum Jump:


Users browsing this thread: 2 Guest(s)