Wysłany: 2019-07-26, 13:01
AsterBonzo
Otwórz ogień
Wiek: 20 Na forum: 2968 dni Posty: 187
Nick w MP: Hirahi
Piwa : 60
Witam pr?buje zmieni? hadnling pojazd?w o danym id modelu czyli 402
pr?bowa?em co? takiego:
if getElementModel ( veh ) == 402 then
local acceleration = getVehicleHandling ( veh ). engineAcceleration
local velocity = getVehicleHandling ( veh ). maxVelocity
setVehicleHandling ( veh , "engineAcceleration" , nil )
setVehicleHandling ( veh , "maxVelocity" , nil )
setVehicleHandling ( veh , "engineAcceleration" , acceleration + 4.0 )
setVehicleHandling ( veh , "maxVelocity" , velocity + 75 )
end
ale nie dzia?a nie wiem jak to zrobi? :C prosze o jak najszybsz? pomoc. Daje piwo
Wysłany: 2019-07-26, 13:44
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
W jaki spos?b wykonujesz ten warunek?
W evencie? Wklejaj ca?y kod, nie b?dziemy si? domy?la?.
Zmienna pojazdu jest odpowiednio zdefiniowana? Tego te? nie wiemy.
No i czy wyst?puj? jakie? b??dy DB3.
Wysłany: 2019-07-26, 16:50
AsterBonzo
Otwórz ogień
Wiek: 20 Na forum: 2968 dni Posty: 187
Nick w MP: Hirahi
Piwa : 60
local veh = getPedOccupiedVehicle ( localPlayer ) mam jeszcze to nic wi?cej
Wysłany: 2019-07-26, 17:23
Query
SyndicateMTA
Wiek: 24 Na forum: 3071 dni Posty: 319
Nick w MP: Query
Piwa : 5257
dodaj event
addEventHandler ( 'onClientVehicleEnter' , root ,function()
local veh = getPedOccupiedVehicle ( localPlayer )
if getElementModel ( veh ) == 402 then
local acceleration = getVehicleHandling ( veh ). engineAcceleration
local velocity = getVehicleHandling ( veh ). maxVelocity
setVehicleHandling ( veh , "engineAcceleration" , nil )
setVehicleHandling ( veh , "maxVelocity" , nil )
setVehicleHandling ( veh , "engineAcceleration" , acceleration + 4.0 )
setVehicleHandling ( veh , "maxVelocity" , velocity + 75 )
end
end )
Wysłany: 2019-07-26, 21:34
Wilq
Wiek: 24 Na forum: 4428 dni Posty: 3410
Piwa : 739
Masz tutaj poprawiony kod:
addEventHandler ( "onClientVehicleEnter" , getRootElement (), function()
if getElementModel ( source ) == 402 then
local acceleration = getVehicleHandling ( source ). engineAcceleration
local velocity = getVehicleHandling ( source ). maxVelocity
setVehicleHandling ( source , "engineAcceleration" , nil )
setVehicleHandling ( source , "maxVelocity" , nil )
setVehicleHandling ( source , "engineAcceleration" , acceleration + 4.0 )
setVehicleHandling ( source , "maxVelocity" , velocity + 75 )
end
end )
Tagi: custom :: handling
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: