addEventHandler ("onClientMarkerHit", sklep,
function (source)
triggerServerEvent ("Wedka", source )
end)
function costam ()
triggerServerEvent ("SprWedka", source )
if getElementData (source, "Miejsce") == true then
local rand = math.random(1, #ryby)
local kasa = math.random(1, #koszt)
outputChatBox ("**Zlowiles "..ryby[rand].. " Kt?ry kosztuje: "..koszt[kasa], source)
end
end
end
addEventHandler ("onClientMarkerHit", root, costam)
Tu serwer
function daj ()
if not isPedInVehicle(source) then
local ile = 10
setElementData (source, "Wedeczka", tonumber(ile))
outputChatBox ("Brawo", source)
else
outputChatBox ("Zenada", source)
end
end
addEvent ("Wedka", true)
addEventHandler ("Wedka", root, daj )
function sialalala (source)
if getElementData ( source, "Wedka" ) >= 1 then
ilosc = getElementData ( source, "Wedka" )
local jedna = 1
setElementData ( source, "Wedka", tonumber(ilosc)-tonumber(jedna) )
outputChatBox ("Jesli widac to dobrze ;)", source)
end
end
addEvent ("SprWedka", true)
addEventHandler ("SprWedka", root, sialalala )
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