xXGhostXx Posted August 17, 2018 Share Posted August 17, 2018 Hey guys ! I have a problem to play the sound ! Server side: function newspm ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then if ... then for index, allpl in ipairs(getElementsByType("player")) do outputChatBox ( "(News Reporter)".. getPlayerName ( thePlayer ) ..": #FFFFFF".. message, allpl,255, 255, 255, true ) end else outputChatBox ( "#FFFFFFSyntax: /news <text>", thePlayer, 255, 255, 255, true ) end else outputChatBox ( "#ff0000Access Denied!", thePlayer, 255, 255, 255, true ) end end addCommandHandler ( "news", newspm ) Client side: function newssound() local message = playSound("pm.mp3",true) setSoundVolume(message, 0.9) end Like this send news for all players play sound ! please answer me ! Link to comment
Moderators IIYAMA Posted August 17, 2018 Moderators Share Posted August 17, 2018 There is a tutorial for learning server client communication: Link to comment
xXGhostXx Posted August 17, 2018 Author Share Posted August 17, 2018 2 hours ago, IIYAMA said: There is a tutorial for learning server client communication: This your help ? @Galactix Please help me ! Link to comment
Mσнαмα∂ Hєℓιѕн Posted August 17, 2018 Share Posted August 17, 2018 4 hours ago, xXGhostXx said: Hey guys ! I have a problem to play the sound ! Server side: function newspm ( thePlayer, _, ... ) local message = table.concat ( { ... }, " " ) if ( isPlayerOnGroup ( thePlayer ) ) then if ... then for index, allpl in ipairs(getElementsByType("player")) do outputChatBox ( "(News Reporter)".. getPlayerName ( thePlayer ) ..": #FFFFFF".. message, allpl,255, 255, 255, true ) end else outputChatBox ( "#FFFFFFSyntax: /news <text>", thePlayer, 255, 255, 255, true ) end else outputChatBox ( "#ff0000Access Denied!", thePlayer, 255, 255, 255, true ) end end addCommandHandler ( "news", newspm ) Client side: function newssound() local message = playSound("pm.mp3",true) setSoundVolume(message, 0.9) end Like this send news for all players play sound ! please answer me ! bayad tu client addEventHandler besazi bad to server side triggerClientEvent use koni! Link to comment
Keiichi1 Posted August 17, 2018 Share Posted August 17, 2018 2 hours ago, xXGhostXx said: This your help ? @Galactix Please help me ! What's your problem? @IIYAMA wants you to learn, not to beg everytime for scripts. You need to understand first how lua works and then you can go with the MTA:SA functions, events. 1 Link to comment
xXGhostXx Posted August 17, 2018 Author Share Posted August 17, 2018 12 hours ago, Mσнαмα∂ Hєℓιѕн said: bayad tu client addEventHandler besazi bad to server side triggerClientEvent use koni! What ?! 11 hours ago, Keiichi1 said: What's your problem? @IIYAMA wants you to learn, not to beg everytime for scripts. You need to understand first how lua works and then you can go with the MTA:SA functions, events. This is your help ? please make for me Link to comment
Keiichi1 Posted August 17, 2018 Share Posted August 17, 2018 You won't get help with this attitude, trust me. Start learning... Link to comment
xXGhostXx Posted August 17, 2018 Author Share Posted August 17, 2018 11 hours ago, Keiichi1 said: You won't get help with this attitude, trust me. Start learning... Please just this time for your help Link to comment
Mσнαмα∂ Hєℓιѕн Posted August 17, 2018 Share Posted August 17, 2018 2 hours ago, xXGhostXx said: Please just this time for your help bos bede komaket konam eshgham Link to comment
N3xT Posted August 18, 2018 Share Posted August 18, 2018 2 hours ago, Mσнαмα∂ Hєℓιѕн said: bos bede komaket konam eshgham English dude... Link to comment
Mσнαмα∂ Hєℓιѕн Posted August 18, 2018 Share Posted August 18, 2018 50 minutes ago, N3xT said: English dude... xXGHOSTXx is IRanian Noob Scripter Link to comment
Moderators IIYAMA Posted August 18, 2018 Moderators Share Posted August 18, 2018 17 hours ago, xXGhostXx said: This your help ? @Galactix Please help me ! It is , take it or leave it. But don't be so ungrateful. 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