[Tutorial] Opening two gates At the same time
#3

Quote:
Originally Posted by [iPs]Bruno Tadeu
Посмотреть сообщение
Moving Objects 2 At the Same Time?


1 To create the objects (not teach here.)
Set 2 of the two objects at the New's.

Let's go:
New gatemove1;
new gatemove2;

Now In Ongamemodeinit:

gatemove1 = CreateObject(IDPORTAO,CoordX,CoordY,CoordZ,RotZ,Ro tZ,RotZ);
gatemove2 = CreateObject(IDPORTAO,CoordX,CoordY,CoordZ,RotZ,Ro tZ,RotZ);

Now function to move the objects!


if(strcmp(cmd, /objetosroyal, true) == 0)
{
if(IsPlayerConnected(playerid))
{
MoveObject(gatemove1,X,Y,Z,Velocidade); // gateopenpra1lado
MoveObject(gatemove2,X,Y,Z,Velocidade); //gateopenprooutro
}
return 1;
}
return 0;
if(strcmp(cmd, /fecharobjetosroyal, true) == 0)
{
if(IsPlayerConnected(playerid))
{
MoveObject(gatemove1,X,Y,Z,Velocidade); // Close^^
MoveObject(gatemove2,X,Y,Z,Velocidade); // Close^^
}
return 1;
}
return 0;

can also create a "SetTimer to automatically execute the function of the Close.
That is just a mess i'm sorry to say.
Before you do anything like this again, please read this:

https://sampforum.blast.hk/showthread.php?tid=65567
Reply


Messages In This Thread
Opening two gates At the same time - by [iPs]Bruno Tadeu - 06.03.2011, 11:13
Re: Opening two gates At the same time - by SkizzoTrick - 06.03.2011, 11:23
Re: Opening two gates At the same time - by Stigg - 06.03.2011, 11:31
Re: Opening two gates At the same time - by Mean - 06.03.2011, 17:32
Re: Opening two gates At the same time - by Max_Coldheart - 06.03.2011, 18:32

Forum Jump:


Users browsing this thread: 1 Guest(s)