addEvent("ev",true)
addEventHandler("ev",resourceRoot,
function(ev,arg1,arg2)
if (ev=="wylam_drzwi") then
local veh=arg1
local drzwi=arg2
local x,y,z=getElementPosition(client)
if (getVehicleDoorState(veh,drzwi)==4) then
return
end
triggerClientEvent(root,"evc",resourceRoot,"wlacz_dzwiek",x,y,z)
setPedAnimation(client,"CHAINSAW","csaw_part",-1, true, false, false)
setTimer(function()
if veh and isElement(veh) and drzwi then
setVehicleDoorState(veh,drzwi,2)
end
end,2500,1)
setTimer(function(client)
if client and isElement(client) and veh and isElement(veh) and drzwi then
setPedAnimation(client)
setVehicleDoorState(veh,drzwi,4)
local vehid=getElementData(veh,"dbid")
if not vehid then
vehid="pojazd nie jest prywatny - nie posiada ID"
end
exports["es-logi"]:outputUcho("ROZPIERACZ PSP: "..getPlayerName(client).." DBID: "..getElementData(client,"dbid").." u?ywa rozpieracza na poje?dzie o ID: "..vehid..".")
end
end,5000,1,client)
end
end
)