LabiVila Posted July 3, 2015 Posted July 3, 2015 The part where the error is: client: addEventHandler ("onClientGUIClick", sendB, function (selectedName, moneyAmount) local selectedName = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), 1) local yourMoney = getPlayerMoney (localPlayer) if selectedName then local moneyAmount = guiGetText (moneyInput) local moneyAmount = tonumber (moneyAmount) if moneyAmount then if yourMoney > moneyAmount then outputChatBox ("* You have sent "..selectedName.." an amount of "..moneyAmount.."$.", 255, 255, 255, false) takePlayerMoney (moneyAmount) triggerServerEvent ("takingPlayerMoney", getRootElement(), moneyAmount, selectedName) end end end end, false ) server: addEvent ("takingPlayerMoney", true) addEventHandler ("takingPlayerMoney", getRootElement(), function (amount, selectedName) local otherPlayer = getPlayerFromName (selectedName) outputChatBox (amount.." "..otherPlayer) -- I can replace this otherPlayer with selectedName but the purpose isn't really outputhing the name, I'll be giving money to otherPlayer end )
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