Jump to content

Help with getPlayerRank......?


jeremaniak

Recommended Posts

Posted

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

Posted

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 ) 

Posted

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

Posted

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.

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