24.09.2013, 15:23
Ok, so first we have to create a variable at the top of the script ( global variable) so the the script can know that you're trying to make a object;
so:
next , under OnGameModeInit ( when the console is starting ( gamemode))
then whenever you want to move it
so:
pawn Код:
new Firstgate; //first gate
new Secondgate; //second gate
pawn Код:
Firstgate = CreateDynamicObject(980, 2497.20508, 2779.04443, 12.34830, 0.00000, 0.00000, 90.00000); //assign our gate to the variable, so the compiler will say something like: ok, i'm gonna read this as a object ( gate)
Secondgate = CreateDynamicObject(980, 2497.36572, 2767.41577, 12.58362, 0.00000, 0.00000, 90.00000); //the same as above
pawn Код:
MoveDynamicObject(Firstgate, 2497.20508, 2779.04443, 17.56272, 5.0, 0.00000, 0.00000, 90.00000); //firstgate, moving it to the open position
MoveDynamicObject(Secondgate, 2497.36572, 2767.41577, 12.58362, 5.0, 0.00000, 0.00000, 90.00000); //the same but for secondgate