Jump to content

Helloooo again me :) my another code is still not running can you help me ?


Recommended Posts

Posted
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 :D 

Posted

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

Posted
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

Posted
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

  • Thanks 1
Posted
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 ?

Posted (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 by Guty

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...