Quote:
Originally Posted by KurtBag
I'm using barrierturn on MTA. It is an orange barrier. When i type /gate, it opens the gate correctly. But when i type it again, it won't go back down. As you will notice, they are not the same.
Код:
Gateopen = 0 MoveObject(LSPDGate, 1544.6591796875, -1623.9599609375, 13.10000038147, 5);
Gateopen = 1 MoveObject(LSPDGate, 1544.6600341797, -1623.9599609375, 13.10000038147, 5);
If you can see correctly, they are different. There X value is changed slightly. In number 1, you notice in MoveObject i set the object back to its original position (as you can see under OnGameModeInit.
Please, someone help me.
|
I laughed so hard at this! If you have ever done graphs in school or something, you would of remembered that the X and Y positions work both horizontally and vertically. If you want the gate to move South, you would subtract from the X, if you wanted it to go North, you would add to it. If you wanted it to go East, you would add to the Y, West would be subtracted... etc. Although it doesn't use a Z co-ordinate right? Because normal graphs aren't 3d, so the Z co-ord is used to measure it's height, just like in 3D objects... If you want the gate to go up, add to the Z co-ord... if you want it to go down... subtract from it... MoveObject(LSPDGate, X, Y, Z, 5...)
P.S. You need to add 0, 270, 90 on the end of each MoveObject function....
so:
pawn Код:
Gateopen = 0 MoveObject(LSPDGate, 1544.6591796875, -1623.9599609375, 13.10000038147, 5, 0, 270, 90);
Gateopen = 1 MoveObject(LSPDGate, 1544.6600341797, -1623.9599609375, 13.10000038147, 5, 0, 270, 90);
IF, you are using SA-MP 0.3d... otherwise leave it the same.
EDIT: He's right btw... your closed gate co-ordinate, should be the same co-ordinates as your CreateObject position...