17.01.2016, 22:42
So this is my current code to save toys:
However, I'm not really sure what it's doing. After purchasing two toys, this what my player file turned out to be (after saving of course
But, when I do my command to attach my toys, they revert to their original position.
REP+
PHP код:
dini_IntSet(string, "pindex", Toys[playerid][0][pindex]); dini_IntSet(string, "pindex1", Toys[playerid][1][pindex]); dini_IntSet(string, "pindex2", Toys[playerid][2][pindex]);
dini_IntSet(string, "pindex3", Toys[playerid][3][pindex]); dini_IntSet(string, "pindex4", Toys[playerid][4][pindex]); dini_IntSet(string, "pindex5", Toys[playerid][5][pindex]);
dini_IntSet(string, "pindex6", Toys[playerid][6][pindex]); dini_IntSet(string, "pindex7", Toys[playerid][7][pindex]); dini_IntSet(string, "pindex8", Toys[playerid][8][pindex]);
dini_IntSet(string, "pmodelid", Toys[playerid][0][pmodelid]); dini_IntSet(string, "pmodelid1", Toys[playerid][1][pmodelid]); dini_IntSet(string, "pmodelid2", Toys[playerid][2][pmodelid]);
dini_IntSet(string, "pmodelid3", Toys[playerid][3][pmodelid]); dini_IntSet(string, "pmodelid4", Toys[playerid][4][pmodelid]); dini_IntSet(string, "pmodelid5", Toys[playerid][5][pmodelid]);
dini_IntSet(string, "pmodelid6", Toys[playerid][6][pmodelid]); dini_IntSet(string, "pmodelid7", Toys[playerid][7][pmodelid]); dini_IntSet(string, "pmodelid8", Toys[playerid][8][pmodelid]);
dini_IntSet(string, "pboneid", Toys[playerid][0][pboneid]); dini_IntSet(string, "pboneid1", Toys[playerid][1][pboneid]); dini_IntSet(string, "pboneid2", Toys[playerid][2][pboneid]);
dini_IntSet(string, "pboneid3", Toys[playerid][3][pboneid]); dini_IntSet(string, "pboneid4", Toys[playerid][4][pboneid]); dini_IntSet(string, "pboneid5", Toys[playerid][5][pboneid]);
dini_IntSet(string, "pboneid6", Toys[playerid][6][pboneid]); dini_IntSet(string, "pboneid7", Toys[playerid][7][pboneid]); dini_IntSet(string, "pboneid8", Toys[playerid][8][pboneid]);
dini_FloatSet(string, "pfOffsetX", Toys[playerid][0][pfOffsetX]); dini_FloatSet(string, "pfOffsetX1", Toys[playerid][1][pfOffsetX]); dini_FloatSet(string, "pfOffsetX2", Toys[playerid][2][pfOffsetX]);
dini_FloatSet(string, "pfOffsetX3", Toys[playerid][3][pfOffsetX]); dini_FloatSet(string, "pfOffsetX4", Toys[playerid][4][pfOffsetX]); dini_FloatSet(string, "pfOffsetX5", Toys[playerid][5][pfOffsetX]);
dini_FloatSet(string, "pfOffsetX6", Toys[playerid][6][pfOffsetX]); dini_FloatSet(string, "pfOffsetX7", Toys[playerid][7][pfOffsetX]); dini_FloatSet(string, "pfOffsetX8", Toys[playerid][8][pfOffsetX]);
dini_FloatSet(string, "pfOffsetY", Toys[playerid][0][pfOffsetY]); dini_FloatSet(string, "pfOffsetY1", Toys[playerid][1][pfOffsetY]); dini_FloatSet(string, "pfOffsetY2", Toys[playerid][2][pfOffsetY]);
dini_FloatSet(string, "pfOffsetY3", Toys[playerid][3][pfOffsetY]); dini_FloatSet(string, "pfOffsetY4", Toys[playerid][4][pfOffsetY]); dini_FloatSet(string, "pfOffsetY5", Toys[playerid][5][pfOffsetY]);
dini_FloatSet(string, "pfOffsetY6", Toys[playerid][6][pfOffsetY]); dini_FloatSet(string, "pfOffsetY7", Toys[playerid][7][pfOffsetY]); dini_FloatSet(string, "pfOffsetY8", Toys[playerid][8][pfOffsetY]);
dini_FloatSet(string, "pfOffsetZ", Toys[playerid][0][pfOffsetZ]); dini_FloatSet(string, "pfOffsetZ1", Toys[playerid][1][pfOffsetZ]); dini_FloatSet(string, "pfOffsetZ2", Toys[playerid][2][pfOffsetZ]);
dini_FloatSet(string, "pfOffsetZ3", Toys[playerid][3][pfOffsetZ]); dini_FloatSet(string, "pfOffsetZ4", Toys[playerid][4][pfOffsetZ]); dini_FloatSet(string, "pfOffsetZ5", Toys[playerid][5][pfOffsetZ]);
dini_FloatSet(string, "pfOffsetZ6", Toys[playerid][6][pfOffsetZ]); dini_FloatSet(string, "pfOffsetZ7", Toys[playerid][7][pfOffsetZ]); dini_FloatSet(string, "pfOffsetZ8", Toys[playerid][8][pfOffsetZ]);
dini_FloatSet(string, "pfRotX", Toys[playerid][0][pfRotX]); dini_FloatSet(string, "pfRotX1", Toys[playerid][1][pfRotX]); dini_FloatSet(string, "pfRotX2", Toys[playerid][2][pfRotX]);
dini_FloatSet(string, "pfRotX3", Toys[playerid][3][pfRotX]); dini_FloatSet(string, "pfRotX4", Toys[playerid][4][pfRotX]); dini_FloatSet(string, "pfRotX5", Toys[playerid][5][pfRotX]);
dini_FloatSet(string, "pfRotX6", Toys[playerid][6][pfRotX]); dini_FloatSet(string, "pfRotX7", Toys[playerid][7][pfRotX]); dini_FloatSet(string, "pfRotX8", Toys[playerid][8][pfRotX]);
dini_FloatSet(string, "pfRotY", Toys[playerid][0][pfRotY]); dini_FloatSet(string, "pfRotY1", Toys[playerid][1][pfRotY]); dini_FloatSet(string, "pfRotY2", Toys[playerid][2][pfRotY]);
dini_FloatSet(string, "pfRotY3", Toys[playerid][3][pfRotY]); dini_FloatSet(string, "pfRotY4", Toys[playerid][4][pfRotY]); dini_FloatSet(string, "pfRotY5", Toys[playerid][5][pfRotY]);
dini_FloatSet(string, "pfRotY6", Toys[playerid][6][pfRotY]); dini_FloatSet(string, "pfRotY7", Toys[playerid][7][pfRotY]); dini_FloatSet(string, "pfRotY8", Toys[playerid][8][pfRotY]);
dini_FloatSet(string, "pfRotZ", Toys[playerid][0][pfRotZ]); dini_FloatSet(string, "pfRotZ1", Toys[playerid][1][pfRotZ]); dini_FloatSet(string, "pfRotZ2", Toys[playerid][2][pfRotZ]);
dini_FloatSet(string, "pfRotZ3", Toys[playerid][3][pfRotZ]); dini_FloatSet(string, "pfRotZ4", Toys[playerid][4][pfRotZ]); dini_FloatSet(string, "pfRotZ5", Toys[playerid][5][pfRotZ]);
dini_FloatSet(string, "pfRotZ6", Toys[playerid][6][pfRotZ]); dini_FloatSet(string, "pfRotZ7", Toys[playerid][7][pfRotZ]); dini_FloatSet(string, "pfRotZ8", Toys[playerid][8][pfRotZ]);
dini_FloatSet(string, "pfScaleX", Toys[playerid][0][pfScaleX]); dini_FloatSet(string, "pfScaleX1", Toys[playerid][1][pfScaleX]); dini_FloatSet(string, "pfScaleX2", Toys[playerid][2][pfScaleX]);
dini_FloatSet(string, "pfScaleX3", Toys[playerid][3][pfScaleX]); dini_FloatSet(string, "pfScaleX4", Toys[playerid][4][pfScaleX]); dini_FloatSet(string, "pfScaleX5", Toys[playerid][5][pfScaleX]);
dini_FloatSet(string, "pfScaleX6", Toys[playerid][6][pfScaleX]); dini_FloatSet(string, "pfScaleX7", Toys[playerid][7][pfScaleX]); dini_FloatSet(string, "pfScaleX8", Toys[playerid][8][pfScaleX]);
dini_FloatSet(string, "pfScaleY", Toys[playerid][0][pfScaleY]); dini_FloatSet(string, "pfScaleY1", Toys[playerid][1][pfScaleY]); dini_FloatSet(string, "pfScaleY2", Toys[playerid][2][pfScaleY]);
dini_FloatSet(string, "pfScaleY3", Toys[playerid][3][pfScaleY]); dini_FloatSet(string, "pfScaleY4", Toys[playerid][4][pfScaleY]); dini_FloatSet(string, "pfScaleY5", Toys[playerid][5][pfScaleY]);
dini_FloatSet(string, "pfScaleY6", Toys[playerid][6][pfScaleY]); dini_FloatSet(string, "pfScaleY7", Toys[playerid][7][pfScaleY]); dini_FloatSet(string, "pfScaleY8", Toys[playerid][8][pfScaleY]);
dini_FloatSet(string, "pfScaleZ", Toys[playerid][0][pfScaleZ]); dini_FloatSet(string, "pfScaleZ1", Toys[playerid][1][pfScaleZ]); dini_FloatSet(string, "pfScaleZ2", Toys[playerid][2][pfScaleZ]);
dini_FloatSet(string, "pfScaleZ3", Toys[playerid][3][pfScaleZ]); dini_FloatSet(string, "pfScaleZ4", Toys[playerid][4][pfScaleZ]); dini_FloatSet(string, "pfScaleZ5", Toys[playerid][5][pfScaleZ]);
dini_FloatSet(string, "pfScaleZ6", Toys[playerid][6][pfScaleZ]); dini_FloatSet(string, "pfScaleZ7", Toys[playerid][7][pfScaleZ]); dini_FloatSet(string, "pfScaleZ8", Toys[playerid][8][pfScaleZ]);
PHP код:
pindex=0
pindex1=1
pindex2=0
pindex3=0
pindex4=0
pindex5=0
pindex6=0
pindex7=0
pindex8=0
pmodelid=18867
pmodelid1=19317
pmodelid2=0
pmodelid3=0
pmodelid4=0
pmodelid5=0
pmodelid6=0
pmodelid7=0
pmodelid8=0
pboneid=10
pboneid1=1
pboneid2=0
pboneid3=0
pboneid4=0
pboneid5=0
pboneid6=0
pboneid7=0
pboneid8=0
pfOffsetX=-0.957000
pfOffsetX1=0.000000
pfOffsetX2=0.000000
pfOffsetX3=0.000000
pfOffsetX4=0.000000
pfOffsetX5=0.000000
pfOffsetX6=0.000000
pfOffsetX7=0.000000
pfOffsetX8=0.000000
pfOffsetY=0.000000
pfOffsetY1=0.208000
pfOffsetY2=0.000000
pfOffsetY3=0.000000
pfOffsetY4=0.000000
pfOffsetY5=0.000000
pfOffsetY6=0.000000
pfOffsetY7=0.000000
pfOffsetY8=0.000000
pfOffsetZ=0.000000
pfOffsetZ1=0.000000
pfOffsetZ2=0.000000
pfOffsetZ3=0.000000
pfOffsetZ4=0.000000
pfOffsetZ5=0.000000
pfOffsetZ6=0.000000
pfOffsetZ7=0.000000
pfOffsetZ8=0.000000
pfRotX=0.000000
pfRotX1=173.399963
pfRotX2=0.000000
pfRotX3=0.000000
pfRotX4=0.000000
pfRotX5=0.000000
pfRotX6=0.000000
pfRotX7=0.000000
pfRotX8=0.000000
pfRotY=0.000000
pfRotY1=-178.799972
pfRotY2=0.000000
pfRotY3=0.000000
pfRotY4=0.000000
pfRotY5=0.000000
pfRotY6=0.000000
pfRotY7=0.000000
pfRotY8=0.000000
pfRotZ=0.000000
pfRotZ1=2.799984
pfRotZ2=0.000000
pfRotZ3=0.000000
pfRotZ4=0.000000
pfRotZ5=0.000000
pfRotZ6=0.000000
pfRotZ7=0.000000
pfRotZ8=0.000000
pfScaleX=1.000000
pfScaleX1=1.000000
pfScaleX2=0.000000
pfScaleX3=0.000000
pfScaleX4=0.000000
pfScaleX5=0.000000
pfScaleX6=0.000000
pfScaleX7=0.000000
pfScaleX8=0.000000
pfScaleY=1.000000
pfScaleY1=1.000000
pfScaleY2=0.000000
pfScaleY3=0.000000
pfScaleY4=0.000000
pfScaleY5=0.000000
pfScaleY6=0.000000
pfScaleY7=0.000000
pfScaleY8=0.000000
pfScaleZ=1.000000
pfScaleZ1=1.000000
pfScaleZ2=0.000000
pfScaleZ3=0.000000
pfScaleZ4=0.000000
pfScaleZ5=0.000000
pfScaleZ6=0.000000
pfScaleZ7=0.000000
pfScaleZ8=0.000000
REP+