Originally posted by godzilla
View Post
battle points error
Collapse
X
-
I know, but u just have to edit.. to change gamepluses to battlepoints. Just edit the function and ur mysql query. But the idea is the same so there should be no problem.
-
then try another variable instead ofOriginally posted by godzilla View Posti tried as u said but it not working.
the battle points showing 0 in profile now
$gpst
because you assigned it as an array variable in this query
maybe it will workPHP Code:$gpst = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'"));
Leave a comment:
-
i tried as u said but it not working.
the battle points showing 0 in profile now
Leave a comment:
-
try this
$gpst[0] = $gpst[0]+$ptg;
}else{
$gpst[0] = $gpst[0]-$ptg;
if($gpst[0]<0)$gpst[0]=0;
Leave a comment:
-
the coding which u given is for game plusess.
i need battle points.
anybody please help me.
my battle points doesnt updating
Leave a comment:
-
its from another script, havent tested it though.. just edit or check the tables to match yours.PHP Code://////////////////////////////////////////Give GPs
else if($action=="givegp")
{
addonline(getuid_sid($sid),"Giving Game Plusses","");
$who = $_GET["who"];
$ptg = $_POST["ptg"];
echo "<p align=\"center\">";
//$uid = getuid_sid($sid);
$gpsf = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$uid."'"));
$gpst = mysql_fetch_array(mysql_query("SELECT gplus FROM ibwf_users WHERE id='".$who."'"));
if($gpsf[0]>=$ptg){
$gpsf = $gpsf[0]-$ptg;
$gpst = $gpst[0]+$ptg;
$res = mysql_query("UPDATE ibwf_users SET gplus='".$gpst."' WHERE id='".$who."'");
if($res)
{
$res = mysql_query("UPDATE ibwf_users SET gplus='".$gpsf."' WHERE id='".$uid."'");
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Game Plusses Updated Successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>You don't have enough GPs to give<br/>";
}
echo "<br/>";
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo "</body>";
sorry, u need to change $gpsf to battle judges and also the table
Leave a comment:
-
battle points error
i want to increase battle points from 100 to 500 but it doesnt increases.it remains 100 only after updating battle points.it also show that battle points updated successfully but they not increasing. anybody please help me in this error
PHP Code://////////////////////////////////////////Give GPs
else if($action=="batp")
{
addonline(getuid_sid($sid),"Giving Game Plusses","");
$who = $_GET["who"];
$ptg = $_POST["ptbp"];
$giv = $_POST["giv"];
echo "<head>";
echo "<title>$sitename</title>";
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">";
echo "</head>";
echo "<body>";
echo "<p align=\"center\">";
//$uid = getuid_sid($sid);
$judg = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM ibwf_judges WHERE uid='".getuid_sid($sid)."'"));
$gpst = mysql_fetch_array(mysql_query("SELECT battlep FROM ibwf_users WHERE id='".$who."'"));
if(ismod(getuid_sid($sid))||$judg[0]>0)
{
if ($giv=="1")
{
$gpst = $gpst[0]+$ptg;
}else{
$gpst = $gpst[0]-$ptg;
if($gpst<0)$gpst=0;
}
$res = mysql_query("UPDATE ibwf_users SET battlep='".$gpst."' WHERE id='".$who."'");
if($res)
{
$vnick = getnick_uid($who);
if ($giv=="1")
{
$ms1 = " Added $ptg points to ";
}else{
$ms1 = " removed $ptg points from ";
}
mysql_query("INSERT INTO ibwf_mlog SET action='bpoints', details='<b>".getnick_uid(getuid_sid($sid))."</b> $ms1 $vnick', actdt='".time()."'");
echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Battle Points Updated Successfully<br/>";
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!<br/>";
}
}else{
echo "<img src=\"../images/notok.gif\" alt=\"x\"/>You can't do this<br/>";
}
echo "<br/>";
echo "<b>0 </b><a accesskey=\"0\" href=\"index.php?action=main&sid=$sid\"><img src=\"../images/home.gif\" alt=\"\"/>Home</a>";
echo "</p>";
echo "</body>";
}
Tags: None
Leave a comment: