Search the Community
Showing results for tags 'gate'.
Found 4 results
local gate = createObject (10558, 1588.6999511719, -1638.5, 14.39999961853, 0, 0, 270); function handleGate(player) gX, gY, gZ = getElementPosition(gate); if ( (gX >= 1588.6999511719) and (gY >= -1638.5) and (gZ >= 14.39999961853) ) then -- HA a kapu csukva van moveObject(gate, 5000, 1588.6999511719, -1638.5, 10, 0, 0, 0); elseif ( (gX >= 1588.6999511718) and (gY >= -1638.5) and (gZ <= 10.00002) ) then moveObject(gate, 5000, 1588.6999511719, -1638.5, 14.39999961853, 0, 0, 0); end end addCommandHandler("gate", handleGate, false, false);
Hi guys we all know how to make gates and open them with commands or colshape hit etc.. I just replaced same trick with panel I added 2 buttons open the gate & close the gate !this will be help full for team base ,houses or any restricts area ! Hope you like it watch the video from here https://youtu.be/_VjlhdCV-74
Hi, i've try this script in serverside and clientside is does'nt work. This is the original script: local gate = createObject ( ObjID, Pos_X, Pos_Y, Pos_Z, Rot_X, Rot_Y, Rot_Z ) local state =0--this is the state, if 0 gate closed if 1 it's open function move() if state ==0then--it's closed so open it moveObject ( gate, Time, New_X, New_Y, New_Z)--Time means how fast the object'ill be moved. state = state +1 elseif state ==1then--it's open so close it moveObject ( gate, Time,Old_X, Old_Y, Old_Z) state = state -1 end end addCommandHandler("gate", move )--this one creates a command "/gate" wich'll start the move function The gate object doesnt spawned, i dont know why, i'm newbie in lua scripting. Please guys help me on fixing. Thanks.