20.04.2014, 10:20
Hi.
I'm working on my accessories system, and for saving, I use OnPlayerEditAttachedObject.
But I'd like to know if my code is correct
I mean, does the for loop will browse each value of the bandana1 array ?
Will "a" get the values 18891, 18892, 18895, 18896, 18897, 18898, 18899 in this order ?
Thanks in advance.
I'm working on my accessories system, and for saving, I use OnPlayerEditAttachedObject.
But I'd like to know if my code is correct
PHP код:
new bandana1[] = {18891, 18892, 18895, 18896, 18897, 18898, 18899};
for(a; a < sizeof(bandana1); a++)
{
if(a == modelid)
{
PlayerInfo[playerid][pBandana1o][0] = fOffsetX;
PlayerInfo[playerid][pBandana1o][1] = fOffsetY;
PlayerInfo[playerid][pBandana1o][2] = fOffsetZ;
PlayerInfo[playerid][pBandana1o][3] = fRotX;
PlayerInfo[playerid][pBandana1o][4] = fRotY;
PlayerInfo[playerid][pBandana1o][5] = fRotZ;
PlayerInfo[playerid][pBandana1o][6] = fScaleX;
PlayerInfo[playerid][pBandana1o][7] = fScaleY;
PlayerInfo[playerid][pBandana1o][8] = fScaleZ;
}
}
Will "a" get the values 18891, 18892, 18895, 18896, 18897, 18898, 18899 in this order ?
Thanks in advance.