Mysidia Adoptables Support Forum  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-05-2010, 09:56 AM
Magnie's Avatar
Magnie Magnie is offline
Pythonic
 
Join Date: Dec 2009
Location: Polaris, the Planet
Posts: 34
Gender: Male
Credits: 5,392
Magnie
Send a message via ICQ to Magnie
Default Help: Change all users at once? [Answered]

Please move this to The Webmaster Bat-Cave, I put this in the wrong section, sorry!

( I may figure this out on my own :P ) Note: This isn't very related to the adoptable script, I'm making a game that is using the adoptable script as a... template you might say to run the game.

Okay, I am trying to make it so a user gets 100 Cash every five minutes, I've got it so the script/file will run every five minutes, I just can't get all the users getting 100 Cash. Only one user at a time, I'm trying to take the "User list" and have that update the user accounts resources, but, that doesn't seem to be working. :/ Here is the code that is suppose to be updating the users' resources:

PHP Code:
$query "SELECT * FROM ".$prefix."users";

$result mysql_query($query);



//Loop out code

$i=0;

while (
$i $num2) {


$user=@mysql_result($result,$i,"username");

$cash=@mysql_result($result,$i,"cash");

$metal=@mysql_result($result,$i,"metal");

$power=@mysql_result($result,$i,"power");

$fuel=@mysql_result($result,$i,"fuel");



$cashs $cash 100;
$metals $metal 75;
$powers $power 25;
$fuels $fuel 50;

$query "UPDATE ".$prefix."users SET cash='".$cashs."' WHERE username='".$user."'";

mysql_query($query);



$query "UPDATE ".$prefix."users SET metal='".$metals."' WHERE username='".$user."'";

mysql_query($query);



$query "UPDATE ".$prefix."users SET fuel='".$fuels."' WHERE username='".$user."'";

mysql_query($query);

$query "UPDATE ".$prefix."users SET power='".$powers."' WHERE username='".$user."'";

mysql_query($query);



$i++;


Any ideas? ( I know it says fuel, metal, power, and cash and that stuff, but as I said before, this is for a game that isn't related to adoptables. ;) )
Reply With Quote
 


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
How to change the oder of users adoptables? [Answered] Tezna Questions and Supports 3 12-04-2009 11:09 AM
nadopt.php Access Denied Message for users/guests [ANSWERED] arlecchina Questions and Supports 3 07-18-2009 01:48 PM
How do I change the Top 10 list to Top 20? [Answered] zhiichiro Questions and Supports 4 05-25-2009 08:38 PM
How to change alternate percentage? [Answered] lollicat Questions and Supports 1 05-23-2009 10:31 AM
change password and change email Blackmagic Questions and Supports 5 03-05-2009 03:13 AM


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

Currently Active Users: 598 (0 members and 598 guests)
Threads: 4,081, Posts: 32,025, 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