Witam, mam problem ze skryptem. Mianowicie chodzi o to, ?e nie dostaj? kasy za wjazd do markera.
W pracy chodzi o to, ?e je?d?? autobusem do marker?w i od ka?dego markera powinienem dostawa? hajs. Jednak tak si? nie dzieje. Pomo?e kto??
Oto kody:
-server
[lua]
local m1 = createMarker( 2122.25,2517.02,9.52, "cylinder", 2.0, 255, 0, 0)
vehs = {}
function removePreviousVehicles(plr)
for i,v in ipairs(getElementsByType("vehicle", resourceRoot)) do
local sby = getElementData(v, "zrespilGracz")
if sby and sby == plr and getPedOccupiedVehicle(plr) ~= v then
destroyElement(v)
end
end
end
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("Praca w trakcie poprawek.", el)
return
end
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end
local x,y,z = getElementPosition(el)
local Coach = createVehicle(437, 2143.47,2489.64,10.97,0.0,360.0,91.2)
setElementData(Coach, "zrespilGracz", el)
setElementData(Coach, "pojazd_paliwo", 50)
setElementData(Coach, "pojazd_przebieg", 1000)
setElementData(Coach, "pojazd_opis", "Las Venturas - Las Venturas")
warpPedIntoVehicle(el,Coach)
removePreviousVehicles(el)
triggerClie... |