addEventHandler ( "onElementClicked", root,
function ( mouseButton )
local car = getPedOccupiedVehicle (getLocalPlayer())
local elementType = getElementType ( source )
if ( elementType == "vehicle" ) then
if ( mouseButton == "left" ) then -- niszczenie
destroyElement (car)
elseif ( mouseButton == "right" ) then -- naprawa
fixVehicle(car)
setElementHealth(car, 1000)
end
elseif ( elementType == "player" ) then
end
end
end
)
Po co sie powtarza funkcja do naprawiania? Teraz powinno dzialac.
addEventHandler ( "onElementClicked", root,
function ( mouseButton )
local car = getPedOccupiedVehicle (getLocalPlayer())
local elementType = getElementType ( source )
if ( elementType == "vehicle" ) then
if ( mouseButton == "left" ) then -- niszczenie
destroyElement (car)
elseif ( mouseButton == "right" ) then -- naprawa
fixVehicle(car)
setElementHealth(car, 1000)
end
elseif ( elementType == "player" ) then
end
end
end
end
)
addEventHandler ( "onElementClicked", root,
function ( mouseButton )
local car = getPedOccupiedVehicle (getLocalPlayer())
local elementType = getElementType ( source )
if ( elementType == "vehicle" ) then
if ( mouseButton == "left" ) then -- niszczenie
destroyElement (car)
elseif ( mouseButton == "right" ) then -- naprawa
fixVehicle(car)
setElementHealth(car, 1000)
end
elseif ( elementType == "player" ) then
end
end
end
end
)
Sprobuj teraz, a jak nie to tak:
addEventHandler ( "onElementClicked", root,
function ( mouseButton )
local car = getPedOccupiedVehicle (getLocalPlayer())
local elementType = getElementType ( source )
if ( elementType == "vehicle" ) then
if ( mouseButton == "left" ) then -- niszczenie
destroyElement (car)
elseif ( mouseButton == "right" ) then -- naprawa
fixVehicle(car)
setElementHealth(car, 1000)
end
elseif ( elementType == "player" ) then
end
end
)
addEventHandler ( "onElementClicked", root,
function ( mouseButton )
local car = getPedOccupiedVehicle (getLocalPlayer(source))
local elementType = getElementType ( source )
if ( elementType == "vehicle" ) then
if ( mouseButton == "left" ) then -- niszczenie
destroyElement (car)
elseif ( mouseButton == "right" ) then -- naprawa
fixVehicle(car)
setElementHealth(car, 1000)
end
elseif ( elementType == "player" ) then
end
end
)
Ten sam error.. a by?aby mo?liwo?? dajmy na to ?eby strzelenie w samoch?d zapisywa?o jako? jego warto?? ( mam pod serwerem system aut z baz? sql ) i za pomoc? komendy /fix idpojazdu lub /destroy idpojazdu naprawia?o lub niszczy?o wybrany pojazd ? z g?ry dzi?kuje za pomoc
[ Dodano: 2015-09-30, 18:37 ]
Fanciak wielkie dzi?ki za pomoc
DestroY twoje wskaz?wki by?y bardzo pomocne ^^
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