[TUT]Pokretna kapija

Započeo berroni.pwn, Avgust 25, 2016, 20:13:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.




       
  • Naziv tutorijala
Pokretna kapija
  • Detaljan opis tutorijala

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


new Gate;//This will create your object/gate name     <-- To piÅ¡emo na pocetku skripteGate = CreateObject(2587, X, Y, Z, Xr, Yr, Zr); <-- Definiramo kapiju
Citat2587 ---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;




Trebo si malo bolje objasniti ali dobro je :D :D
CitatElectric Power is everywhere present in unlimited quantities and can drive the world's machinery without the need of coal, oil, gas, or any other of the common fuels!



Mogao si malo bolje da objasnis ,vamo pise objasnjenje na engleskom da si to bar preveo bilo bi okej  :)


dobro je :D

Nova Kuca Community - Founder , Owner

Odlicno  :D
• G A M E M O D E •
• F I L T E R S C R I P T •
• T U T O R I A L •


Citat
You are what you believe yoursefl to be.