Jump to content

Help: Advertisments


xXMADEXx

Recommended Posts

Hey, i have a script that i just made... For some reason it will not come out in green, it comes out in that default tan color. And i am not sure how to make it so that if the player dose not have $300 it wont work. It just goes into negative, and i dont wont that.

function ads(player,...) 
    local text = table.concat({...}, " ")  
    outputChatBox("Advertisment: ".. text .."!", 0, 100, 0) 
    takePlayerMoney(player, 300) 
end 
addCommandHandler("ad", ads) 

Link to comment
function ads(player,...) 
    local text = table.concat({...}, " ") 
    if (getPlayerMoney(player) >= 300) then 
        outputChatBox("Advertisment: ".. text .."!", root, 0, 100, 0) 
        takePlayerMoney(player, 300) 
    end 
end 
addCommandHandler("ad", ads) 

Link to comment
function ads(player,...) 
    local text = table.concat({...}, " ") 
    if (getPlayerMoney(player) >= 300) then 
        outputChatBox("Advertisment: ".. text .."!", root, 0, 100, 0) 
        takePlayerMoney(player, 300) 
    end 
end 
addCommandHandler("ad", ads) 

thank you!

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...