14.04.2011, 15:18
Hi, i had a gate and i could open it with a command, it worked perfectly but a friend said that i needed to add more gates, so i added more gates and the gates didn't appear, so i deleted the new gates and now the old gate still don't appear.
Код:
#include <a_samp> new AutomaticGate; new AutomaticGate2; public OnGameModeInit() { AutomaticGate = CreateObject(969, -365.49084472656, -1390.4411621094, 20.099876403809, 0, 0, 298); AutomaticGate2 = CreateObject(969, -365.49084472656, -1390.4411621094, 22.099876403809, 0, 0, 298); return 0; } forward OnPlayerCommandText(playerid, cmdtext[]); public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/mitchellkevin")) { MoveObject(AutomaticGate, -365.49084472656, -1390.4411621094, 8.099876403809, 2.0); MoveObject(AutomaticGate2, -365.49084472656, -1390.4411621094, 10.099876403809, 2.0); SetTimer("CloseMyGate", 10000, 0); // This will cale the 'CloseMyGate' after 10 seconds. SendClientMessage(playerid, 0xFFFFFFAA, "Welkom coole gozer :)"); } } forward CloseMyGate(); public CloseMyGate() { MoveObject(AutomaticGate, -365.49084472656, -1390.4411621094, 20.099876403809, 2.0);//Move gate back ... MoveObject(AutomaticGate2, -365.49084472656, -1390.4411621094, 22.099876403809, 2.0); return 1; }