Jump to content

Chat PM


SnoopCat

Recommended Posts

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

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 by Guest
Link to comment

"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

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