Jump to content

why doesnt this work??


SirniNamaz

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...