|
Wysłany: 2019-11-22, 01:06
|
|
Frixen


Wiek: 28 Na forum: 2851 dni Posty: 61
Nick w MP: Frixenek
Piwa: 1040
|
|
|
|
Nie dzia?a handling aut mam wszystko ustawione i nie dzia?a kto pomo?e piwko/respekt daje
|
|
|
|
|
|
|
Wysłany: 2019-11-22, 10:40
|
|
Wilq


Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa: 739
|
|
|
|
|
|
|
Wysłany: 2019-11-23, 09:45
|
|
Frixen


Wiek: 28 Na forum: 2851 dni Posty: 61
Nick w MP: Frixenek
Piwa: 1040
|
|
|
|
--[[addEventHandler("onVehicleEnter", resourceRoot, function(plr,seat,jacked)
veh = getPedOccupiedVehicle(plr)
if getVehicleName(veh) == "579" then
local fast = getVehicleHandlingProperty(veh,"engineAcceleration")
local maxfast = getVehicleHandlingProperty(veh,"maxVelocity")
local masa = getVehicleHandlingProperty(veh,"mass")
local masa2 = getVehicleHandlingProperty(veh,"turnMass")
local xd = getVehicleHandlingProperty(veh,"tractionMultiplier")
local coef = getVehicleHandlingProperty(veh,"dragCoeff")
setVehicleHandling(veh,"engineAcceleration",fast+1300)
setVehicleHandling(veh, "maxVelocity",maxfast+10300)
end
end)]]--
[ Dodano: 2019-11-23, 09:45 ]
a sk?d wzi??? ten b??d db3
[ Dodano: 2019-11-23, 10:02 ]
nie ma zadnego b??du
|
|
|
|
|
|
|
Wysłany: 2019-11-23, 10:39
|
|
Wilq


Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa: 739
|
|
|
|
Kod nie b?dzie dzia?a? bo jest zakomentowany (https://docs.coronalabs.com/guide/start/introLua/index.html).
BTW. Nie musisz tam pobiera? oddzielnie pojazdu, w kt?rym siedzi kierowca, poniewa? ten pojazd jest domy?lnie definiowany jako ?r?d?o eventu - 'source'. I w?asnie 'source' mo?esz u?y? zamiast 'veh'.
No i kod nie b?dzie dzia?a? dlatego, ?e pobierasz nazw? pojazdu i por?wnujesz j? z modelem pojazdu.
Zamiast
u?yj
i usu? te cudzys?owia (getElementModel zwraca liczb?, nie tekst).
|
|
|
|
|
|
|
Wysłany: 2019-11-25, 00:03
|
|
Frixen


Wiek: 28 Na forum: 2851 dni Posty: 61
Nick w MP: Frixenek
Piwa: 1040
|
|
|
|
Nie dzia?a o tak nie ma ?adnego erroru auto nie je?dzi np ustawi?em +100 I rozpedzanie 500 o tak nie dzia?a
|
|
|
|
|
|
|
Wysłany: 2019-11-25, 00:43
|
|
USUNIETY [Usunięty]
|
|
|
|
[lua]function getVehicleHandlingProperty(element, property)
if isElement(element) and getElementType(element) == "vehicle" and type(property) == "string" then -- Make sure there's a valid vehicle and a property string
local handlingTable = getVehicleHandling(element) -- Get the handling as table and save as handlingTable
local value = handlingTable[property] -- Get the value from the table
if value then -- If there's a value (valid property)
return value -- Return it
end
end
return false -- Not an element, not a vehicle or no valid property string. Return failure
end
addEventHandler("onVehicleEnter", getRootElement(), function(plr,seat,jacked)
if getElementModel(source) == 549 then
local fast = getVehicleHandlingProperty(source,"engineAcceleration")
local maxfast = getVehicleHandlingProperty(source,"maxVelocity")
local masa = getVehicleHandlingProperty(source,"mass")
local masa2 = getVehicleHandlingProperty(source,"turnMass")
local xd = getVehicleHandlingProperty(source,"tractionMultiplier")
local coef = getVehicleHandlingProperty(source,"dragCoeff")
setVehicleHandling(source,"engineAcceleration",fast+1300)
setVehicleHandling(source, "maxVelocity",maxfast+10300)
end
end)[/lua]
|
|
|
|
|
|
| Tagi: handlingi :: nie :: dziala |
Anonymous


Na forum: 245 dni
Posty: 1

|
Anonymous Koniecznie zajrzyj na:
|
|
|
|