[Help] With Gates.
#1

This is what i have:


CMD:gate(playerid, params[])
{
{
if(GateState == 1) //if gate is open
{
GateState = 0; // Gate=Dicht
MoveObject(Gate1,1.2000000476837, -268, 6.1999998092651, 3.0); //
MoveObject(Gate2,-6.6999998092651, -268, 6.1999998092651, 3.0); //
MoveObject(Gate3,-75.800003051758, -348.89999389648, 0.89999997615814, 3.0); //
MoveObject(Gate4,-75.800003051758, -356.79998779297, 0.89999997615814, 3.0); //
}
else
{
GateState = 1; //Gate = Open
MoveObject(Gate4, -75.800003051758, -364.5, 0.89999997615814,3.0);
MoveObject(Gate3, -75.800003051758, -341.39999389648, 0.89999997615814,3.0);
MoveObject(Gate2, -13.10000038147, -268, 6.1999998092651, 3.0);
MoveObject(Gate1, 8.3000001907349, -268, 6.1999998092651, 3.0);
}
}
return 1;
}




Gate 1 and 2 are fine.. but 3 and 4 are bugged

When i restart svr they look good..

But when i do /gate they turn 90 graces.. and when i redo /gate to close they still stay turned and they don't close good. I tried everything and now this is my last chance. may someone see the mistake?

Greetz
Reply
#2

I have this problem too it's probably the new samp's version bug....
Reply
#3

All gates are doing that after 0.3d.
Reply
#4

Weird thing is I seen this happen in another server that went to 0.3d but all my gates work fine and i'm on 0.3d :S
Reply
#5

Ever since 0.3d has been put into place, Object rotation has been added in MoveObject functions. Simply just add 0.0, 0.0, 0.0 on the end of the function.

pawn Код:
MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX, Float:RotY, Float:RotZ);
For example:
pawn Код:
MoveObject(Gate3, -75.800003051758, -348.89999389648, 0.89999997615814, 3.0, 0.0, 0.0, 0.0);
Reply
#6

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Ever since 0.3d has been put into place, Object rotation has been added in MoveObject functions. Simply just add 0.0, 0.0, 0.0 on the end of the function.

pawn Код:
MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX, Float:RotY, Float:RotZ);
For example:
pawn Код:
MoveObject(Gate3, -75.800003051758, -348.89999389648, 0.89999997615814, 3.0, 0.0, 0.0, 0.0);
This doesn't work for me D=, someone else has idea?
Reply
#7

Its not a bug, Its a feature added in 0.3D..
pawn Код:
MoveObject(objectid,coordX,coordy,coordz,speed,ROTX,ROTY,ROTZ);
If rotX,Y,Z Are left blank, it automatically adds 1000 in its place...
Reply
#8

Offtopic-Should use code around the code
in topic-I agree with SupremeCommander
Reply
#9

I don't specially understnad:S?

Off topic:

Also I've got bug with DestroyObject.

if i do it and i go In Game it Doesn't destroys..

I have above CreateObject(..................

DestroyObject([objectid]);

And it doesn't works also..
Reply
#10

To remove objects /destroy objects use this
RemoveBuildingForPlayer(playerid
https://sampwiki.blast.hk/wiki/RemoveBuildingForPlayer
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)