Wchodz? w marker i nic nie dzia?a dlatego ,?e doda?em ,?e jak kto? ma zabrane prawko nie mo?e prowadzi? a tu skrypt si? zepsu? marker wszystko jest ale jak wchodz? nic si? nie dzieje
Ostatnio zmieniony przez Krzemo1234 2017-03-21, 06:51, w całości zmieniany 1 raz
Krzemo1234, wtf? podajesz jaki? skrypt, w po?cie piszesz ?e to ty doda?e? ten kawa?ek i nie wiesz co napisa?e?? graczem tutaj nie jest plr tylko el, a ten type to element data wi?c sobie j? pobierz wcze?niej i sprawd?
amited, nie s?dze tylko ja doda?em znalaz?em ustwienia-prace i chcia?em co? takiego stworzy?
[ Dodano: 2017-03-21, 17:52 ]
Poprawione
addEventHandler("onMarkerHit", m, function(el,md)
if getElementData(el,"player:license:pj"..type.."") ~= 1 then
outputChatBox("* Nie posiadasz prawa jazdy kategorii "..type..", zdaj je w punkcie S na mapie", el, 255, 0, 0)
return true
end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(el), tostring(type))
if result and #result > 0 then
v=result[1]
outputChatBox("* Posiadasz zawieszone prawo jazdy do "..v.time.." za "..v.reason, el)
return true
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time<NOW()", getPlayerSerial(el), tostring(type))
return false
if #getElementsWithinColShape(zone,"vehicle") >= 1 then
exports["1"]:outputNotificationBox (el, "#cc0000Miejsce spawnu zaj?te!")
return
end
local veh=createVehicle(getVehicleModelFromName("Mower"), -2465.61,-309.16,41.49, 1.7, 356.3, 88.0)
setElementData(veh,"temporary", true)
setElementData(veh,"spawnedBy", el)
setVehicleColor(veh, 255,0,0)
setElementData(veh,"vehicle:fuel",100)
setElementData(veh,"vehicle:desc","Koszenie trawy")
warpPedIntoVehicle(el,veh)
setElementData(el,"player:job","Kosiarka")
triggerClientEvent(el, "mower:startJOB", resourceRoot, veh)
exports["1"]:outputNotificationBox (el, "#00cc00Jed? do pierwszego punktu!")
exports["1"]:outputNotificationBox (el, "#00cc00Koszenie trawy")
exports["1"]:outputNotificationBox (el, "#00cc00Rozpoczynasz prac?:")
end
end)
addEventHandler("onMarkerHit", m, function(el,md)
local type = getElementData(el,"player:license:pjB")
if getElementData(el,"player:license:pj"..type.."") ~= 1 then
outputChatBox("* Nie posiadasz prawa jazdy kategorii "..type..", zdaj je w punkcie S na mapie", el, 255, 0, 0)
return true
end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(el), tostring(type))
if result and #result > 0 then
v=result[1]
outputChatBox("* Posiadasz zawieszone prawo jazdy do "..v.time.." za "..v.reason, el)
return true
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time<NOW()", getPlayerSerial(el), tostring(type))
return false
if #getElementsWithinColShape(zone,"vehicle") >= 1 then
exports["1"]:outputNotificationBox (el, "#cc0000Miejsce spawnu zaj?te!")
return
end
local veh=createVehicle(getVehicleModelFromName("Mower"), -2465.61,-309.16,41.49, 1.7, 356.3, 88.0)
setElementData(veh,"temporary", true)
setElementData(veh,"spawnedBy", el)
setVehicleColor(veh, 255,0,0)
setElementData(veh,"vehicle:fuel",100)
setElementData(veh,"vehicle:desc","Koszenie trawy")
warpPedIntoVehicle(el,veh)
setElementData(el,"player:job","Kosiarka")
triggerClientEvent(el, "mower:startJOB", resourceRoot, veh)
exports["1"]:outputNotificationBox (el, "#00cc00Jed? do pierwszego punktu!")
exports["1"]:outputNotificationBox (el, "#00cc00Koszenie trawy")
exports["1"]:outputNotificationBox (el, "#00cc00Rozpoczynasz prac?:")
end
end)
addEventHandler("onMarkerHit", m, function(el,md)
local type = getElementData(el,"player:license:pjB")
if type ~=1 then
outputChatBox("* Nie posiadasz prawa jazdy kategorii "..type..", zdaj je w punkcie S na mapie", el, 255, 0, 0)
return true
end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(el), tostring(type))
if result and #result > 0 then
v=result[1]
outputChatBox("* Posiadasz zawieszone prawo jazdy do "..v.time.." za "..v.reason, el)
return true
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time<NOW()", getPlayerSerial(el), tostring(type))
return false
addEventHandler("onMarkerHit", m, function(el,md)
local type = getElementData(el,"player:license:pjB")
if type ~=1 then
outputChatBox("* Nie posiadasz prawa jazdy kategorii "..type..", zdaj je w punkcie S na mapie", el, 255, 0, 0)
return true
end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(el), tostring(type))
if result and #result > 0 then
v=result[1]
outputChatBox("* Posiadasz zawieszone prawo jazdy do "..v.time.." za "..v.reason, el)
return
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time<NOW()", getPlayerSerial(el), tostring(type))
return false
local type = getElementData(el,"player:license:pjB")
if type ~=1 then
outputChatBox("* Nie posiadasz prawa jazdy kategorii "..type..", zdaj je w punkcie S na mapie", el, 255, 0, 0)
end
addEventHandler("onMarkerHit", m, function(el,md)
local type = getElementData(el,"player:license:pjB")
if type ~=1 then
outputChatBox("* Nie posiadasz prawa jazdy kategorii "..type..", zdaj je w punkcie S na mapie", el, 255, 0, 0)
end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(el), tostring(type))
if result and #result > 0 then
v=result[1]
outputChatBox("* Posiadasz zawieszone prawo jazdy do "..v.time.." za "..v.reason, el)
return
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time<NOW()", getPlayerSerial(el), tostring(type))
return false
addEventHandler("onMarkerHit", m, function(el,md)
if getElementType(el) == "player" and md then
if getElementData(el,"player:job") then
exports["1"]:outputNotificationBox (el,"#cc0000Posiadasz aktywn? prac?!")
return
end
if getElementData(el,"player:license:pjB") ~= 1 then
exports["1"]:outputNotificationBox (el,"#cc0000Aby tu pracowa? musisz mie? zdane prawo jazdy kat. B!")
return
end
local result=exports["pystories-db"]:dbGet("SELECT * FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time>NOW()", getPlayerSerial(el), tostring(type))
if result and #result > 0 then
v=result[1]
outputChatBox("* Posiadasz zawieszone prawo jazdy do "..v.time.." za "..v.reason, el)
return
else
exports["pystories-db"]:dbSet("DELETE FROM pystories_punish WHERE serial=? AND type=? AND active=1 AND time<NOW()", getPlayerSerial(el), tostring(type))
return false
if getElementData(el,"player:license:pjB") ~= 1 then
exports["1"]:outputNotificationBox (el,"#cc0000Aby tu pracowa? musisz mie? zdane prawo jazdy kat. B!")
return
end
if #getElementsWithinColShape(zone,"vehicle") >= 1 then
exports["1"]:outputNotificationBox (el, "#cc0000Miejsce spawnu zaj?te!")
return
end
local veh=createVehicle(getVehicleModelFromName("Mower"), -2465.61,-309.16,41.49, 1.7, 356.3, 88.0)
setElementData(veh,"temporary", true)
setElementData(veh,"spawnedBy", el)
setVehicleColor(veh, 255,0,0)
setElementData(veh,"vehicle:fuel",100)
setElementData(veh,"vehicle:desc","Koszenie trawy")
warpPedIntoVehicle(el,veh)
setElementData(el,"player:job","Kosiarka")
triggerClientEvent(el, "mower:startJOB", resourceRoot, veh)
exports["1"]:outputNotificationBox (el, "#00cc00Jed? do pierwszego punktu!")
exports["1"]:outputNotificationBox (el, "#00cc00Koszenie trawy")
exports["1"]:outputNotificationBox (el, "#00cc00Rozpoczynasz prac?:")
end
end)
Powinno ?imiga?
[ Dodano: 2017-03-22, 17:55 ]
a co? nie ?miga
[ Dodano: 2017-03-24, 11:47 ]
Zamykamy temat nie rozwi?zany (brak aktywno?ci)
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