MadMaximus Posted May 11, 2017 Share Posted May 11, 2017 Hello guys, I got a question. When some people win a map they gets a music play. how can I do that? EG: player1 wins the game(no sound) player2 wins the game(each time it plays a sound) Can someone tells me how to do that? Link to comment
!#NssoR_) Posted May 11, 2017 Share Posted May 11, 2017 This function playSound creates a sound and then plays it, you can read the wiki page for more details. Link to comment
MadMaximus Posted May 12, 2017 Author Share Posted May 12, 2017 10 hours ago, !#NssoR_) said: This function playSound creates a sound and then plays it, you can read the wiki page for more details. I don't understand. where should I put the script? Its not base in each map. every different map when they win this sound plays. And they don't have access to server side also.... Link to comment
Function Posted May 13, 2017 Share Posted May 13, 2017 addEventHandler("onPlayerFinish",root, function(rank,time) if rank == 1 then playSound(...) elseif rank == 2 then playSound(...) end ) Do you mean like this? Link to comment
MadMaximus Posted May 13, 2017 Author Share Posted May 13, 2017 11 hours ago, Function said: addEventHandler("onPlayerFinish",root, function(rank,time) if rank == 1 then playSound(...) elseif rank == 2 then playSound(...) end ) Do you mean like this? I don't know. Its like this.. there are 2 players on the server. when they win in any map in any arena it plays a sound. when other players wins there is no sound. And it's not an admin option either.. here: Link to comment
koragg Posted May 21, 2017 Share Posted May 21, 2017 (edited) Quote Why don't you try to do something for a change instead of bumping the topic? You should read the above two topics. Quote The Scripting section is not meant for those unwilling to learn, whose only intent is to try get others to finish the scripts they need, line by line. We see this happening way too often - someone with seemingly zero scripting skills does not react on-topic to the set of functions they can use that other users provide them, and does not seem to take any pushes in the right direction forward; they are just waiting for a collective effort from other scripters to develop what they want. This is what we do not want to see. Quote We tend to motivate you to raise up and at least try to script it by yourself, and the users on the Scripting board are generally happy to aid in every particular issue you come across while coding it. If you still try to let others move the work for you (almost) completely, do not be surprised when you are not getting that much of help from others. On 5/13/2017 at 11:27, Function said: addEventHandler("onPlayerFinish",root, function(rank,time) if rank == 1 then playSound(...) elseif rank == 2 then playSound(...) end ) Do you mean like this? From what I understand he means that there is a sound only when two specific players win. For example: there are players with nicks "David", "Mike" and "Robert". The sound plays only when "Mike" or "Robert" win, but when "David" wins there is no sound. Edited May 21, 2017 by koragg Atleast that's how I see it :D Link to comment
MadMaximus Posted May 29, 2017 Author Share Posted May 29, 2017 I'm a multimedia engineer with a msc for multimedia so I have 0 interest in coding. I just want to know how can I do that so I can use it for myself. And mta forum is a good place to get the help i needed. So thats why i posted here. And I bump the topic cuz I still didn't get the answer that I want. so why don't u stop been a jerk and help someone who is looking for a function for a change... Link to comment
koragg Posted May 29, 2017 Share Posted May 29, 2017 (edited) How about you read the rules and obey them for a change? We're not forced to help you, we do it by free will. And since you don't have an interest in coding that means you also don't have an interest in trying to fix the problem yourself. We help people here, not write whole scripts or waste days trying to fix someone else's problem...bump all you want, only thing you'll get is reputation of a guy who doesn't want to try make things by himself and only relies on someone else's knowledge. You'll understand me better once you read the rules (if you even do so). Edited May 29, 2017 by koragg Link to comment
MadMaximus Posted May 29, 2017 Author Share Posted May 29, 2017 (edited) 3 hours ago, koragg said: How about you read the rules and obey them for a change? We're not forced to help you, we do it by free will. And since you don't have an interest in coding that means you also don't have an interest in trying to fix the problem yourself. We help people here, not write whole scripts or waste days trying to fix someone else's problem...bump all you want, only thing you'll get is reputation of a guy who doesn't want to try make things by himself and only relies on someone else's knowledge. You'll understand me better once you read the rules (if you even do so). Well if someone like to help they will. I didn't ask your damn help. I don't give a damn about the reputation. if you think people should learn how to script just for a small function, there is no bigger idiot than you. And there are people who is willing to help someone who doesn't know scripting, So if you can't help take your monkey butt out. If they want to help they will, and if they don't want to help they will not so its time for you to take your nose out from the butt hole and do something useful for a change. Edited May 29, 2017 by MadMaximus Link to comment
Enargy, Posted June 22, 2017 Share Posted June 22, 2017 On 2017-5-29 at 13:37, MadMaximus said: I'm a multimedia engineer with a msc for multimedia so I have 0 interest in coding. I just want to know how can I do that so I can use it for myself. And mta forum is a good place to get the help i needed. So thats why i posted here. And I bump the topic cuz I still didn't get the answer that I want. so why don't u stop been a jerk and help someone who is looking for a function for a change... If you have zero interest in coding so do not write anything. We give support for everyone they need but people like you, calling other guys a jerk without other guys are not insulting, they don't deserve it. 1 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