how to make same command at moveable gate
#1

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
Reply
#2

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

Quote:

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;
}

Reply
#3

Quote:
Originally Posted by peterRook
Посмотреть сообщение
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
Read his post. This will make the gate only go up.

You can use something like this:

pawn Код:
new Up = 0;

if(Up == 1)
{
    MoveObject(...);
    Up = 0;
}
else if(Up == 0)
{
    MoveObject(...);
    Up = 1;
}
Reply
#4

I still cant,i already use it your code
Reply
#5

How... Just paste that code inside you're command, fill in the positions, speed and objectname and you're done!
And remember to change the up and down pos, otherwise it won't work for sure -.-
Reply
#6

I dont understand ,but your code got error
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)