22.08.2010, 18:41
I think there might be a problem since there is one float variable for each gate so they all use the same one.
Try to use something like this:
Unfortunately you're gonna need to place the 'modelid' each time before the recreation.
In your case you can use 'newobj'.
Try to use something like this:
pawn Код:
forward UnAttachObjectFromPlayer(playerid,objectid,modelid);
public UnAttachObjectFromPlayer(playerid,objectid,modelid)
{
new Float:OPOS[400][6];
GetPlayerObjectPos(playerid,objectid,OPOS[objectid][0],OPOS[objectid][1],OPOS[objectid][2]);
GetPlayerObjectRot(playerid,objectid,OPOS[objectid][3],OPOS[objectid][4],OPOS[objectid][5]);
DestroyPlayerObject(playerid,objectid);
objectid = CreatePlayerObject(playerid,modelid,OPOS[objectid][0],OPOS[objectid][1],OPOS[objectid][2],OPOS[objectid][3],OPOS[objectid][4],OPOS[objectid][5]);
return 1;
}
In your case you can use 'newobj'.