Fox261098 Posted July 9, 2016 Share Posted July 9, 2016 Hello i made a script when somone kills a other player he will get random money but i made it on tablet adn i cant test it can somone test it for me rmoney = { [1]=1210, [2]=6325, [3]=3629, [4]=2958, [5]=591, } money = math.random (1,5) function player_Wasted ( ammo, attacker, weapon, bodypart ) if ( attacker and attacker ~= source ) then givePlayerMoney ( attacker, rmoney[money] ) end end addEventHandler ( "onPlayerWasted", getRootElement(), player_Wasted ) Link to comment
Bean666 Posted July 9, 2016 Share Posted July 9, 2016 local rmoney = {1210, 6235, 3629, 2958, 591} function kill (killer, weapon, bodypart, loss) if (killer) then givePlayerMoney ( killer, rmoney[ math.random(#rmoney) ] ) end end addEventHandler ( "onPlayerWasted", getRootElement(), kill) Link to comment
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