To powinno ju? lata? elegancko, za bardzo nie mam jak sprawdzi?, bo obecnie serwer sw?j mam zaj?ty, wi?c w razie czego znowu si? odezwij z db3 je?eli by takowe by?y
local marker=createMarker(-786.56622314453, 2598.9174804688, 42.2, "cylinder", 2, 100, 50, 0)
createBlipAttachedTo(marker, 52)
local miejsca = {
{-779.53106689453, 2612.2758789063, 42.2},
{-797.48028564453, 2597.2670898438, 42.2},
{-808.39337158203, 2578.6352539063, 42.2},
{-805.50292296875, 2604.7019042969, 42.2},
{-810.70001220703, 2619.5795898438, 42.2},
{-802.69610595703, 2633.0249023438, 42.2},
{-777.80157470703, 2593.8295898438, 42.2},
{-794.98712158203, 2621.2885742188, 42.2},
}
addEventHandler("onClientMarkerHit", marker, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox("Aby rozpocz?? prac? wci?nij E")
end)
bindKey("E", "down", function()
if not isElementWithinMarker(localPlayer, marker) then return end
if not getElementData(localPlayer, "gracz_praca") then
local losuj = math.random(2, #miejsca)
setElementData(localPlayer, "gracz_praca", true)
outputChatBox("Id? do wybranego miejsca i wykop kamie?.")
dojsciem = createMarker(miejsca[losuj][1], miejsca[losuj][2], miejsca[losuj][3], "cylinder", 1, 100, 50, 0)
setElementData(dojsciem,"marker_dojsciem",true)
dojscieb = createBlipAttachedTo(dojsciem, 12)
else
outputChatBox("ju? pracujesz")
end
end)
addEventHandler("onClientMarkerHit", getRootElement(), function(el, md)
if not md or getElementType(el) ~= "player" then return end
if not getElementData(source,"marker_dojsciem") == true then return end
if el ~= localPlayer then return end
destroyElement(dojsciem)
destroyElement(dojscieb)
setElementFrozen(localPlayer, true)
setPedAnimation ( localPlayer, "BASEBALL", "BAT_4", 1,true )
outputChatBox("Kopiesz kamie?. ")
setTimer(function()
setElementFrozen(localPlayer, false)
setPedAnimation(localPlayer, false)
outputChatBox("Wykopa?e? kamie?, wro? do miejsca zlecenia.")
setElementData(localPlayer, "gracz_praca", false)
triggerServerEvent("givePlayerMoney", localPlayer, 350)
end, 3000, 1)
end)
Nie dziala . Gdy wchodze w marker i klikam E to wyskakuje "juz pracujesz".
local marker=createMarker(-786.56622314453, 2598.9174804688, 42.2, "cylinder", 2, 100, 50, 0)
createBlipAttachedTo(marker, 52)
local miejsca = {
{-779.53106689453, 2612.2758789063, 42.2},
{-797.48028564453, 2597.2670898438, 42.2},
{-808.39337158203, 2578.6352539063, 42.2},
{-805.50292296875, 2604.7019042969, 42.2},
{-810.70001220703, 2619.5795898438, 42.2},
{-802.69610595703, 2633.0249023438, 42.2},
{-777.80157470703, 2593.8295898438, 42.2},
{-794.98712158203, 2621.2885742188, 42.2},
}
addEventHandler("onClientMarkerHit", marker, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox("Aby rozpocz?? prac? wci?nij E")
end)
bindKey("E", "down", function()
if not isElementWithinMarker(localPlayer, marker) then return end
if getElementData(localPlayer, "gracz_praca") == "true" then return outputChatBox("ju? pracujesz") end
local losuj = math.random(2, #miejsca)
setElementData(localPlayer, "gracz_praca", true)
outputChatBox("Id? do wybranego miejsca i wykop kamie?.")
dojsciem = createMarker(miejsca[losuj][1], miejsca[losuj][2], miejsca[losuj][3], "cylinder", 1, 100, 50, 0)
setElementData(dojsciem,"marker_dojsciem",true)
dojscieb = createBlipAttachedTo(dojsciem, 12)
end)
addEventHandler("onClientMarkerHit", getRootElement(), function(el, md)
if not md or getElementType(el) ~= "player" then return end
if not getElementData(source,"marker_dojsciem") == true then return end
if el ~= localPlayer then return end
destroyElement(dojsciem)
destroyElement(dojscieb)
setElementFrozen(localPlayer, true)
setPedAnimation ( localPlayer, "BASEBALL", "BAT_4", 1,true )
outputChatBox("Kopiesz kamie?. ")
setTimer(function()
setElementFrozen(localPlayer, false)
setPedAnimation(localPlayer, false)
outputChatBox("Wykopa?e? kamie?, wro? do miejsca zlecenia.")
setElementData(localPlayer, "gracz_praca", false)
triggerServerEvent("givePlayerMoney", localPlayer, 350)
end, 3000, 1)
end)
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