Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2019-03-29, 22:33


ADISEQ

Uczeń Lua






Wiek: 21
Na forum: 2811 dni
Posty: 130
Nick w MP: ADISEQ

Piwa: 18

Respekt: 50

Siemanko. Jak zrobi? system latania dla admina, czyli takie co?, ?e wpisujesz koemnde i latasz? Za pomoc leci piwo

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-30, 21:55


Mezo.

Mod-Team






Wiek: 24
Na forum: 3211 dni
Posty: 548
Nick w MP: Mezo

Piwa: 6070

Respekt: 517
Respekt: 517

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-31, 15:36


ADISEQ

Uczeń Lua






Wiek: 21
Na forum: 2811 dni
Posty: 130
Nick w MP: ADISEQ

Piwa: 18

Respekt: 50

Magneticy, Mo?na w tem lata? samochodami? I czy mo?na przez ?ciany przenika?. Chodzi o takie co? z przenikaniem itd.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-31, 15:41


Mezo.

Mod-Team






Wiek: 24
Na forum: 3211 dni
Posty: 548
Nick w MP: Mezo

Piwa: 6070

Respekt: 517
Respekt: 517

Wiesz co o ile si? nie myle to tutaj tylko i wy??cznie latanie postaci? po wpisaniu komendy /superman.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-03-31, 16:03


ADISEQ

Uczeń Lua






Wiek: 21
Na forum: 2811 dni
Posty: 130
Nick w MP: ADISEQ

Piwa: 18

Respekt: 50

Magneticy, wiem jak si? nazywa co chcia?em zrobi?. Air break albo development mode pod w s a d

Postaw piwo autorowi tego posta
 

 
Wysłany: 2019-09-05, 15:36


RudyTMM
[Usunięty]









w ogrpg jest ale b?de mi?y i ci podam kod [lua]=======Server========

setElementData(source,"Ryjek",true)

=======Client=======


local sx, sy = guiGetScreenSize()

function putPlayerInPosition(timeslice)
local cx,cy,cz,ctx,cty,ctz = getCameraMatrix()
ctx,cty = ctx-cx,cty-cy
timeslice = timeslice*0.1
local tx, ty, tz = getWorldFromScreenPosition(sx / 2, sy / 2, 10)
if isChatBoxInputActive() or isConsoleActive() or isMainMenuActive () or isTransferBoxActive () then return end
if getKeyState("lctrl") then timeslice = timeslice*4 end
if getKeyState("lalt") then timeslice = timeslice*0.25 end
local mult = timeslice/math.sqrt(ctx*ctx+cty*cty)
ctx,cty = ctx*mult,cty*mult
if getKeyState("2") then abx,aby = abx+ctx,aby+cty end
if getKeyState("w") then abx,aby = abx+ctx,aby+cty end
if getKeyState("s") then abx,aby = abx-ctx,aby-cty end
if getKeyState("a") then abx,aby = abx-cty,aby+ctx end
if getKeyState("d") then abx,aby = abx+cty,aby-ctx end
if getKeyState("space") then abz = abz+timeslice end
if getKeyState("lshift") then abz = abz-timeslice end
local x,y = 100,200
dxDrawText ("Pozycja: "..abx..", "..aby.." ,"..abz, x, y )


if isPedInVehicle ( getLocalPlayer( ) ) then
local vehicle = getPedOccupiedVehicle( getLocalPlayer( ) )
local angle = getPedCameraRotation(getLocalPlayer ( ))
setElementPosition(vehicle,abx,aby,abz)
setElementRotation(vehicle,0,0,-angle)
else
local angle = getPedCameraRotation(getLocalPlayer ( ))
setElementRotation(getLocalPlayer ( ),0,0,angle)
setElementPosition(getLocalPlayer ( ),abx,aby,abz)
end
end
function toggleAirBrakec()
if getElementData(localPlayer,"Ryjek") then toggleAirBrake() return end
if (not getElementData(localPlayer,"player:level")) then return end
local levele = getElementData(localPlayer,"player:level")
if levele then
if type(levele) == "number" then
if levele < 2 then
outputChatBox("* Nie posiadasz uprawnie?.", 255, 0, 0)
return end
elseif type(levele) == "table" then
if levele[1] < 2 then
outputChatBox("* Nie posiadasz uprawnie?.", 255, 0, 0)
return end
end
toggleAirBrake()
end
end

function toggleAirBrake()
air_brake = not air_brake or nil
if air_brake then

if isPedInVehicle ( getLocalPlayer( ) ) then
local vehicle = getPedOccupiedVehicle( getLocalPlayer( ) )
abx,aby,abz = getElementPosition(vehicle)
Speed,AlingSpeedX,AlingSpeedY = 0,1,1
OldX,OldY,OldZ = 0
setElementCollisionsEnabled ( vehicle, false )
setElementFrozen(vehicle,true)
setElementAlpha(getLocalPlayer(),0)
addEventHandler("onClientPreRender",root,putPlayerInPosition)
else
abx,aby,abz = getElementPosition(localPlayer)
Speed,AlingSpeedX,AlingSpeedY = 0,1,1
OldX,OldY,OldZ = 0
setElementCollisionsEnabled ( localPlayer, false )
addEventHandler("onClientPreRender",root,putPlayerInPosition)
end


else
if isPedInVehicle ( getLocalPlayer( ) ) then
local vehicle = getPedOccupiedVehicle( getLocalPlayer( ) )
abx,aby,abz = nil
setElementFrozen(vehicle,false)
setElementCollisionsEnabled ( vehicle, true )
setElementAlpha(getLocalPlayer(),255)
removeEventHandler("onClientPreRender",root,putPlayerInPosition)
else
abx,aby,abz = nil
setElementCollisionsEnabled ( localPlayer, true )
removeEventHandler("onClientPreRender",root,putPlayerInPosition)
end
end
end
bindKey("0","down",toggleAirBrakec)
bindKey("num_0","down",toggleAirBrakec)
[/lua]

 

 
Tagi: system :: latania
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » System latania Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku