CheiN Posted July 22, 2012 Share Posted July 22, 2012 hey users i want see how to make a race scoring system if player rank== 1 givePlayerMoney 500 rank== 2 givePlayerMoney 400 rank== 3 givePlayerMoney 200 rank== 4-and-down givePlayerMoney 50 ------------------------------------------------points------------------- ok and i want see how to make a scoring system if rank== 1 give 50 points if rank== 2 give 40 points if rank== 3 give 30 points and add a column in the scoreboard with the points HELP ME PLZ IF YOU WANT AND CAN Link to comment
V3rniux Posted July 22, 2012 Share Posted July 22, 2012 Ok, so race with that type? DM or with Checkpoints? Cuz if with Checkpoints you should use event: onPlayerFinish. And if it is with maps such like as DD or DM try using onPlayerWasted. To get Rank use : exports.race:getPlayerRank() function Ranks() local Rank = exports.race:getPlayerRank(source) if Rank == 1 then givePlayerMoney(source, 500) elseif Rank == 2 then givePlayerMoney(source, 400) elseif Rank == 3 then givePlayerMoney(source, 200) else return end end addEventHandler("onPlayerFinish", getRootElement(), Ranks) function is simple, but I didn't tested.... btw if you want to make for DD and DM it will be something different.. Cuz you will need to make exportable 1 function example: function win(Player) local Rank = exports.race:getPlayerRank(Player) if Rank == 1 then givePlayerMoney(Player, 500) end end And then you must export this win function in destructionderby.lua : local win = export.YOURFILENAME:win(aliveplayers[1]) DD and DM is a bit harder to make for starters at lua scripting. 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