SnoopCat Posted October 18, 2010 Share Posted October 18, 2010 hey im here again i uploaded a chat sound script and pplz wants to me to make a pm sound too so i tested the thing i have and isnt working so im here to ask for help here is code.. SCRIPt addEvent("pm",true) addCommandHandler("msg", pm) addEventHandler("pm", getRootElement(), function() local sound = playSound("1.mp3",false) setSoundVolume(sound, 1.0) end) addEventHandler ( "onClientPlayerJoin", getResourceRootElement(getThisResource()), ) META: meta> <info author="$VL$FuGa" description="this script plays a PM sound " info="mod" type="misc" version="1.0.4" /> <script src="sonido.lua" type="client"/> <file src="1.mp3" /> </meta> Link to comment
Castillo Posted October 18, 2010 Share Posted October 18, 2010 (edited) server side: function pm (thePlayer) triggerClientEvent(thePlayer,"pm",thePlayer) end addEventHandler ( "onPlayerPrivateMessage", getRootElement(), pm ) client side: function playPmSound() local pmsound = playSound("1.mp3",false) setSoundVolume(pmsound, 0.9) end addEvent("pm",true) addEventHandler("pm",getRootElement(),playPmSound) should work. Edited October 18, 2010 by Guest Link to comment
dzek (varez) Posted October 18, 2010 Share Posted October 18, 2010 "your" script was done by somebody else on the forums, now you are coming back asking for more features you want from us? your code is so random.. and makes no sense.. you have to edit admin resource (which handles pms afair) - because you want to play sound on RECEIVE not on send message.. edit: i see solid already made something for you.. whatever.. just credit all pll that made the script for you.. edit2: both parts are done by solid if you wondering.. Link to comment
SnoopCat Posted October 18, 2010 Author Share Posted October 18, 2010 varez i just trying to learn and i try to do something some pplz dont do nothing and they want help.... thats not fair.... Link to comment
SnoopCat Posted October 18, 2010 Author Share Posted October 18, 2010 i tried what Solid says but even not working... here its the error WARNING: pmsound\sonidoS.lua:2: Bad argument @ 'triggerClientEvent' 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