Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

On registration user gets "points"

Ok, in my game I need to give the user startup money. They get his when they register. I would use the MySQL INSERET INTO command to insert the fixed number into the database to display later. How do I do this in Fusion? I'd know how to do it normally, but I don't know where to start in Fusion. Can I edit the register.php file? Also how would I select that certian user's stats from the table? So that when they go to the page that displays their "money" it shows "Unknown98's" money, or "Peter's" money?
Try www.starglowone.com. They have this thing called "User Gold". Edit the locales to suit your needs
Thanks, I'll check it out.
permission to check it out too :)
What? I accually ended up just creating it up from scratch, works like a charm :). I am still confused though as to where I would put the code in the register.php file that gives the user their startup "points".

Quote

Unknown98 wrote:
What? I accually ended up just creating it up from scratch, works like a charm :). I am still confused though as to where I would put the code in the register.php file that gives the user their startup "points".

Im guessing (because it's most logical) that you added a field to the PREFIX_users table, such as gold or something.

Upon registration, you add gold by looking for where other values are inserted into the database. Add your query in, and upon registration the account should have the gold. But remember, you'll have to add it to profile.php (I think that's it) if you want their gold to show in their profile..
Yes, what I did was add a field to the FUSION_users table, called money. Good tip about the profile, I might use it. Unless... are the profiles public? Ithink they are. It the profile is public, then that won't work, because players aren't supposed to know how much money each other has. I created a new page that shows all the player's stats, where they live in the game, how much money they have, how much strength, their weekly bills, etc etc. Thanks for the tip about where to add the code to, I'll look for it. I had already, but couldn't find it. Then again, it was midnight. :P
You can check if the profile viewed is the same as the user who's viewing it. If that's so, then you can display the amount of money.

so in short:

if profile_id=1 and viewer_profile_id=1 then {
display amount of money
}
Thread Information
Author
Replies
8 posts
Views
2,215 times
Last Post
Last updated on 11 years ago
You can view all discussion threads in this forum.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You cannot download attachments in this forum.