06.03.2011, 11:31
Quote:
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. |
Before you do anything like this again, please read this:
https://sampforum.blast.hk/showthread.php?tid=65567