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

Wysłany: 2015-07-05, 14:50


AteX







Wiek: 27
Na forum: 4157 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

Witam. Chcia?em doda? handling do radiowoz?w przez skrypt, lecz ca?y czas nie dzia?a. Nie wiem gdzie jest b??d, wed?ug wiki jest wszystko ok, a jednak nie dzia?a.
Prosi?bym o szybk? pomoc.

Kod:

local radiowozy = {
{596, 1585,-1667.574,5.6,0,0,270},
{596, 1585,-1671.574,5.6,0,0,270},
{596, 1602,-1684.01,5.6,0,0,90},
{596, 1602,-1688.01,5.6,0,0,90},
{596, 1602,-1692.01,5.6,0,0,90},
{596, 1602,-1696.01,5.6,0,0,90},
{596, 1602,-1700.01,5.6,0,0,90},
{596, 1602,-1704.01,5.6,0,0,90},
}

for i,v in ipairs(radiowozy) do
local radiowoz = createVehicle(v[1], v[2], v[3], v[4], v[5], v[6], v[7])
setElementFrozen(radiowoz, true)
setVehicleEngineState ( radiowoz, false )
setElementData(radiowoz, "paliwo", 100)
setElementData(radiowoz, "przebieg", 69)
setVehicleHandling(radiowoz, numberOfGears, 4)
setVehicleHandling(radiowoz, maxVelocity, 260)
setVehicleHandling(radiowoz, engineAcceleration, 15)
setVehicleHandling(radiowoz, engineInertia, 10)
setVehicleHandling(radiowoz, driveType, awd)
setVehicleHandling(radiowoz, steeringLock, 35)
setVehicleHandling(radiowoz, collisionDamageMultiplier, 0.24)
setVehicleHandling(radiowoz, mass, 4600)
setVehicleHandling(radiowoz, turnMass, 4500)
setVehicleHandling(radiowoz, dragCoeff, 2)
setVehicleHandling(radiowoz, centerOfMass, {0,0,0})
setVehicleHandling(radiowoz, percentSubmerged, 75)
setVehicleHandling(radiowoz, seatOffsetDistance, -0.1)
end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 14:59


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4979 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

db3?

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 15:14


AteX







Wiek: 27
Na forum: 4157 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"Iksdekowski" napisał/a:

db3?

Nic.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 15:20


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4979 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

A co dok?adnie chcesz ustawi? w tych pojazdach? Zamiast ustawia? all, ustaw to co tylko chcesz...

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 16:28


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

AteX, a ustawia przebieg '69' i paliwo '100'?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 19:57


AteX







Wiek: 27
Na forum: 4157 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"Iksdekowski" napisał/a:

A co dok?adnie chcesz ustawi? w tych pojazdach? Zamiast ustawia? all, ustaw to co tylko chcesz...

W?a?nie to co jest w skrypcie to to chce ustawi?, pr?bowa?em nawet ustawia? tylko pr?dko?? i dalej nie dzia?a?o.

"Maximerr" napisał/a:

AteX, a ustawia przebieg '69' i paliwo '100'?

Tak ustawia.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 20:16


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

local radiowozy = { 
{596, 1585,-1667.574,5.6,0,0,270}, 
{596, 1585,-1671.574,5.6,0,0,270}, 
{596, 1602,-1684.01,5.6,0,0,90}, 
{596, 1602,-1688.01,5.6,0,0,90}, 
{596, 1602,-1692.01,5.6,0,0,90}, 
{596, 1602,-1696.01,5.6,0,0,90}, 
{596, 1602,-1700.01,5.6,0,0,90}, 
{596, 1602,-1704.01,5.6,0,0,90}
} 

for _,v in ipairs(radiowozy) do 
    local radiowoz = createVehicle(v[1], v[2], v[3], v[4], v[5], v[6], v[7]) 
    setElementFrozen(radiowoz, true) 
    setVehicleEngineState ( radiowoz, false )
    setElementData(radiowoz, "paliwo", 100) 
    setElementData(radiowoz, "przebieg", 69) 
end

for _,v in pairs(getElementsByType("vehicle")) do
    if getElementModel(v) == 596 then  
        setVehicleHandling(v, numberOfGears, 4) 
        setVehicleHandling(v, maxVelocity, 260) 
        setVehicleHandling(v, engineAcceleration, 15) 
        setVehicleHandling(v, engineInertia, 10) 
        setVehicleHandling(v, driveType, awd) 
        setVehicleHandling(v, steeringLock, 35) 
        setVehicleHandling(v, collisionDamageMultiplier, 0.24) 
        setVehicleHandling(v, mass, 4600) 
        setVehicleHandling(v, turnMass, 4500) 
        setVehicleHandling(v, dragCoeff, 2) 
        setVehicleHandling(v, centerOfMass, {0,0,0}) 
        setVehicleHandling(v, percentSubmerged, 75) 
        setVehicleHandling(v, seatOffsetDistance, -0.1)
    end
end

Testuj. :->

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 21:18


AteX







Wiek: 27
Na forum: 4157 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"Maximerr" napisał/a:

local radiowozy = { 
{596, 1585,-1667.574,5.6,0,0,270}, 
{596, 1585,-1671.574,5.6,0,0,270}, 
{596, 1602,-1684.01,5.6,0,0,90}, 
{596, 1602,-1688.01,5.6,0,0,90}, 
{596, 1602,-1692.01,5.6,0,0,90}, 
{596, 1602,-1696.01,5.6,0,0,90}, 
{596, 1602,-1700.01,5.6,0,0,90}, 
{596, 1602,-1704.01,5.6,0,0,90}
} 

for _,v in ipairs(radiowozy) do 
    local radiowoz = createVehicle(v[1], v[2], v[3], v[4], v[5], v[6], v[7]) 
    setElementFrozen(radiowoz, true) 
    setVehicleEngineState ( radiowoz, false )
    setElementData(radiowoz, "paliwo", 100) 
    setElementData(radiowoz, "przebieg", 69) 
end

for _,v in pairs(getElementsByType("vehicle")) do
    if getElementModel(v) == 596 then  
        setVehicleHandling(v, numberOfGears, 4) 
        setVehicleHandling(v, maxVelocity, 260) 
        setVehicleHandling(v, engineAcceleration, 15) 
        setVehicleHandling(v, engineInertia, 10) 
        setVehicleHandling(v, driveType, awd) 
        setVehicleHandling(v, steeringLock, 35) 
        setVehicleHandling(v, collisionDamageMultiplier, 0.24) 
        setVehicleHandling(v, mass, 4600) 
        setVehicleHandling(v, turnMass, 4500) 
        setVehicleHandling(v, dragCoeff, 2) 
        setVehicleHandling(v, centerOfMass, {0,0,0}) 
        setVehicleHandling(v, percentSubmerged, 75) 
        setVehicleHandling(v, seatOffsetDistance, -0.1)
    end
end

Testuj. :->


Nie dzia?a :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 23:13


Tostuch







Wiek: 28
Na forum: 5072 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

centerOfMass, mass etc musz? by? w cudzys?owach.

setVehicleHandling(v, "seatOffsetDistance", -0.1)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-05, 23:32


AteX







Wiek: 27
Na forum: 4157 dni
Posty: 925
Nick w MP: #AteX

Piwa: 8366

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"Tostuch" napisał/a:

centerOfMass, mass etc musz? by? w cudzys?owach.

setVehicleHandling(v, "seatOffsetDistance", -0.1)


OMG, thx. Taki ma?y b??d, a tyle problemu.

Postaw piwo autorowi tego posta
 

 
Tagi: handling :: pojazdów :: nie :: działa.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA 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