12.04.2013, 14:19
hey guys. i'm trying to script a shuttle for my server using moving objects with createdynamicobject .
i scripted this but when i test it in game , nothing happens it just shows the game text .
anyone knows how to fix it?
i scripted this but when i test it in game , nothing happens it just shows the game text .
anyone knows how to fix it?
pawn Код:
new rlaunch1;
new rlaunch2;
new rlaunch3;
new rlaunch4;
new rlaunch5;
new rlaunchearth;
forward rlaunchtimer();
public OnGameModeInit()
{
CreateDynamicObject(3673,230.8999939,1990.4000244,39.7999992,0.0000000,0.0000000,179.9945068, -1, -1, -1, 300); //object(laxrf_refinerybase) (1)
rlaunch1 = CreateDynamicObject(3585,231.8000031,2000.0999756,31.1000004,0.0000000,90.0000000,0.0000000, -1, -1, -1, 300); //object(lastran1_la02) (2)
rlaunch2 = CreateDynamicObject(3585,231.8999939,2000.0999756,39.2000008,0.0000000,90.0000000,0.0000000, -1, -1, -1, 300); //object(lastran1_la02) (3)
rlaunch3 = CreateDynamicObject(3258,229.1999969,1999.3000488,54.9000015,359.2500000,180.0000000,180.0000000, -1, -1, -1, 300); //object(refthinchim1) (2)
rlaunch4 = CreateDynamicObject(3258,235.3000031,1999.3000488,54.9000015,359.2474365,179.9945068,179.9945068, -1, -1, -1, 300); //object(refthinchim1) (3)
rlaunch5 = CreateDynamicObject(3585,231.8999939,2000.0999756,47.2999992,0.0000000,90.0000000,0.0000000, -1, -1, -1, 300); //object(lastran1_la02) (4)
return 1;
}
CMD:launch(playerid, params[])
{
SetTimer("rlaunchtimer",10000,0);
GameTextForPlayer(playerid, "Shuttle will lift next 20 seconds", 3000, 5);
}
public rlaunchtimer()
{
if(rlaunchearth == 0)
{
SetObjectPos(rlaunch1, 231.8000031,2000.0999756,31.1000004);
SetObjectPos(rlaunch2, 231.8999939,2000.0999756,39.2000008);
SetObjectPos(rlaunch3, 229.1999969,1999.3000488,54.9000015);
SetObjectPos(rlaunch4, 235.3000031,1999.3000488,54.9000015);
SetObjectPos(rlaunch5, 231.8999939,2000.0999756,47.2999992);
SetObjectRot(rlaunch1, 0.0000000,90.0000000,0.0000000 );
SetObjectRot(rlaunch2, 0.0000000,90.0000000,0.0000000 );
SetObjectRot(rlaunch3, 359.2500000,180.0000000,180.0000000 );
SetObjectRot(rlaunch4, 359.2474365,179.9945068,179.9945068 );
SetObjectRot(rlaunch5, 0.0000000,90.0000000,0.0000000 );
MoveObject(rlaunch1, 231.89999389648, 2000.0999756, 31.1000004, 100);
MoveObject(rlaunch2, 231.89999389648, 2000.0999756, 39.2000008, 100);
MoveObject(rlaunch3, 231.89999389648, 1999.3000488,54.9000015, 100);
MoveObject(rlaunch4, 231.89999389648, 1999.3000488, 54.9000015, 100);
MoveObject(rlaunch5, 231.89999389648, 2000.0999756, 47.2999992, 100);
}
if(rlaunchearth == 1)
{
MoveObject(rlaunch1, 231.89999389648, 2000.0999756, 31.1000004, 100);
MoveObject(rlaunch2, 231.89999389648, 2000.0999756, 39.2000008, 100);
MoveObject(rlaunch3, 231.89999389648, 1999.3000488,54.9000015, 100);
MoveObject(rlaunch4, 231.89999389648, 1999.3000488, 54.9000015, 100);
MoveObject(rlaunch5, 231.89999389648, 2000.0999756, 47.2999992, 100);
}
}