G_ObjectsRot - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: G_ObjectsRot (
/showthread.php?tid=238897)
G_ObjectsRot -
Ectazy - 12.03.2011
Hi all. I create a barrier. But when I wrote / Opengate gates will not open. My script:
Код:
if(playerDB[playerid][admin])
{
if (!strcmp("/opengate", cmdtext, true))
{
new Float:rot[3];
RotateObject(PD1,rot[0],rot[1]+270.0,rot[2],90,50.0);
MoveObject(PD1,2238.19726562,2450.41796875,10.61546040, 1);
return 1;
}
if(playerDB[playerid][admin])
{
if (!strcmp("/closegate", cmdtext, true))
{
new Float:rot[3];
RotateObject(PD1,rot[0],rot[1]-90.0,rot[2],90,50.0);
MoveObject(PD1,2238.19726562,2450.41796875,10.61546040, 1);
return 1;
}
Thanks for the help.
Re: G_ObjectsRot -
Mauzen - 12.03.2011
Well, you dont put anything in the rot[] array, this means, all variables are 0. So in the RotateObject lines you have 0, 0+270, 0 and 0, 0-90, 0. As 270 and -90 are the same, and aslo the coords in both MoveObjects are the same, there is nothing that could change.
You have to put the right stuff in rot[] first, and eventually change the MoveObject coords (depends on how the gate should move)
Re: G_ObjectsRot -
Ectazy - 12.03.2011
Not very understand. If you can, write a script. Thanks.
Re: G_ObjectsRot -
Ectazy - 13.03.2011
Help..
Re: G_ObjectsRot -
Ectazy - 18.03.2011
Up..
Re: G_ObjectsRot -
Ectazy - 21.03.2011
Somebody help..