CraigF Posted March 30, 2007 Posted March 30, 2007 basicly i want to make another forum of currency, like Crystals and Money, i want to call it Credits, how do i make a currency called credits? and like i know how to make it so if someone spends like 1000 credits it takes the credits away mysql_query("UPDATE users SET credits=credits-1000 WHERE userid=$userid",$c); and i want it so in header.php it will say Money: {$fm} Level: {$ir['level']} Crystals: {$ir['crystals']} Credits: {$ir['credits']} but how do i make it so that credits are real things and they count up, once that is done all i will need to do is make is so you trade them, which is really easy and i can do with no help. so please help! Quote
ignite Posted March 30, 2007 Posted March 30, 2007 Re: Currency I think you would need to make a table in users called credits. Quote
Vorlen Posted March 30, 2007 Posted March 30, 2007 Re: Currency INSTRUCTIONS: Open your CPanel. Click "MySQL Databases" Click "PHPMyAdmin" Select your Database from Dropdown (if required) Click "users" Go to bottom of table and click where it says "Go" beside "Add another [___] row(s) to the table" On this screen, in the name section, call it "credits" From dropdown, select BIGINT Set value box to 20 Set default to 0 (or whatever number you wish for them to start with) Click "Go" You're not ready to use the $ir['credits']. Quote
CraigF Posted March 30, 2007 Author Posted March 30, 2007 Re: Currency when i have done that will the $ir['credits'] work? i will try this when my game is up and running, SOON! :D thanks! :D btw, by [___] row(s) what does [___] mean Quote
tittlemouse Posted March 30, 2007 Posted March 30, 2007 Re: Currency i havent worked out how to do token shops yet buy u can use them 4 pages by doing this if($ir['tokens'] > 0) { print "<h3>Page Title<h3/> <center> } else { print "Sorry you have no tokens, please come back when your tokens have refilled! > Back"; } mysql_query("UPDATE users SET tokens=tokens-1 WHERE userid=$userid",$c); so u can change to go on certain papes. Quote
CraigF Posted March 30, 2007 Author Posted March 30, 2007 Re: Currency lol, i know how to do it all now :D thanks Vorlen Quote
Akust0m Posted March 30, 2007 Posted March 30, 2007 Re: Currency Ya, Vorlen is spot on. Good thinking. Quote
CraigF Posted March 30, 2007 Author Posted March 30, 2007 Re: Currency Thanks, vorlen likes to make things harder! then could i use {$ir['credits']} to count how many credits people have? Quote
CraigF Posted March 30, 2007 Author Posted March 30, 2007 Re: Currency thanks alot! +1 for you :D even though you dont care about force Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.