Strike27208

Members
  • Content count

    86
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Strike27208

  • Rank
    Transformer
  • Birthday 18/12/97

Details

  • Gang
    Romania
  • Location
    Galati
  • Occupation
    Lua
  • Interests
    To be a big scripter.
  1. Noile spawn-uri de masini, nu functioneaza

    Poftim vehicle table'ul meu , este la fel ca al tau doar ca tu sigur ai ratat sa faci ceva , eu am mai bagat si alte vehicule pe langa cele de baza , sper ca te-am ajutat . https://www.mediafire.com/file/mkqtqkbuo1y5lsc/vehicles.lua
  2. How to playSound only for seat 0 ?

    Thanks man , it's working , cheers
  3. How to playSound only for seat 0 ?

    Ok , thanks.
  4. How to playSound only for seat 0 ?

    Same Error. localPlayer:getOccupiedVehicleSeat(vehicle , 0 )
  5. How to playSound only for seat 0 ?

    attempt to index a global "localPlayer" a userdata value , hmmmm ?
  6. How to playSound only for seat 0 ?

    I used this and didn't work : local driver = getVehicleOccupant(veh, 0) local p1 = getVehicleOccupant(veh, 1) local p2 = getVehicleOccupant(veh, 2) local p3 = getVehicleOccupant(veh, 3) if fuel <=5 then if p1 or p2 or p3 then return false end if driver then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.1) setSoundSpeed ( sound, 0.9 ) outputChatBox ( "#FF0000Alarm ! #FFFFFFLow fuel ! Press ' Z ' to stop the alarm.", 255, 255, 255, true ) bindKey ( "Z", "down", stopMySoundB ) addEventHandler ( "onClientVehicleExit", root, stopMySoundV ) killTimer(aMyTimer) end end end
  7. How to playSound only for seat 0 ?

    Hey , how i can to play sound for driver only ? this is my code , i tried to make but i failed and i need some help : function helicopter () if ( isPedInVehicle ( localPlayer ) == false ) then return false end local vehicle = getPedOccupiedVehicle(getLocalPlayer()) if vehicle then if ( policeVehicles[getElementModel ( vehicle )] ) then local maxfuel = tonumber(getElementData(vehicle, "maxfuel")) or 0; local fuels = math.floor(tonumber(getElementData(getElementData(vehicle, "parent"), "fuel"))) or 0; if fuels <=5 then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.1) setSoundSpeed ( sound, 0.9 ) outputChatBox ( "#FF0000Alarm ! #FFFFFFLow fuel ! Press ' Z ' to stop the alarm.", 255, 255, 255, true ) bindKey ( "Z", "down", stopMySoundB ) addEventHandler ( "onClientVehicleExit", root, stopMySoundV ) killTimer(aMyTimer) end end end end aMyTimer = setTimer( helicopter, 5000,0)
  8. How to make to check non-stop ?

    Hey , i come back here because i find a new bug :)) , if i'm with other player in vehicle the alarm won't start , this is my code : local driver = getVehicleOccupant(veh, 0) local p1 = getVehicleOccupant(veh, 1) local p2 = getVehicleOccupant(veh, 2) local p3 = getVehicleOccupant(veh, 3) if fuel <=5 then if p1 or p2 or p3 then return false end if driver then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.1) setSoundSpeed ( sound, 0.9 ) outputChatBox ( "#FF0000Alarm ! #FFFFFFLow fuel ! Press ' Z ' to stop the alarm.", 255, 255, 255, true ) bindKey ( "Z", "down", stopMySoundB ) addEventHandler ( "onClientVehicleExit", root, stopMySoundV ) killTimer(aMyTimer) end end end
  9. How to make to check non-stop ?

    I use to activate my function if driver then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.2) outputChatBox ( "#FF0000Alarm ! #FFFFFFLow fuel ! Press ' Z ' to stop the alarm.", 255, 255, 255, true ) bindKey ( "Z", "down", stopMySoundB ) addEventHandler ( "onClientVehicleExit", root, stopMySoundV ) killTimer(aMyTimer) end
  10. How to make to check non-stop ?

    Oh man thank you very much , it's working , thaaaaaaanks !!!!! Last code are working.
  11. How to make to check non-stop ?

    I have the event attached. This is server part ?
  12. How to make to check non-stop ?

    Nope , i don't use local , still not working , but thanks for help man , i appreciate. No warrnings or erros in debugscript. I used this to play sound only for driver seat and it's working , when i tried to use for that function he give that warrning , can you tell me why ? local driver = getVehicleOccupant(veh, 0) local p1 = getVehicleOccupant(veh, 1) local p2 = getVehicleOccupant(veh, 2) local p3 = getVehicleOccupant(veh, 3) if fuel1 <= 6 then if p1 or p2 or p3 then return false end if driver then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.2)
  13. How to make to check non-stop ?

    Hmm i tried but still not work function stopMySoundV() local veh = getPedOccupiedVehicle(getLocalPlayer()) if veh then local driver = getVehicleController(veh , getLocalPlayer()) if driver then local drivers = getVehicleOccupant(veh, 0) local p1 = getVehicleOccupant(veh, 1) local p2 = getVehicleOccupant(veh, 2) local p3 = getVehicleOccupant(veh, 3) if p1 or p2 or p3 then return false end if drivers then stopSound (sound) unbindKey ( "Z", "down", stopMySoundB ) removeEventHandler( "onClientVehicleExit", root, stopMySoundV ) if not isTimer ( aMyTimer ) then aMyTimer = setTimer( helicopter, 5000,0) end end end end end Tell me if i am wrong.
  14. How to make to check non-stop ?

    Thanks man it's work , now i made a sistem like only driver to hear the sound , this work but when i want exit from vehicle the sound are not stopping and i get an warnging in debugscript like this : My code : function stopMySoundV() local veh = getPedOccupiedVehicle(getLocalPlayer()) local driver = getVehicleOccupant(veh, 0) local p1 = getVehicleOccupant(veh, 1) local p2 = getVehicleOccupant(veh, 2) local p3 = getVehicleOccupant(veh, 3) if p1 or p2 or p3 then return false end if driver then stopSound (sound) unbindKey ( "Z", "down", stopMySoundB ) removeEventHandler( "onClientVehicleExit", root, stopMySoundV ) if not isTimer ( Check ) then Check = setTimer( helicopter, 5000,0) end end end
  15. How to make to check non-stop ?

    Hey i make this script when you have low fuel to start a sound alarm but i don't know how to make to check this when you are in helicopter : function helicopter () if ( isPedInVehicle ( localPlayer ) == false ) then return false end ---------------------------Parts----------------------- local veh = getPedOccupiedVehicle(getLocalPlayer()); local maxfuel = ---myStuff--; local fuel = ---myStuff----------; if (isElement(veh) and getElementModel(veh) == 487 or 497 or 417 or 563 ) then if fuel <= 5 then sound = playSound("sound/beep.mp3" , true) setSoundVolume(sound, 0.2) outputChatBox ( "#FF0000Alarm ! #FFFFFFLow fuel ! Press ' Z ' to stop the alarm.", 255, 255, 255, true ) bindKey ( "Z", "down", stopMySoundV ) addEventHandler ( "onClientVehicleExit", root, stopMySound ) killTimer(tm) end end end tm = setTimer (helicopter , 5000 , 0) addEventHandler ( "onClientResourceStart", root, helicopter ) function stopMySound() stopSound ( sound ) unbindKey ( "Z", "down", stopMySoundV ) end function stopMySoundV() stopSound ( sound ) removeEventHandler( "onClientVehicleExit", root, stopMySound ) end This all work , but when he kill the timer i can't use ' resetTimer ' because he killed it , so how to make to reset that timer when he leave the vehicle ? this work first time , but when i enter again in vehicle he wont verify again.