SirniNamaz Posted August 19, 2012 Share Posted August 19, 2012 client function actBuyBD () playermoney = getPlayerMoney(source) hitsnum = toNumber(guiGetText(txtAmountBD)) drugpriceCan = hitsnum*264 drugpriceOpi = hitsnum*94 drugprice1 = drugpriceCan-1 drugprice2 = drugpriceOpi-1 if (guiRadioButtonGetSelected(rdoCannabisBD)) then if (playermoney > drugprice1) then playermoney=playermoney-drugpriceCan guiSetText(lblCannabis,guiGetText(lblCannabis)+toNumber(hitsnum)) else outputChatBox("No Money!") end end if (guiRadioButtonGetSelected(rdoOpiumBD)) then if (playermoney > drugprice2) then playermoney=playermoney-drugpriceOpi guiSetText(lblOpium,guiGetText(lblOpium)+toNumber(hitsnum)) else outputChatBox("No Money!") end end end addEvent( "actBuyBD", true ) addEventHandler( "actBuyBD", getRootElement(), actBuyBD) Link to comment
SirniNamaz Posted August 19, 2012 Author Share Posted August 19, 2012 nevermind found a sulution (it is actually 'tonumber', not 'toNumber' Link to comment
ernst Posted August 19, 2012 Share Posted August 19, 2012 nevermind found a sulution (it is actually 'tonumber', not 'toNumber' playermoney = getPlayerMoney(source) will never work. getPlayerMoney don't have a player argument client sided. Link to comment
Castillo Posted August 19, 2012 Share Posted August 19, 2012 It'll work, just that 'source' is not required. 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