Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   help with levelup.php please (http://www.mysidiaadoptables.com/forum/showthread.php?t=1960)

Sensacionsk8 02-26-2011 05:47 PM

help with levelup.php please
 
Hi, I need someone to help me change the levelup.php.
I need is the money earned by an adoptable to click, what won the owner of adoptable. maybe I can help of Hall of Famer or someone else please.
excuse for English, but I'm using google translator

DragonTamerChris 02-26-2011 05:55 PM

Not to be rude but couldn't you have just bumped your old thread instead of making a new thread? People will try to help you as fast as you can, they just might have not found your thread yet. Making new topics just spams the forum.

I'm sorry I can't help you, I would if I could.

(Sorry to the mods if mini-modding is not allowed on the forums, I'm just simply stating a member oponion to this person.)

fadillzzz 02-26-2011 11:36 PM

I can only understand your first sentence. :ooo:
But I'm guessing that you want to make that only the owner of the adoptables will get money by clicking it... (is that correct?)
Also, if you're using google translate, try to use a proper sentence to get better result.

Sensacionsk8 02-27-2011 09:32 AM

Quote:

Originally Posted by fadillzzz (Post 15018)
I can only understand your first sentence. :ooo:
But I'm guessing that you want to make that only the owner of the adoptables will get money by clicking it... (is that correct?)
Also, if you're using google translate, try to use a proper sentence to get better result.

is correct.
sorry for this other issue, but I thought that in the previous post is not understood.

fadillzzz 02-27-2011 09:52 AM

Well first, we have to make the script check if the clicker is the owner before giving out the money and if it's not, don't give any.

open your levelup.php

find this code around line 231 - 236
PHP Code:

    // Start Rewards
                  
                  // ************************************************  
                  
                  
                  //Get currency on level up 

Add below
PHP Code:

if($owner == $loggedinname)


After that, find this
PHP Code:

                  $article_content $article_content "<div align='center'><br />You have earned "$amount ." Dollars for leveling up this Adoptable. <br />You now have  " $newbalance " Dollars.</div>"

below that, add the closing curly bracket
PHP Code:



hope this solves your problem :)

Sensacionsk8 02-27-2011 12:11 PM

thanks, but Not exactly, what I want is this:
PHP Code:

 $newclicks $totalclicks 1// Add 1 click to the current click total of this adoptable...
 
$newdollars $dollar 10//make it work
 // Actually insert our click information into the database...
 
$query "UPDATE ".$prefix."owned_adoptables SET totalclicks='".$newclicks."' WHERE aid='".$id."'";
 
mysql_query($query);
 
 
$query "UPDATE ".$prefix."users SET dollar='".$newdollars."' WHERE uid='".$uid."'";
 
mysql_query($query); 

I need this:
http://i51.tinypic.com/2ry645j.jpg

fadillzzz 02-27-2011 12:41 PM

Oh so what you mean was, everytime an adoptables receives a click, the owner of the adoptables get the money?
That's easy, just change this query from line 238
PHP Code:

                  $query "SELECT * FROM `".$prefix."users` WHERE `username`='$loggedinname'"

into this
PHP Code:

                  $query "SELECT * FROM `".$prefix."users` WHERE `username`='$owner'"

and on line 253, find this query
PHP Code:

                  mysql_query("UPDATE `".$prefix."users` SET `dollar`='" $newbalance "' WHERE `username`='$loggedinname'"); 

and change it into this
PHP Code:

                  mysql_query("UPDATE `".$prefix."users` SET `dollar`='" $newbalance "' WHERE `username`='$owner'"); 

I think that should do the trick..

Sensacionsk8 02-27-2011 01:44 PM

thanks for your help, you are the best


All times are GMT -5. The time now is 09:13 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.