markerek = createMarker(2474.36206, -1667.25647, 13.31927, "arrow", 1.5, 255, 255, 0, 170)
function buyFood(plr, key, state)
if state == "up" then
takePlayerMoney(plr, 10)
setElementHealth(plr, 100)
end
end
function jedzonko(el)
if source == markerek then
outputChatBox("Kup hot-doga za 10PLN.", el)
bindKey(el,"h", "up", buyFood)
end
end
addEventHandler("onMarkerHit", getRootElement(), jedzonko)
Ostatnio zmieniony przez Szymczu 2017-08-18, 17:25, w całości zmieniany 2 razy
markerek = createMarker(2474.36206, -1667.25647, 13.31927, "arrow", 1.5, 255, 255, 0, 170)
function buyFood(plr, key, state)
if state == "up" then
takePlayerMoney(plr, 10)
setElementHealth(plr, 100)
end
end
function jedzonko(el)
if source == markerek then
outputChatBox("Kup hot-doga za 10PLN.", el, 0,0,0)
bindKey(el,"h", "up", buyFood)
end
end
addEventHandler("onClientMarkerHit", getRootElement(), jedzonko)
[ Dodano: 2017-08-18, 17:05 ]
Albo nie. Jest jeszcze jeden b??d. Jak wchodze w marker i klikam h to co wej?cie pobiera co 10$ wi?cej. Czyli raz wejd? i klikn? pobierze 10$ potem jak wejde i klikn? h to zabiera 20$ itd.
[ Dodano: 2017-08-18, 17:13 ]
+ jak nie jestem w markerze i klikam h to dalej mnie ulecza.
markerek = createMarker(2474.36206, -1667.25647, 13.31927, "arrow", 1.5, 255, 255, 0, 170)
function jedzonko(el)
outputChatBox("Kup hot-doga za 10PLN.", el)
if getElementData(el, 'marker_jedzenie') then return end
setElementData(el, 'marker_jedzenie', true)
bindKey(el,"h", "up", zakup)
end
addEventHandler("onMarkerHit", markerek, jedzonko)
function usuwaniedaty(el)
removeElementData(el, 'marker_jedzenie')
end
addEventHandler("onMarkerLeave", markerek, usuwaniedaty)
function zakup(el)
if not getElementData(el, 'marker_jedzenie') then return end
takePlayerMoney(el, 10)
setElementHealth(el, 100)
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