Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 08-04-2012, 01:56 PM
Blizzard's Avatar
Blizzard Blizzard is offline
Extreme Animal Lover
 
Join Date: Dec 2011
Location: Canada
Posts: 14
Gender: Female
Credits: 2,878
Blizzard is on a distinguished road
Default Viewing a Page Adds and/or Takes Away Money

First of all, I am really sorry if someone already asked this, I looked and couldn't find anything.

How can you make it so when a player views a page, a certain amount of their money is taken away or added?

I am really new to coding and trying to figure everything out. Thanks it advance. :)
__________________
Reply With Quote
  #2  
Old 08-18-2012, 11:28 AM
Derpstra's Avatar
Derpstra Derpstra is offline
Seamstress!
 
Join Date: Aug 2012
Location: Seattle, WA/Charlotte, NC
Posts: 26
Gender: Female
Credits: 5,153
Derpstra is on a distinguished road
Default

I'm not sure if you already got an answer to this since yet since you posted this question awhile ago, but since there are no replies yet, I'll give you the most basic script I can think of.

Quote:
<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("functions/functions_friends.php");
include("functions/functions_items.php");
include("inc/lang.php");
include("inc/bbcode.php");

//***************//
// START SCRIPT //
//***************//

$cashname = grabanysetting("cost");
$reward= 1;

if($isloggedin == "yes"){
changecash($reward, $GLOBALS['username'], $GLOBALS['money']);
$article_title = "Hello, {$username}!";
$article_content = "You have gained {$reward} {$cashname}.";
}
else{
$article_title = "You are not logged in!";
$article_content = "You must be logged in to view this page!";
}

//***************//
// OUTPUT PAGE //
//***************//

echo showpage($article_title, $article_content, $date);
?>
To change how much money they receive, just change the number after "$reward". :)
Reply With Quote
  #3  
Old 08-21-2012, 09:06 AM
Blizzard's Avatar
Blizzard Blizzard is offline
Extreme Animal Lover
 
Join Date: Dec 2011
Location: Canada
Posts: 14
Gender: Female
Credits: 2,878
Blizzard is on a distinguished road
Default

Thank you so much. :)
__________________
Reply With Quote
  #4  
Old 08-23-2012, 09:31 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,564
Hall of Famer is on a distinguished road
Default

Well I'd say use $loggedinname instead of $GLOBALS['username'] if you can. The superglobal arrays are both insecure and slow, I've actually gotten rid of all of them in the next release. It is convenient to use though, which is why we used to be doing it this way.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 08-25-2012, 09:23 AM
Blizzard's Avatar
Blizzard Blizzard is offline
Extreme Animal Lover
 
Join Date: Dec 2011
Location: Canada
Posts: 14
Gender: Female
Credits: 2,878
Blizzard is on a distinguished road
Default

Alright! Thanks :)
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need a bit of help with the viewing profile page :P parayna Questions and Supports 1 09-29-2014 03:01 PM
Menu bar disappears when viewing user profile? Aasixx Questions and Supports 8 08-19-2012 05:01 PM
Page that gives users money Derpstra Tutorials and Tips 0 08-18-2012 11:34 AM
New Page and Sending Money and Multi-adopt help rockingroses Questions and Supports 3 12-20-2011 10:34 AM
iiiPages - It only takes a click to bring your dream to life. Ryan Ranells Adoptables Sites Showcase 5 02-22-2009 12:19 AM


All times are GMT -5. The time now is 03:03 PM.

Currently Active Users: 9760 (0 members and 9760 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636