Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.
GTAONLINE.PL
Tematy otagowane jako: rotację
1. Jak zrobić rotację objektu?
Siema, mam pytanie jak zrobi? ?eby objekt si? kr?ci? ze sta?? pr?dko?ci??
2. [LUA] Nie mogę ustawić rotację noszy!
A jak ustawi? rotacj? bo jest ustawione g?r? do do?u?
Dzi?kuj? dzia?a Wilq ten client

Dodano: 2020-04-07, 15:45
Mam taki o to skrypt na nosze:

c.lua

-- USEFUL FUNCTION
function isEventHandlerAdded( sEventName, pElementAttachedTo, func )
if
type( sEventName ) == 'string' and
isElement( pElementAttachedTo ) and
type( func ) == 'function'
then
local aAttachedFunctions = getEventHandlers( sEventName, pElementAttachedTo )
if type( aAttachedFunctions ) == 'table' and #aAttachedFunctions > 0 then
for i, v in ipairs( aAttachedFunctions ) do
if v == func then
return true
end
end
end
end

return false
end
--


local data = {object = nil, player = nil}

function deleteRotation()
if isEventHandlerAdded( 'onClientPreRender', root, changeRotation ) then
removeEventHandler( 'onClientPreRender', root, changeRotation )
end
end
addEvent("iyw_samd_stretcher:deleteRotation", true)
addEventHandler("iyw_samd_stretcher:deleteRotation", root, deleteRotation)

function changeRotation()
if not data.player then deleteRotation() end
if not data.object then deleteRotation() end
local rotation = {getElementRotation(data.object)}
data.player.rotation = Vector3(rotation[1], rotation[2], rotation[3]+90)
end



addEvent("iyw_samd_stretcher:rotation", true)
addEventHandler("iyw_samd_stretcher:rotation", root, function(player, object)
data.object = object
data.player = player
addEventHandler("onClientPreRende...
3. Nie wiem jak tutaj dodać rotację pojazdu
Siemanko tak jak w temacie nie wiem jak doda? rotacje pojazdem
[lua]createBlip(-1959.59, 285.91, 35.47, 55,2,0,0,0,0,0,275) --- sf doherty zwykly
createBlip(-1641.25, 1203.88, 7.25, 55,2,0,0,0,0,0,275) --- sf downtown sportowy
createBlip(1880.92, -1863.27, 13.58, 55,2,0,0,0,0,0,275) --- cygan

local vehicles = {}
local komis_shapes = {}
local slots = {

{-1953.35, 306.55, 40.64, 537.4, 0.0, 179.6, model=521, dmax=0, dmin=0, price=(25000000), gdzie="sf"}, -- FCR 900
{-1956.45, 306.28, 40.64, 537.4, 0.0, 179.8, model=581, dmax=0, dmin=0, price=(23000000), gdzie="sf"}, -- BF
{-1952.58, 300.26, 40.59, 89.1, 0.0, 91.0, model=463, dmax=0, dmin=0, price=(4000000), gdzie="sf"}, -- Freeway
{-1952.72, 295.79, 40.59, 89.1, 0.0, 88.4, model=471, dmax=0, dmin=0, price=(5000000), gdzie="sf"}, -- QuadBike
{-1952.91, 291.28, 40.59, 89.1, 0.0, 91.0, model=461, dmax=0, dmin=0, price=(3200000), gdzie="sf"}, -- PCJ

-- Salon LV Sportowy
{-1662.96, 1221.65, 13.26, 230, 0, 0, model=415, dmax=0, dmin=0, price=(79000000), gdzie="dohertysf2"}, -- cheetah
{-1649.00, 1207.89, 13.34,65, 0.0, 0.0, model=560, dmax=0, dmin=0, price=(45500000), gdzie="dohertysf2"}, -- Sultan
{-1649.99, 1207.60, 20.78,65, 0.0, 0.0, model=541, dmax=0, dmin=0, price=(83200000), gdzie="dohertysf2"}, -- hto
{-1663.46, 1221.50, 20.86,230, 0.0, 0.0, model=451, dmax=0, dmin=0,price=(80200000), gdzie="dohertysf2"...
4. Rotacje bramy
Cze??,
Napisa?em kod na bram? na komend?, jednak nie wiem co mam zrobi? - gdzie to wpisa?, ?ebym m?g? zapisa? rotacj? bramy, co z tego, ?e na editorze ustawi? sobie bram? jak chc?, je?eli w kodzie nie zapisuje si? rotacja?

KOD:


brama = createObject ( 3036, -2179.3999023438, 661.20001220703, 50.200000762939)

function zmk()

moveObject (brama, 3036, -2179.3999023438, 661.20001220703, 50.200000762939 )
end
addCommandHandler("zmk", zmk)

function otw()
moveObject (brama, 3036, -2184.5, 661.20001220703, 50.200000762939 )
end
addCommandHandler("otw", otw )

Prosz? o pomoc, stawiam piwka ;) .