Jump to content

triggerClientEvent problem!


rusztamas

Recommended Posts

Hello! I want to play a sound effect on the player's location, when he typed the command in, but my script is just not working, can somebody help me?
Server:

function pocsomoccseLejatszas()
triggerClientEvent (getRootElement(), pocsomoccse)
end
addCommandHandler ("pocsomoccse", pocsomoccseLejatszas)

Client:

function pocsomoccseHangLejatszas()
local jatekosX, jatekosY, jatekosZ = getElementPosition(localPlayer)
local pocsomoccseHangEffekt = playSound3D("pocsomoccse.mp3", jatekosX, jatekosY, jatekosZ, false)
end
addEvent ("pocsomoccse", true)
addEventHandler ("pocsomoccse", getRootElement(), pocsomoccseHangLejatszas)

Meta:
 

<meta>
    <info type="script" version="1.0.0"></info>
    <script src="codeC.lua" type="client"></script>
    <script src="codeC2.lua" type="client"></script>
    <script src="pocsomoccse_c.lua" type="client"></script>
    <script src="pocsomoccse_s.lua" type="server"></script>
    <file src="italy.mp3"></file>
    <file src="inferno.mp3"></file>
    <file src="jinglejingle.mp3"></file>
    <file src="alarm.mp3"></file>
    <file src="peddiendre.mp3"></file>
    <file src="putin_putout.mp3"></file>
    <file src="pocsomoccse.mp3"></file>
</meta>

Sorry for the Hungarian language.
 

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