jeremaniak Posted April 28, 2012 Posted April 28, 2012 whats up mind helping with some race script i am trying to make that when the player finishes 1st he gets 3000 dollars 2nd 2000 dollars and 3rd 1000 dollars but i just dont know on wich event and how to make the getPlayerRank work thanks in advance <3
Castillo Posted April 28, 2012 Posted April 28, 2012 I don't understand what do you mean. If I'm right, getPlayerRank is a exported function from race, if so, then you must use it like this: exports[ "race" ]:getPlayerRank ( thePlayer )
jeremaniak Posted April 28, 2012 Author Posted April 28, 2012 so is this possible if exports[ "race" ]:getPlayerRank ( thePlayer )== 1 then ? i dont know how to get the rank and if the rank = a value then give the money
Castillo Posted April 28, 2012 Posted April 28, 2012 I guess so, it should work. P.S: You must define 'thePlayer' of course.
Castillo Posted April 28, 2012 Posted April 28, 2012 I have no idea, I don't even know what are you trying to do.
jeremaniak Posted April 28, 2012 Author Posted April 28, 2012 i am trying to make when someone finishes 1st he gets 3000 dollars but i just need a example thanks
jeremaniak Posted April 28, 2012 Author Posted April 28, 2012 DM/DD otherwise i would use onPlayerFinish
Castillo Posted April 28, 2012 Posted April 28, 2012 You should add a custom event using triggerEvent on: "race/modes/destructionderby.lua" at function: "handleFinishActivePlayer" After it says: showMessage You add: triggerEvent ( "onPlayerDestructionDerbyWin", activePlayers [ 1 ] ) Then you can use this custom event.
jeremaniak Posted April 28, 2012 Author Posted April 28, 2012 So how to make it for the 2nd place and third ? Btw thanks already!!!!
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