Jump to content

Redeem Code


Daniel.

Recommended Posts

So I'm currently creating a donation system for my current gamemode I was wonder if this will work to give a player a object such as `spawnVehicle` anyway here is the code

function onRedeemCode(thePlayer, commandName, code) 
    if not (code) then 
        outputChatBox("SYNTAX: /".. commandName .." [Redeem Code]", thePlayer, 125, 294, 14) 
    else 
        if code == "sodq-39jd-239j-230jd" then 
           --setPlayerMoney(thePlayer, 1000000)-- What thing tha twill happen 
    else 
        outputChatBox("This code is not in our code database, sorry.", thePlayer, 255, 0, 0) 
    end 
end 
addCommandHandler("redeemcode", onRedeemCode) 

Link to comment

You have a missing end.

function onRedeemCode(thePlayer, commandName, code) 
    if not (code) then 
        outputChatBox("SYNTAX: /".. commandName .." [Redeem Code]", thePlayer, 125, 294, 14) 
    else 
        if code == "sodq-39jd-239j-230jd" then 
           --setPlayerMoney(thePlayer, 1000000)-- What thing tha twill happen 
    else 
        outputChatBox("This code is not in our code database, sorry.", thePlayer, 255, 0, 0) 
    end 
  end 
end 
addCommandHandler("redeemcode", onRedeemCode) 

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