Jump to content

Chat PM


SnoopCat

Recommended Posts

Posted

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/

Posted (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 by Guest

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

"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)!

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