Jump to content

помогите плиз


Recommended Posts

Здравствуйте,помогите пожалуйста со скриптом,не могу доделать,смысл скрипта в том что зажимая клавишу Ь издаётся сигнал ментовской кряколки,вот начал делать и не смог довести до ума.

Сlient.lua

local url = "sound.mp3" 
  
function playTheSound(x, y, z, vehicle) 
    sound = playSound3D(url, x, y, z) 
    if (isElement(vehicle)) then attachElements(sound, vehicle) end 
end 
addEvent("playTheSound", true) 
addEventHandler("playTheSound", root, playTheSound) 
  
local url2 = "sound2.mp3" 
  
function playTheSound2(x, y, z, vehicle) 
    sound = playSound3D(url2, x, y, z) 
    if (isElement(vehicle)) then attachElements(sound, vehicle) end 
end 
addEvent("playTheSound2", true) 
addEventHandler("playTheSound2", root, playTheSound2) 
  
local url3 = "sound3.mp3" 
  
function playTheSound3(x, y, z, vehicle) 
    sound = playSound3D(url3, x, y, z) 
    if (isElement(vehicle)) then attachElements(sound, vehicle) end 
end 
addEvent("playTheSound3", true) 
addEventHandler("playTheSound3", root, playTheSound3) 
  
local url4 = "sound4.mp3" 
  
function playTheSound4(x, y, z, vehicle) 
    sound = playSound3D(url4, x, y, z) 
    if (isElement(vehicle)) then attachElements(sound, vehicle) end 
end 
addEvent("playTheSound4", true) 
addEventHandler("playTheSound4", root, playTheSound4) 
  
function stopTheSound(x, y, z) 
    stopSound(sound) 
end 
addEvent("stopTheSound", true) 
addEventHandler("stopTheSound", root, stopTheSound) 
  
function stopTheSound2(x, y, z) 
    stopSound(sound) 
end 
addEvent("stopTheSound2", true) 
addEventHandler("stopTheSound2", root, stopTheSound2) 
  
function stopTheSound3(x, y, z) 
    stopSound(sound) 
end 
addEvent("stopTheSound3", true) 
addEventHandler("stopTheSound3", root, stopTheSound3) 
  
function stopTheSound4(x, y, z) 
    stopSound(sound) 
end 
addEvent("stopTheSound4", true) 
addEventHandler("stopTheSound4", root, stopTheSound4) 

meta.xml

    "[161]PRO" version="1.0" type="script"/> 
  
    

помогите доделать!Заранее спасибо!

Edited by Guest
Link to comment
Мб я чего-то не понимаю, но почему в мете у звуков расширения как у моделей?

Да,ты прав,уже исправил))ну всё равно это никак не повлияло!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...