TamerNWSC Posted May 10, 2020 Share Posted May 10, 2020 function kalkis (player, commandName) local sound = playSound("/185.255.92.67_23303/mods/deathmatch/resources/[gameplay]/SesDenemesi/kalkis.mp3") setSoundVolume(sound, 1.0) -- set the sound volume to 100% end addCommandHandler ( "kalk", kalkis ) here is my Lua code im trying to do when we type /kalk the game plays takeoff sound but when i type /kalk nothing happens can anybody help me ? here is my xml code too <meta> <info author="Tamer5.SAJU" description="Sesli Hava Trafik Kontrolörü" type="script" ></info> <script src="sesdeneme_c.Lua" type="client" file="kalkis.mp3" ></script> </meta> Thanks for everybody from now Link to comment
Tekken Posted May 10, 2020 Share Posted May 10, 2020 Well in playSound you just need to put kalkils.mp3 or either add the entire path to the meta file depending on the file location within the resource Link to comment
#\_oskar_/# Posted May 10, 2020 Share Posted May 10, 2020 40 minutes ago, TamerNWSC said: file="kalkis.mp3" 40 minutes ago, TamerNWSC said: local sound = playSound("/185.255.92.67_23303/mods/deathmatch/resources/[gameplay]/SesDenemesi/kalkis.mp3") ?? try function kalkis (player, commandName) sound = playSound("kalkis.mp3") setSoundVolume(sound, 1.0) -- set the sound volume to 100% end addCommandHandler ( "kalk", kalkis ) 1 Link to comment
TamerNWSC Posted May 10, 2020 Author Share Posted May 10, 2020 5 hours ago, #\_oskar_/# said: ?? try function kalkis (player, commandName) sound = playSound("kalkis.mp3") setSoundVolume(sound, 1.0) -- set the sound volume to 100% end addCommandHandler ( "kalk", kalkis ) Naaa not worked ım gonna try something with file location on xml and Lua 2 minutes ago, TamerNWSC said: Naaa not worked ım gonna try something with file location on xml and Lua Neither working Link to comment
Furzy Posted May 11, 2020 Share Posted May 11, 2020 12 hours ago, TamerNWSC said: Naaa not worked ım gonna try something with file location on xml and Lua Neither working You need to locate the folder where is kalkis.mp3 1 Link to comment
TamerNWSC Posted May 11, 2020 Author Share Posted May 11, 2020 9 hours ago, Furzy said: You need to locate the folder where is kalkis.mp3 soo im gonna create a folder next to xml file and make folders name sound and write sound/kalkis.mp3 yeah ? Link to comment
Trust aka Tiffergan Posted May 11, 2020 Share Posted May 11, 2020 try with that create a folder and give there a .Lua and xml file and a sounds folder, and in sounds give your sound file and make a path sounds / name.mp3 Link to comment
Guty Posted May 14, 2020 Share Posted May 14, 2020 (edited) <meta> <author="Tamer5.SAJU" description="Sesli Hava Trafik Kontrolörü" type="script" /> <file src="karkis.mp3" /> <script src="sesdeneme_c.Lua" type="client" /> </meta> function kalkis (player, commandName) local sound = playSound("SesDenemesi/kalkis.mp3") setSoundVolume(sound, 1.0) -- set the sound volume to 100% end addCommandHandler ( "kalk", kalkis ) I noticed that your 'kalkis.mp3' file is located in your script's folder, so it should work like that. Also your meta file was kind of strange, are you sure its 'sesdeneme_c.Lua' ? does the script load in your console? are you able to start it? Edited May 14, 2020 by Guty Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now