SA-MP Forums Archive
Gate doesnt open slow - 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: Gate doesnt open slow (/showthread.php?tid=368047)



Gate doesnt open slow - thefatshizms - 12.08.2012

Hi got a problem for some reason my gate is not opening slowly... its fliping open

pawn Код:
CMD:gate1(playerid, params[])
{
    if(gTeam[playerid] == ARMY)
    {
        MoveObject(armygate1, -1550.59997559,500.50000000,6.19999981, 10, 0.00000000,0.00000000,173.98242188);
        SendClientMessage(playerid, COLOR_GREEN, "You have opened the gate. You have 5 seconds untill it closes.");
        SetTimer("Close", 5000, false);
        return 1;
    }
    else if(gTeam[playerid] != ARMY)
    {
        SendClientMessage(playerid, COLOR_RED, "This command is only for army.");
        return 1;
    }
    return 1;
}
forward Close();
public Close()
{
    MoveObject(armygate1, -1550.59997559,500.50000000,6.19999981, 10, 0.00000000,0.00000000,269.98242188);

}



Re: Gate doesnt open slow - IceMeteor - 12.08.2012

pawn Код:
native MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)
Try to decrease the speed


Re: Gate doesnt open slow - Jstylezzz - 12.08.2012

pawn Код:
MoveObject(armygate1, -1550.59997559,500.50000000,6.19999981, 10, 0.00000000,0.00000000,173.98242188);
to
pawn Код:
MoveObject(armygate1, -1550.59997559,500.50000000,6.19999981, 3.5, 0.00000000,0.00000000,173.98242188);
notice the difference?
i changed the speed from 10 to 3.5
i use 3.5 everywhere in my script, and it goes very smoothly/normally

don't forget to change this in the close function too


Re: Gate doesnt open slow - thefatshizms - 12.08.2012

it doesnt make a difference i had it on 1 and it still was super fast


Re: Gate doesnt open slow - Jstylezzz - 12.08.2012

how do you create the gate? with which code?
if you use CreateDynamicObject, make sure to use MoveDynamicObject to move it..


Re: Gate doesnt open slow - thefatshizms - 12.08.2012

Код:
armygate1 = CreateObject(987,-1550.59997559,500.50000000,6.19999981,0.00000000,0.00000000,269.98242188); //object(elecfence_bar)