Jump to content

[help]Rank System


[SR]mR.EmiN

Recommended Posts

function getPointRank(points) 
  local rank = "No Rank" 
  if points => 10000 then rank = "Super Mega Rank with 10000 or more points" 
  elseif points => 2000 then rank = "Super Rank with 2000-9999 points" 
  elseif points => 1000 then rank = "Rank with 1000-1999 points" 
  elseif points => 500 then rank = "Second Rank with 500-999 points" 
  elseif points => 0 then rank = "First Rank with 0-499 points" 
  end 
  return rank 
end 

how can i make rank system i use pointsystem data system xml pls helpme

Link to comment

1. Your code is wrong. Right one:

function getPointRank ( points ) 
  local rank = "No Rank" 
  if points >= 10000 then rank = "Super Mega Rank with 10000 or more points" 
  elseif points >= 2000 then rank = "Super Rank with 2000-9999 points" 
  elseif points >= 1000 then rank = "Rank with 1000-1999 points" 
  elseif points >= 500 then rank = "Second Rank with 500-999 points" 
  elseif points >= 0 then rank = "First Rank with 0-499 points" 
  end 
  return rank 
end 

2. Explain better what do you mean! Use http://www.ajaxtrans.com, that translator beats all others.

Edited by Guest
Link to comment
if (string.find(message,"!stats")) and not  (string.find(message," !stats")) then 
    local playerCash = loadPlayerData (source,"cash") 
    local playerPoints = loadPlayerData (source,"points") 
     local playerRank =  getElementData (source,"Rank") 
    setTimer(outputChatBox,50,1,getPlayerName (source) .. " #ffd700has " .. tostring(playerCash) .. "$ and " .. tostring(playerPoints) .. " points! He is Rank " .. tostring(playerRank) .. "!",getRootElement(),255,0,0,true)  

true ur code working, how do i rank command??

Link to comment

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