function data(plr, commandName)
if isPedInVehicle(plr) then
local woz = getPedOccupiedVehicle(plr)
outputChatBox("data jest",plr)
setElementData(woz, "zapelnienie", 10)
end
end
addCommandHandler("tescik", data)
function dodaj(plr)
local woz = getPedOccupiedVehicle(plr)
local ile = getElementData(woz, "zapelnienie")
setElementData(woz, "zapelnienie", ile + 5)
end
end
addEventHandler("onMarkerHit", getRootElement(), dodaj)
Wi?c tak. Gdy w??czam skrypt 0 b??d?w i warning?w. Gdy wejde w marker, kt?ry ma dawa? zape?nienie zamiast tego tworzy si? ?mieciarka, a powinno by? na innym (oczywi?cie, gdy jeste?my piszo). Gdy wpisze /tescik 0 db3. Wje?d?am w marker i nic si? nie dzieje. Ale gdy wjad? w ten, kt?ry ma dawa? ?mieciarki pokazuj? si? te b??dy.
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017 Moderator - 25.11.2017 Mod-Team - 02.07.2018
Nie dodaje zape?nienia. Jeszcze raz podam ca?y kod:
lok2 = {
{-1836.6999511719,111.59999847412,14.10000038147},
{948.70001220703,1720,7.9000000953674},
}
lok3 = {
}
function markery ()
for k,v in ipairs(lok2) do
createMarker(v[1], v[2],v[3], "cylinder", 1.5, 255, 255, 0, 170)
end
end
addEventHandler("onResourceStart", resourceRoot, markery)
function markery1()
createMarker(-1838.6999511719,116.59999847412,14.10000038147, "cylinder", 2, 255, 255, 0, 170)
end
addEventHandler("onResourceStart", getRootElement(), markery1)
function pojd (hitElement)
local woz = createVehicle(408, -1859.9000244141, 124.90000152588, 15.89999961853, 0)
if getElementType( hitElement ) == "player" and not isPedInVehicle(hitElement) then
warpPedIntoVehicle(hitElement, woz)
setElementData (woz, "zapelnienie", 0)
local ile = getElementData(woz, "zapelnienie")
setElementData(woz, "pojazd_opis", "Praca smieciarki - Zapelnienie: "..ile.."",true)
end
end
addEventHandler("onMarkerHit", getRootElement(), pojd)
function data(plr, commandName)
if isPedInVehicle(plr) then
local woz = getPedOccupiedVehicle(plr)
outputChatBox("data jest",plr)
setElementData(woz, "zapelnienie", 10)
end
end
addCommandHandler("tescik", data)
function dodaj(plr)
local woz = getPedOccupiedVehicle(plr)
local ile = getElementData(woz, "zapelnienie")
setElementData(woz, "zapelnienie", ile + 5)
end
addEventHandler("onMarkerHit", getRootElement(), dodaj)
Prosi?bym Ci? aby? mi opisa? co wg. Ciebie powinienem wiedzie?, aby to ogarn??. Dzi?ki za fatyg?.
Podpis
Użytkownik - 10-05-2016
Support Team - 17.06.2017 Moderator - 25.11.2017 Mod-Team - 02.07.2018
local dodawanie = createMarker(-1838.6999511719,111.59999847412,14.10000038147)
function dodaj(plr)
local woz = getPedOccupiedVehicle(plr)
local ile = getElementData(woz, "zapelnienie")
setElementData(woz, "zapelnienie", ile + 5)
end
addEventHandler("onMarkerHit", dodawanie, dodaj)
local dodawanie = createMarker(-1838.6999511719,111.59999847412,14.10000038147)
function dodaj(plr)
local woz = getPedOccupiedVehicle(plr)
local ile = getElementData(woz, "zapelnienie")
setElementData(woz, "zapelnienie", ile + 5)
end
addEventHandler("onMarkerHit", dodawanie, dodaj)
lok2 = {
{-1836.6999511719,111.59999847412,14.10000038147},
{948.70001220703,1720,7.9000000953674},
}
function markery ()
for k,v in ipairs(lok2) do
local marker = createMarker(v[1], v[2],v[3], "cylinder", 1.5, 255, 255, 0, 170)
setElementData(marker, "Praca:Smieciarki:Punkty", true)
end
end
addEventHandler("onResourceStart", resourceRoot, markery)
local marker_Start = createMarker(x, y, z, "cylinder", 1.5, 255, 255, 0, 170)
function MarkerHit (hitElement)
if source == marker_Start then else return end
if getElementType(hitElement) == "player" then else return end
local pojazd = createVehicle(408, -1859.9000244141, 124.90000152588, 15.89999961853, 0)
warpPedIntoVehicle(hitElement, pojazd)
setElementData(pojazd, "zapelnienie", 0)
setElementData(pojazd, "pojazd_opis", "Praca ?mierciarki")
setElementData(pojazd, "pojazd_opis", "Zape?nienie 0%",true)
end
addEventHandler("onMarkerHit", getRootElement(), MarkerHit)
function Wjedz_Marker (hitElement)
if getElementData(source, "Praca:Smieciarki:Punkty") then else return end
if getElementType(hitElement) == "player" then else return end
local pojazd = getPedOccupiedVehicle(hitElement)
if pojazd then else return end
setElementData(pojazd, "zapelnienie", getElementData(pojazd, "zapelnienie") + 5 )
end
addEventHandler("onMarkerHit", getRootElement(), Wjedz_Marker)
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