0 Üye ve 1 Ziyaretçi konuyu incelemekte.
degisken_durumu = 0function bindSiren( ) if not isElement(ses) and getKeyState("H") and degisken_durumu == 0 and getElementModel(getPedOccupiedVehicle(getLocalPlayer())) == 598 then x, y, z = getElementPosition(getPedOccupiedVehicle(getLocalPlayer())) triggerServerEvent("sirenKurServer", getLocalPlayer(), getLocalPlayer(), x, y, z) elseif isElement(ses) and getKeyState("H") and degisken_durumu == 1 and getElementModel(getPedOccupiedVehicle(getLocalPlayer())) == 598 then triggerServerEvent("sirenKapatServer", getLocalPlayer(), getLocalPlayer()) endendbindKey("H", "down", bindSiren)function sirenolustur( player, x, y, z ) ses = playSound3D("siren.mp3", x, y, z, true, true) setSoundEffectEnabled(ses,"reverb",true) attachElements ( ses, getPedOccupiedVehicle(player), 0, 0, 2 ) degisken_durumu = 1endaddEvent("sirenKur", true)addEventHandler("sirenKur", getRootElement(), sirenolustur)function sirenkapat( x, y, z ) if isElement(ses) then stopSound(ses) degisken_durumu = 0 endendaddEvent("sirenKapat", true)addEventHandler("sirenKapat", getRootElement(), sirenkapat)
function sirenOlusturServer( player, x,y,z ) if isElement(player) and tonumber(x) and tonumber(y) and tonumber(z) then triggerClientEvent(root, "sirenKur", player, player, x, y, z) endendaddEvent("sirenKurServer", true)addEventHandler("sirenKurServer", getRootElement(), sirenOlusturServer)function sirenKapatServerFunc( player) if isElement(player) then triggerClientEvent(root, "sirenKapat", player) endendaddEvent("sirenKapatServer", true)addEventHandler("sirenKapatServer", getRootElement(), sirenKapatServerFunc)