Castillo Posted May 26, 2013 Posted May 26, 2013 You want to take away exp from players that don't win?
murat66005 Posted May 26, 2013 Author Posted May 26, 2013 Game Loser Players And Winner Players Give Exp For Script Codes Give Me Please Sample Win Players : addEvent ( "onPlayerDestructionDerbyWin", true ) addEventHandler ( "onPlayerDestructionDerbyWin", root, function ( winner ) local randomExp = math.random ( 10, 30 ) exports [ "Level" ]:addPlayerEXP ( winner, randomExp ) outputChatBox ( getPlayerName ( winner ) .." has won ".. randomExp .." experience for winning the map!", root, 0, 255, 0 ) end ) LOSE PLAYERS??
Castillo Posted May 26, 2013 Posted May 26, 2013 addEvent ( "onPlayerRaceWasted", true ) addEventHandler ( "onPlayerRaceWasted", root, function ( ) local rank = tonumber ( getElementData ( source, "race rank" ) ) if ( rank and rank ~= 1 ) then local randomExp = math.random ( 5, 10 ) exports [ "Level" ]:addPlayerEXP ( source, randomExp ) outputChatBox ( getPlayerName ( source ) .." has won ".. randomExp .." experience for finishing ".. rank .."!", root, 255, 255, 0 ) end end )
murat66005 Posted May 26, 2013 Author Posted May 26, 2013 (edited) Bro Wrong Codes I want to tell 2.3.4.5.6.7.8.9.10 loser. The players will also give Experience How To Top 10 Map Winners Give To Exp ? Edited May 26, 2013 by Guest
Castillo Posted May 26, 2013 Posted May 26, 2013 addEvent ( "onPlayerRaceWasted", true ) addEventHandler ( "onPlayerRaceWasted", root, function ( ) local rank = tonumber ( getElementData ( source, "race rank" ) ) outputChatBox ( "Your rank is: ".. tostring ( rank ), source ) if ( rank and rank ~= 1 ) then local randomExp = math.random ( 5, 10 ) exports [ "Level" ]:addPlayerEXP ( source, randomExp ) outputChatBox ( getPlayerName ( source ) .." has won ".. randomExp .." experience for finishing ".. rank .."!", root, 255, 255, 0 ) end end ) Use that and tell me what it says on chat.
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