19.04.2011, 12:16
Hey please help me,how to make same command at moveable gate.i dont know,how to script that,when gate open and when gate close,we use same commaned like /gate
It is new obj; // Somewhere at the top of your script public OnGameModeInit() { obj = CreateObject(980, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); //coords here return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/moveobject", true) == 0) { new string[50]; new movetime = MoveObject(obj, 0, 0, 10, 2.00); format(string, sizeof(string), "Object will finish moving in %d milliseconds", movetime); SendClientMessage(playerid, 0xFF000000, string); return 1; } |
some guy posted this somewhere its right but bear in mind you need the co ordinated i have edited it to shopw you where the co ordinates go
|
new Up = 0;
if(Up == 1)
{
MoveObject(...);
Up = 0;
}
else if(Up == 0)
{
MoveObject(...);
Up = 1;
}