Opening two gates At the same time -
[iPs]Bruno Tadeu - 06.03.2011
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.
Re: Opening two gates At the same time -
SkizzoTrick - 06.03.2011
There are lots of these tutorials on the forums.
And this one is useless because everyone who knows how to create a Moving Object,knows how to create 2 Moving Objects.
Have a break,have a kitkat
Re: Opening two gates At the same time -
Stigg - 06.03.2011
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
Re: Opening two gates At the same time -
Mean - 06.03.2011
To be honest, this is not even a tutorial...
Re: Opening two gates At the same time - Max_Coldheart - 06.03.2011
and use [ pawn ] & [ /pawn ]