Gate doesnt open slow
#1

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

}
Reply
#2

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
Reply
#3

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
Reply
#4

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)