Jump to content
MakeWebGames

[v2]Forum Credits w/ exchange[v2]


Halo

Recommended Posts

Before anyone asks i can't convert this from v2 to v1 because v1 dosn't come with forums.php

This is just like CE it gives you credits for every post you do and when you get enough credits you can exchange them for stuff.

SQL QUERY

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

First open forums.php

Find:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Add underneath:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

(NOTE: you can change the amount of credits they gain)

Then find:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

add underneath:

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then create a file called fctemple.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Add in veiwuser.php (OPTIONAL):

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Re: [v2]Forum Credits w/ exchange[v2]

$db->query("INSERT INTO `inventory` VALUES (NULL, '{$set['willp_item']}', '$userid', '1')");

print "You have traded 2500 forum credits for a will potion.";

 

should be

 

$db->query("UPDATE users SET fcredits=fcredits-2500 WHERE userid=$userid");

$db->query("INSERT INTO `inventory` VALUES (NULL, '{$set['willp_item']}', '$userid', '1')");

print "You have traded 2500 forum credits for a will potion.";

Link to comment
Share on other sites

Re: [v2]Forum Credits w/ exchange[v2]

 

$db->query("INSERT INTO `inventory` VALUES (NULL, '{$set['willp_item']}', '$userid', '1')");

print "You have traded 2500 forum credits for a will potion.";

 

should be

 

$db->query("UPDATE users SET fcredits=fcredits-2500 WHERE userid=$userid");

$db->query("INSERT INTO `inventory` VALUES (NULL, '{$set['willp_item']}', '$userid', '1')");

print "You have traded 2500 forum credits for a will potion.";

 

Oh yeah, thanks John1 for the fix. :)

UPDATED FIRST POST

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...