EvoGT Posted March 21, 2013 Posted March 21, 2013 How can i make sound on login and register ? What script should i use ?
iPrestege Posted March 21, 2013 Posted March 21, 2013 onPlayerLogin playSound onPlayerLogin triggerClientEvent playSound
EstrategiaGTA Posted March 21, 2013 Posted March 21, 2013 (edited) Just use these functions: onPlayerLogin playSound triggerClientEvent If you get errors, just post it, we'll help you. Edited March 21, 2013 by Guest
PaiN^ Posted March 21, 2013 Posted March 21, 2013 Just use these functions: onPlayerLogin playSound If you get errors, just post it, we'll help you. You have to use triggerClientEvent !, Because onPlayerLogin is a server side event, And playSound is a client side function ..
iPrestege Posted March 21, 2013 Posted March 21, 2013 Just use these functions: onPlayerLogin playSound If you get errors, just post it, we'll help you. Do You Have Problem? Or What The Fuck? Should Use : triggerClientEvent Why? Becuase "Play Sound" Function Client Side Only .
EstrategiaGTA Posted March 21, 2013 Posted March 21, 2013 Just use these functions: onPlayerLogin playSound If you get errors, just post it, we'll help you. You have to use triggerClientEvent !, Because onPlayerLogin is a server side event, And playSound is a client side function .. Yeah, I forgot... Sorry & Calm down Pres[T]ege .__.
ZL|LuCaS Posted March 21, 2013 Posted March 21, 2013 Client function Sound() playSound("sound.mp3",false) end addEvent("onActiveSound",true) addEventHandler("onActiveSound",getRootElement(),Sound) Server addEventHandler ( "onPlayerCommand", root, function(sound) if (sound == 'login') or (sound == 'register') then triggerClientEvent("onActiveSound",getRootElement(),Sound) end end)
Sasu Posted March 21, 2013 Posted March 21, 2013 This script will do that music play for all. The client is good but server is wrong. Client function Sound() playSound("sound.mp3",false) end addEvent("onActiveSound",true) addEventHandler("onActiveSound",getRootElement(),Sound) Server addEventHandler ( "onPlayerCommand", root, function(sound) if (sound == 'login') or (sound == 'register') then triggerClientEvent("onActiveSound",getRootElement(),Sound) end end) Try this: Client function Sound() playSound("sound.mp3",false) end addEvent("onActiveSound",true) addEventHandler("onActiveSound",getRootElement(),Sound) Server addEventHandler ( "onPlayerLogin", root, function() triggerClientEvent("onActiveSound",source,Sound) end )
ZL|LuCaS Posted March 21, 2013 Posted March 21, 2013 This script will do that music play for all.The client is good but server is wrong. Client function Sound() playSound("sound.mp3",false) end addEvent("onActiveSound",true) addEventHandler("onActiveSound",getRootElement(),Sound) Server addEventHandler ( "onPlayerCommand", root, function(sound) if (sound == 'login') or (sound == 'register') then triggerClientEvent("onActiveSound",getRootElement(),Sound) end end) Try this: Client function Sound() playSound("sound.mp3",false) end addEvent("onActiveSound",true) addEventHandler("onActiveSound",getRootElement(),Sound) Server addEventHandler ( "onPlayerLogin", root, function() triggerClientEvent("onActiveSound",source,Sound) end ) "@EvoGT, How can i make sound on login and (register) ?"
codeluaeveryday Posted March 22, 2013 Posted March 22, 2013 Just to let you know, this sound is playing to everyone. If I logged in everyone would hear the sound.
DNL291 Posted March 22, 2013 Posted March 22, 2013 Use the getAccount function to check if player is registred. If you're using a login panel, just use playSound function when the player click on the login/register button.
PaiN^ Posted March 22, 2013 Posted March 22, 2013 Use the getAccount function to check if player is registred.If you're using a login panel, just use playSound function when the player click on the login/register button. Put that well play the sound even if there was a login error ! Thanks to all You all are awesome <3 You're welcome ..
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