SnoopCat Posted October 18, 2010 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> VISIT TSW RACING SERVER http://tswracing.net/
Castillo Posted October 18, 2010 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 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
dzek (varez) Posted October 18, 2010 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.. Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online! programista php rzeszów Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting. Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!
SnoopCat Posted October 18, 2010 Author 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.... VISIT TSW RACING SERVER http://tswracing.net/
SnoopCat Posted October 18, 2010 Author 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' VISIT TSW RACING SERVER http://tswracing.net/
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