06.07.2011, 22:12
(
Последний раз редактировалось Steeve_Smith; 07.07.2011 в 08:55.
)
Hey guys!
I followed [ame=http://www.youtube.com/watch?v=E_aO0Bp64I4&feature=related]this[/ame] tutorial but I got some problems:
I created the first gate, I saved, then I created the second gate, I saved (the first one is on the road and the second one on the green to allow the guy who typed /open to pass).
Here is the pic of the first gate:

But both gates have the same Location... I don't know why, but when I converted the code on convertfss, the location of the first gate was the same as the second one... Look the pic, I opened the gate and it didn't move:

So why does MTA keep the same location for both gates? Normally it should not, so what's wrong?
Edit: I am sure that I took locations in both files, but they were same..
Edit: Here is all the code related to the movable gates:
Anyway the PAWNO's code is right.
I followed [ame=http://www.youtube.com/watch?v=E_aO0Bp64I4&feature=related]this[/ame] tutorial but I got some problems:
I created the first gate, I saved, then I created the second gate, I saved (the first one is on the road and the second one on the green to allow the guy who typed /open to pass).
Here is the pic of the first gate:

But both gates have the same Location... I don't know why, but when I converted the code on convertfss, the location of the first gate was the same as the second one... Look the pic, I opened the gate and it didn't move:

So why does MTA keep the same location for both gates? Normally it should not, so what's wrong?
Edit: I am sure that I took locations in both files, but they were same..
Edit: Here is all the code related to the movable gates:
Код:
new gate; public OnGameModeInit() { gate = CreateObject(969,2464.58935547,-1663.40649414,12.30931187,0.00000000,0.00000000,89.75000000); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp(cmdtext, "/open", true) == 0) { MoveObject(gate,2464.58935547,-1663.40649414,12.30931187, 1); // The gate is going left SendClientMessage(playerid, 0x00FFFFFF, "Portail ouvert!"); return 1; } if(strcmp(cmdtext, "/close", true) == 0) { MoveObject(gate,2464.58935547,-1663.40649414,12.30931187, 1); // The gate is going right SendClientMessage(playerid, 0x00FFFFFF, "Portail fermй!"); return 1; } return 0; }