Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elseif option == "audio" then
- if not isPedInVehicle(player) then exports.titan_noti:showBox(player, "TIP: /v ["..legend.."]") return end
- local veh = getPedOccupiedVehicle(player)
- if(not isElement(veh)) then
- exports.titan_noti:showBox(player, "Musisz siedzieć w pojeździe.")
- return
- end
- local vehInfo = getVehInfo(getElementData(veh, "vehID"))
- if(not vehInfo) then
- exports.titan_noti:showBox(player, "Nie można znaleźć informacji o pojeździe.")
- return
- end
- if(not doesPlayerHaveDrivePerm(player, vehInfo.ID)) then
- exports.titan_noti:showBox(player, "Nie posiadasz kluczyków do tego pojazdu.")
- return
- end
- if not veh:getData("carAudio") then
- if veh:getData("carAudioOn") then veh:removeData("carAudioOn") end
- return exports.titan_noti:showBox(player, "W napędzie nie ma płyty.")
- else
- if veh:getData("carAudioOn") then
- veh:removeData("carAudioOn")
- local occupants = getVehicleOccupants(veh)
- for seat, player in pairs(occupants) do
- triggerClientEvent(player, "soundPlay.carAudioOff", player)
- end
- triggerClientEvent("soundPlay.carAudioOffTerrain", player, veh)
- return exports.titan_noti:showBox(player, "Audio zostało wyłączone.")
- else
- veh:setData("carAudioOn", true)
- local occupants = getVehicleOccupants(veh)
- for seat, player in pairs(occupants) do
- triggerClientEvent(player, "soundPlay.carAudioOn", player, veh:getData("carAudio"))
- end
- triggerClientEvent("soundPlay.carAudioOnTerrain", player, veh, veh:getData("carAudio"))
- return exports.titan_noti:showBox(player, "Audio zostało włączone.")
- end
- end
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement