You sure? recheck code... or test next time...
$cr[0] = old credits
$hh = hours
new credits = $k
$k =
so ur code would add 2x old + for online time ^^Code:
$k = $hh * 10 + $cr[0];
Printable View
Sorry, now i see this var, but for what use 2 diff. queryes?=), when you can add old credits in update query? But, how i see,this topic created a long ago, an a think, what at that moment the creator knew the php so bad. Then, i think, there is no point in continuing the discussion. But, again, i dont recommend use it in public, it should be recoded=)
Works on MuWeb 0.9 ?
If you actually read the code, and change a few lines, it should work.
For example: mucore uses $core_db variable for SQL querys, while muweb uses a different one (you should find it on your muweb files.)...changing those kind of things will make the code work on muweb....but hey, dont ask me to do it for you....it means reading php files to understand completely how the code works, and then moving it to fit your web.
But it's always possible ;).
Best Luck.
Ian
Anyone can check this script?Quote:
<fieldset> <legend>ONLINE TO CREDITS EXCHANGER</legend><table align=center border=0 width=500><tr><td align=center>
<?
if(!isset($_SESSION['user_auth_id'])) { die("You need to be logged in."); }$name = $_SESSION['user_auth_id'];
$query = mssql_query("Select OnlineHours from MEMB_STAT where memb___id='$name'");
$hour = mssql_fetch_row($query);
$hours = $hour[0];
if(!isset($_POST['agree']))
{
?><form action="" method="post" name="module">
<table style="padding-left: 10px;" border="0" cellpadding="0" cellspacing="4" width="100%">
<tbody><tr>
<td align="left">Your Online Hours : <b><font color="#2e9e1b"><? if($hours == "") { $hours = "0"; } echo($hours); ?></font></b></td>
</tr>
<tr>
<td align="left">You Will Get : <b><em><? $k = $hours*10; echo($k); ?>
<font color="red">Credits</font></em></b></td>
</tr>
<tr>
<td align="left"><div align="right"><strong>
<input name="agree" type="submit" id="agree" value="Exchange">
</strong></div></td>
</tr>
</tbody></table>
</form>
<?
}
else
{
$name = $_SESSION['user_auth_id'];
$queryy = mssql_query("Select OnlineHours from MEMB_STAT where memb___id='$name'");
$hr = mssql_fetch_row($queryy);
$hh = $hr[0];
$mm = mssql_query("Select connectstat from MEMB_STAT where Memb___id='$name'");
$fmm = mssql_fetch_row($mm);
if($fmm[0] == "1")
{
die("<strong>You need to be <font color=red>OFFLINE</font> before you trade your hours.</strong>");
}
$credit = mssql_query("Select Credits from MEMB_CREDITS where memb___id='$name'");
$cr = mssql_fetch_row($credit);
$k = $hh * 10 + $cr[0];
mssql_query("Update MEMB_CREDITS set Credits='$k' where memb___id='$name'");
mssql_query("Delete from MEMB_STAT where memb___id='$name'");
$queryyy = mssql_query("Select OnlineHours from MEMB_STAT where memb___id='$name'");
$hrr = mssql_fetch_row($queryyy);
$hhh = $hrr[0];
echo("<strong>You have now <font color=red>".$k." Credits</font> and <font color=red>0</font> Online Hours</strong>");
}
?>
</td></tr></table></fieldset>
Cause it doesn't counts the online time of my players T.T
can u make a guide how to make it work, i still got 0 credits and 0 online hours, i am using MUENGINE FREE VERSION REPACK BY SCRIPTKID
and in mucore it still shows 0 online hours
is this module not working anymore ?
I've done from A to Z
Still got 0 credits & 0 hours !
WZ_DISCONNECT_MEMB from page 1 (TotalTime) doesn't disconnect some players some times. They still show on the server at Online Players even if they are not. ConnectStats remain 1 sometimes when players disconnect. Why ? :D I use the same WZ_DISCONNECT_MEMB from the page 1 of this topic.
Installed this module and added query sql. All done like in guide and comments but there is a problem:
http://i.imgur.com/JVXssbD.png
It does not count online hours.
In sql MEMB table TotalTime is okay it counts.
Help me with that. What would be a problem?
hope someone can assist me with this.
i want to create a wcoins info page like credits in mucore 1.0.8
but i really don't know how to define the wcoins to select from DB.
please help me with this
- - - Updated - - -
nevermind allready fixed this part now the ingamestore wont show my coins...but will fix that later
Thanks for good module.