SA-MP Forums Archive
[Help] With Gates. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] With Gates. (/showthread.php?tid=301792)



[Help] With Gates. - accertie - 05.12.2011

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


Re: [Help] With Gates. - KosmasRego - 05.12.2011

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


Re: [Help] With Gates. - SnG.Scot_MisCuDI - 05.12.2011

All gates are doing that after 0.3d.


Re: [Help] With Gates. - LiamM - 05.12.2011

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


Re: [Help] With Gates. - Thresholdold - 06.12.2011

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);



Re: [Help] With Gates. - accertie - 06.12.2011

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?


Re: [Help] With Gates. - SupremeCommander - 06.12.2011

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...



Re: [Help] With Gates. - §с†¶e®РµРe - 06.12.2011

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


Re: [Help] With Gates. - accertie - 06.12.2011

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..


Re: [Help] With Gates. - jhn - 06.12.2011

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