hejo, to znowu ja, pisze skrypt na barierke pod ogrpg bo jakis typek chcia?, a przez to ze s? korona-ferie to nudze sie i sie zgodzi?em, problem polega na tym ze ten typ chcia? ?eby sie respi?o jak na emsie czyli przed, a zrobi?em skrypt i nie wiem jak to dokonczyc
[lua]function barierke1(source,command)
if isPedInVehicle(source) then return end
if getElementData(source,'player:duty') and getElementData(source,'player:duty')=='SAPD' then
local barierke1 = getElementData(source,'player:barierke1') or {}
local nick = getPlayerName(source):gsub("#%x%x%x%x%x%x","")
local x,y,z = getElementPosition(source)
local rotX,rotY,rotZ = getElementRotation(source)
local obj = createObject(1228, x, y, z-0.45, 0,0,180)
setElementFrozen(obj,true)
setElementData(obj,"wlasciciel",nick)
local time = getRealTime()
if time.second >= 60 then time.second = time.second-60; time.minute=time.minute+1 end
if time.minute >= 60 then time.minute = time.minute-60; time.hour=time.hour+1 end
local datapostawienia = string.format("%02d:%02d:%02d",time.hour, time.minute, time.second)
setElementData(obj,"hour",datapostawienia)
triggerClientEvent("setObjectBreakable",obj)
table.insert(barierke1,obj )
setElementData(source,'player:barierke1',barierke1)
setElementInterior(obj, getElementInterior(source))
setElementDimension(obj, getElementDimension(source))
end
end
addCommandHandler('ustawbarierke',barierke1)
function usunbarierki(plr)
if getElementData(plr,'player:barierke1') then
for key, value in ipairs(getElementData(plr,'player:barierke1')) do
if isElement(value) then
destroyElement(value)
end
end
removeElementData(plr,'player:barierke1')
outputChatBox('*Usun??e? Barierki.',plr,51,153,253,true)
end
end
addCommandHandler('usunbarierki',usunbarierki)
[/lua]
|