Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2016-08-24, 11:31


eject

kurdebele






Wiek: 30
Na forum: 3659 dni
Posty: 182
Nick w MP: EjecT

Piwa: 2456

Respekt: 85,8

Ostrzeżeń: 60%
Witajcie nie dziala mi tuner po wejsciu w marker nic sie nie pokazuje brak db3

Kod:

--[[
Resource: OURGame v2
Developers: Split <split.programista@gmail.com>
You have no right to use this code without my permission.
(c) 2015 <split.programista@gmail.com>. All rights reserved.
]]

local jobs={
["tuner-sf"]={
code="tuner-sf",
desc="Praca Tunera",
desc2="",
positionMarker={-2270.89,-149.22,35},
text="* Nie jeste? zatrudniony(a) jako tuner w tym warsztacie.",
cuboid={-2297.40,-158.27,34.5, 44, 55.75, 6.5},
maxEmployees=2,
},
}

for i,v in pairs(jobs) do
local marker=createMarker(v.positionMarker[1], v.positionMarker[2], v.positionMarker[3]-0.90, "cylinder", 1.2, 78, 255, 0, 155)
setElementDimension(marker, v.positionMarker[5] or 0)
setElementInterior(marker, v.positionMarker[4] or 0)
setElementData(marker,"m:duty",v.code or 0)
local cs= createColCuboid(v.cuboid[1],v.cuboid[2],v.cuboid[3],v.cuboid[4],v.cuboid[5],v.cuboid[6])
setElementData(cs,"m:duty",v.code)
addEventHandler ( "onColShapeLeave", cs, function(el,md)
if getElementData(el,"player:duty") == getElementData(source,"m:duty") then
setElementData(el,"player:duty",false)
outputChatBox("Wyszed?e? poza teren Tunera.", el)
local skin=getElementData(el,"player:skin")
setElementModel(el,skin)
end
end)
local t=createElement("text")
setElementDimension(t, v.positionMarker[5] or 0)
setElementInterior(t, v.positionMarker[4] or 0)
setElementData(t,"name",v.desc.."\n"..v.desc2)
setElementPosition(t,v.positionMarker[1],v.positionMarker[2],v.positionMarker[3])
end

addEventHandler("onMarkerHit", resourceRoot, function(el,md)
outputChatBox("wszedl w marker",el)
if getElementType(el)~="player" then return end
local duty=getElementData(source,"m:duty")
if not duty then return end
local uid=getElementData(el,"player:uid")
if not getPlayerJob(el,duty) then
outputChatBox(jobs[duty].text, el, 255, 0, 0)
return
end
if not getElementData(el,"player:duty") then
if jobs[duty].getEmployees then
if getEmployees(duty) >= jobs[duty].maxEmployees then
outputChatBox(" W tej pracy pracuje ju? maksymalna ilo?? os?b ("..jobs[duty].maxEmployees..")", el, 255, 0, 0)
return
end
end
if jobs[duty].weapon then giveWeapon(el,jobs[duty].weapon,1000) end
setElementData(el,"player:duty",duty)
outputChatBox("Rozpocz??e?/a? prac?.", el)
exports["ogrpg-db"]:dbSet("UPDATE ogrpg_jobs SET actived=NOW() WHERE code=? and uid=?",duty,uid)
else
if getElementData(el,"player:duty") ~= getElementData(source,"m:duty") then outputChatBox("* Id? i zwolnij si? u frakcji!",el) return end
if jobs[duty].weapon then takeWeapon(el,jobs[duty].weapon) end
setElementData(el,"player:duty",false)
outputChatBox("Zako?czy?e?/a? prace.", el)
local skin=getElementData(el,"player:skin")
setElementModel(el,skin)
end
end)






Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-08-24, 13:27


_Haze

Peace Yo!






Wiek: 24
Na forum: 4184 dni
Posty: 1648
Nick w MP: Haze

Piwa: 2628

Respekt: 1020
Respekt: 1020

z tego co wiem ogrpg ma elementdate na duty je?li masz w 100% zrobiony gamemode ogrpg to powinno ci dzia?a? a jak nie to usu? sprawdzanie elementdaty i debuguj czyli sprawdzaj kiedy outputuje wiadomo?? r?b co ifa jak?? wiadomo?? to b?dziesz wiedzia? co nie dzia?a

Postaw piwo autorowi tego posta
 

 
Tagi: nie :: dziala :: tuner :: nic :: sie :: nie :: pokazuje
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku