[TUT]Pokretna kapija

Započeo berroni.pwn
25. Avg. 2016. Zaključano
2,814
pregleda
7
postova
berroni
5
Kingpin
25. Avg. 2016.

  • Naziv tutorijala

Pokretna kapija
  • Detaljan opis tutorijala

 
Tutorial nije moj, samo sam ga preveo jer mislim da ce pomoci mnogima 😄

new Gate;//This will create your object/gate name    <-- To piÅ¡emo na pocetku skripte
Gate = CreateObject(2587, X, Y, Z, Xr, Yr, Zr); <-- Definiramo kapiju 
Quote
2587 ---ID of the Object
2001.195679 ----X Position
1547.113892 ----Y Position
14.283400 ----Z Position
0.0, 0.0, 96.0 ---- X,Y,Z Rotations of the object


X,Y,Z POZICIJU MOZEMO PRONACI LAKO -

/save


Sada pravimo da se kapija mice.

Ovo pisemo iza OnPlayerCommandText:

public OnPlayerCommandText(playerid, cmdtext[])
{
      if (strcmp("/pgate", cmdtext, true, 10) == 0)
        {
          MoveObject(Gate,X, Y, Z+/-3,0.97);//This will move the gate
            }
        return 1;
      }
      if (strcmp("/pgateclose", cmdtext, true, 10) == 0)
        {
          MoveObject(Gate,X, Y, Z,3,0.97);//This will move the gate back to the old position
            }
        return 1;
      }

return 1;
}


Vaše komande ce pomicati kapiju gore/dole !

To je bio jednostavni sistem pokretne kapije. Ako zelite sistem automatskog otvaranja -

public OnPlayerCommandText(...)
{
      if (strcmp("/pgate", cmdtext, true, 10) == 0)
        {
          MoveObject(Gate,X, Y, Z+/-3,0.97);//This will move the gate
            SendClientMessage(playerid,COLOR_BLUE,"You have opened the gate,it will be closed in 7 seconds!");//This will send an message announcing the gate Stats!
            SetTimer("GateClose", 7000, 0);//This will start the counting till the gate will be closed!
            }
        return 1;
      }

return 1;
}

forward GateClose(playerid)//This will forward the closing gate function
public GateClose(playerid)//This will define the closing gate function
{
      MoveObject(Gate,X, Y, Z-/+3,0.97);//This will move the gate
      PlayerPlaySound(playerid, 1153, x,y,z);// This will play the gate sound near the gate
      return 1;


AndroCorleone
5
OG Legend
25. Avg. 2016.
Odlicno, posluzit ce nekom. 🙂
Boki Boki
6
OG Legend
25. Avg. 2016.
Trebo si malo bolje objasniti ali dobro je 😄 😄
Wucha
5
Underboss
26. Avg. 2016.
Mogao si malo bolje da objasnis ,vamo pise objasnjenje na engleskom da si to bar preveo bilo bi okej  🙂
Muma Rascall
6
Forum Don
🔥3
26. Avg. 2016.
LoOdaK wrote on August 25, 2016, 6:18 pm:
Trebo si malo bolje objasniti ali dobro je 😄 😄
amersoftic
5
Kingpin
18. Sep. 2016.
dobro je 😄
eSADâ„¢
5
Kingpin
18. Sep. 2016.
Odlicno  😄

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha