29.04.2009, 14:45
have anyone a easy code for moving objects (GATES)
thx...alot....
thx...alot....
new gate1; // name of the gate, change it to whatever you want
gate1 = CreateObject(id_of_the_gate, coords); // coords of closed gate
if (strcmp("/opengate1", cmdtext, true) == 0) { MoveObject(opengate1, coords_of_the_gate_when_its_opened, 5); //5 is the speed of opening and the coords when the gate is opened SendClientMessage(playerid, 0x00F600AA, "GATE OPENED !"); return 1; }
Originally Posted by Toniu_
ON top of your script add on
Код:
new gate1; // name of the gate, change it to whatever you want Код:
gate1 = CreateObject(id_of_the_gate, coords); // coords of closed gate Код:
if (strcmp("/opengate1", cmdtext, true) == 0) { MoveObject(opengate1, coords_of_the_gate_when_its_opened, 5); //5 is the speed of opening and the coords when the gate is opened SendClientMessage(playerid, 0x00F600AA, "GATE OPENED !"); return 1; } |
coords_of_the_gate_when_its_opened
Originally Posted by Toniu_
Coords when the gate is opened/closed, you need them to make that code
|
Originally Posted by Toniu_
how could it be the same ? Think a little bit.
I suggest you to use MTA Map Editor , to place your gate perfectly or In Game Object Editor. First put it as closed, then put it as you want it to be when its opened |
CreateObject(980, 1385.557617, -2688.828857, 272.734619, 0.0000, 0.0000, 270.0000);
CreateObject(980, 1557.510864, -2539.105957, 15.320267, 0.0000, 0.0000, 0.0000);
Originally Posted by Toniu_
so what was your problem ?? LOL well done, now follow the code
|
Originally Posted by Toniu_
so what was your problem ?? LOL well done, now follow the code
|