Jump to content

Newbie

Members
  • Posts

    208
  • Joined

  • Last visited

Everything posted by Newbie

  1. Newbie

    Another Q

    exports.scoreboard:addScoreboardColumn('Rank') addEventHandler("onPlayerLogin", root, function(_, account) local rankss = getAccountData(account, "Race Loses") if rankss then if (rankss >= 0) and (rankss <= 4) then setElementData(source,"Rank","R1") elseif (rankss >= 5) and (rankss <= 10) then setElementData(source,"Rank","R2") elseif (rankss >= 11) and (rankss <= 249) then setElementData(source,"Rank","R3") elseif (rankss >= 250) and (rankss <= 499) then setElementData(source,"Rank","R4") end end end) function checkRank ( player ) local rankss = getElementData(source, "Rank") outputChatBox( "Your rank:" ..rankss,player) end addCommandHandler ( "rank", checkRank ) I tryed to put a command in my rank script. But it doest work. In the scoreboard, it works and showing my rank.
  2. Newbie

    Doesn't work

    Thanks i will try other way
  3. Newbie

    Doesn't work

    1. It's defined in other file 2. 3. Could you please explain easier ?
  4. Newbie

    Doesn't work

    Where did i fail ? I'ma tryin to make a rank system. The script should get account data of Race Loses (another but working script) And when player types /rank Show his rank.
  5. Newbie

    Doesn't work

    function getPlayerRank (thePlayer) local raceLoses = getAccountData( account,"Race Loses" ) <= 0 ) then setElementData(thePlayer(), "Rank") "Noob" ) elseif (getElementData(thePlayer(), "Race Loses") <= 5 ) then setElementData(thePlayer(), "Rank") "Better that noob" ) elseif (getElementData(thePlayer(), "Race Loses") <= 10 ) then setElementData(thePlayer(), "Rank") "Better than grinch" ) function checkPoints ( player ) outputChatBox ( "rank: ".. Rank, player, 255, 255, 255 ) end addCommandHandler ( "rank", checkPoints ) I have 5 Race Loses, but the script doesn't do anything. Where the problems ? It should outputChatbox: rank: Better than noob
×
×
  • Create New...