Witam, ostatnimi czasy postanowi?em, ?e stworze wirtualny parking. Jednak?e napotykam problem, poniewa? nie ustawia mi element daty po usunieciu pojazdu.
B??d w DB:
[code]s.lua:38: Bad argument @ 'setElementData' [Expected element at argument 1, got nil][/code]
Jakie argumentu mam u?y??
Skrypt po stronie servera:
[lua]
markerstworz = createMarker(-1587.36121, 692.65399, -5.23441-0.9, "cylinder", 1, 0, 0, 0, 95)
function marker_gui(el,md)
triggerClientEvent(el, "GUIPP", resourceRoot)
end
addEventHandler( "onMarkerHit", markerstworz, marker_gui)
addEvent("K10", true)
addEventHandler("K10", root, function()
if getElementData(source, "przycisk1", true) then
outputChatBox("Pojazd ju? wyj?ty.")
else
setElementData(source, "przycisk1", true)
local veh = createVehicle(579,-1610.68, 682.25, -5.32, 360, 0, 90)
setVehicleColor(veh, 0, 0, 0)
setElementData(veh, "vehicle:police", true)
warpPlayerIntoVehicle(source, veh)
end
end)
function zmien(plr)
outputChatBox("zmieniles")
setElementData(plr, "przycisk1", false)
end
addCommandHandler("zmien", zmien)
function vehusun(he)
if getElementType(he) == "vehicle" then
gracz = getVehicleController(he)
elseif getElementType(he) == "player" then
gracz = he
...
?ci?gn??em sobie parking wirtualny z gtao, wgra?em go na serwer lecz nie dzia?a? by?em na s?u?bie sapd i nic ;/ a chcia?bym go przenie?? do sf komisariatu i zrobi? drugi do samc. Pomo?e kto??
Chcia? bym ci da? skrypt kt?ry by? pisany na Your New Experience . ale nie zosta? u?ywany to oddaje wam w r?ce wszytko jest zrobione pod ogrpg . Jest podobny do Emergency Stories ale nie jest taki sam nie chcia?em specjalnie takiego samego robi? ?atwo go przerobi? pod inne frakcje.Zakaz Zmiany Autora