Witam
Mam problem zwi?zany z funkcj? getVehicleTowedByVehicle.
[lua]
function system(hitElement)
local vehicle = getPedOccupiedVehicle(hitElement)
if destmarker then
if vehicle then
if rozl_licznik == 0 then
playerPoints = getElementData(hitElement, "Pkt")
local trucks_ids = trucks[getElementModel(vehicle)]
local trailers_ids = trailers[getElementModel(vehicle)]
if vehicle_ids[getElementModel(vehicle)] or getVehicleTowedByVehicle( trucks_ids ) == trailers_ids then
local jobstat = getElementData(vehicle, "praca2")
if jobstat == false then
guiSetVisible(oknotoww, true)
showCursor(true)
for k, v in ipairs ( towary ) do
guiSetEnabled ( kupuj [ k ], ( playerPoints >= v [ 3 ] ) )
end
else
rozladunek()
end
else
outputChatBox("To nie jest pojazd dostawczy!", hitElement, 0, 255, 0)
end
else
outputChatBox("Jeszcze nie mo?esz za?adowa?/roz?adowa? towaru!", hitElement)
end
else
outputChatBox("Aby za?adowa?/roz?adowa? towar musisz mie? pojazd!", hitElement, 0, 255, 0)
end
end
end
addEventHandler( "onClientMarkerHit", resourceRoot, system )
[/lua]
[ Dodano : 2012-10-29, 16:08 ]
[lua]
local vehicle_ids = {
[524] = true, -- Cement Truck
[578] = true, -- DFT-30
[414] = true, -- Mule
[440] = true, -- Rumpo
... |