16.02.2012, 08:56
Okay well before I give you my code, here's my problem. I made 2 objects in MTA and converted them correctly and made a /open /close command for them, that all works. BUT.. The problem is they only open and close once, then I can't use /open /close again cos It don't work. So heres my code and hope you can help.
---------------
---------------
Код:
new lspd1; new lspd2;
Код:
lspd1 = CreateObject(2933,1588.59997559,-1638.09997559,14.19999981,0.00000000,0.00000000,0.00000000); //LSPD CLOSED lspd2 = CreateObject(2933,1596.40002441,-1638.00000000,14.19999981,0.00000000,0.00000000,0.00000000); //LSPD OPEN
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp("/0214 close",cmdtext,true,10) == 0) { new string[50]; new movetime = MoveObject(lspd2, 1588.59997559,-1638.09997559,14.19999981, 2.00); format(string, sizeof(string), "LSPD GATES ARE CLOSING.", movetime); SendClientMessage(playerid, 0xFF000000, string); return 1; } if(strcmp("/0214 open",cmdtext,true,10) == 0) { new string[50]; new movetime = MoveObject(lspd1, 1596.40002441,-1638.00000000,14.19999981, 2.00); format(string, sizeof(string), "LSPD GATES ARE OPENING.", movetime); SendClientMessage(playerid, 0xFF000000, string); return 1; }