This script knows the top family but it is not updating the King Pins name into the news nor is the King Pin recieving the goldcoins.
[php] $sql=“SELECT family, SUM(bank+cash) AS cnt FROM $prefix.user_characters WHERE family != ‘’ and family!=’~Steam-Wars-Societeh~’ GROUP BY family ORDER BY cnt DESC LIMIT 0,1;”;
$sql=mysql_query($sql);
if(@mysql_num_rows($sql)==0) {}
else {
while($temp=mysql_fetch_array($sql))
{
$fam = “King Pin”;
$uid = “SELECT uid, email FROM user_characters WHERE family =’”.$temp[family]."’ AND family_position=’".$fam."’";
$sql = “UPDATE users_goldcoins SET goldcoins=goldcoins+500 WHERE uid=’”.$uid."’";
$sql = mysql_query($sql) or die(mysql_error());
$sql = “INSERT INTO news
(to
, news
, timestamp
) VALUES (’”.$uid[‘email’]."’, '
Congratulations. You Have Won 500 B.D(s) For Finishing With The Top Faction. ', ‘$time’)";
$sql = mysql_query($sql) or die(mysql_error());
}}
$sql="SELECT familyname, drug_profit, creator FROM $prefix.families WHERE familyname != '' and familyname!='~Steam-Wars-Societeh~' GROUP BY familyname ORDER BY drug_profit DESC LIMIT 0,1;";
$sql=mysql_query($sql);
if(@mysql_num_rows($sql)==0) {}
else {
while($temp=mysql_fetch_array($sql))
{
$uid = "SELECT uid FROM user_characters WHERE nickname ='".$temp[creator]."'";
$sql = "UPDATE users_goldcoins SET goldcoins=goldcoins+500 WHERE uid='".$uid."'";
$sql = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO `news` (`to` , `news` , `timestamp`) VALUES ('".$uid['email']."', '<br>Congratulations. You Have Won 500 B.D(s) For Finishing With The Top Faction Smuggling Points. ', '$time')";
$sql = mysql_query($sql) or die(mysql_error());
}}
[/php]
In this script it is not fetching the users email or uid making it not update their email into the news nor give them their winning goldcoins.
[php] $nw2=“SELECT firstlegend FROM game_settings”;
$abc=mysql_query($nw2);
$cba=mysql_fetch_array($abc);
$uid = "SELECT uid, email FROM user_characters WHERE nickname ='".$nw2."'";
$asd=mysql_query($uid);
$dsa=mysql_fetch_array($asd);
$sql = "UPDATE users_goldcoins SET goldcoins=goldcoins+100 WHERE uid='".$dsa['uid']."'";
$sql = mysql_query($sql) or die(mysql_error());
$sql = "INSERT INTO `news` (`to` , `news` , `timestamp`) VALUES ('".$dsa['email']."', '<br>Congratulations. You Have Won 100 B.D(s) For Finishing As First Legend Of The Round. ', '$time')";
$sql = mysql_query($sql) or die(mysql_error());[/php]
This ius a similiar problem where it is not updating the owner of the newspaper companies email nor awarding them the goldcoins.
[php] $sql=“SELECT rank, owner, name FROM newspaper_company ORDER BY rank DESC LIMIT 0,1”;
$sql=mysql_query($sql);
if(@mysql_num_rows($sql)==0) {}
else {
while($temp=mysql_fetch_array($sql))
{
$uid = “SELECT uid, email FROM user_characters WHERE ‘nickname’ =’”.$temp[‘owner’]."’";
$ddd=mysql_query($uid);
$uidd=mysql_fetch_array($ddd);
$sql = “UPDATE users_goldcoins SET goldcoins=goldcoins+100 WHERE ‘uid’=’”.$uidd[‘uid’]."’";
$sql = mysql_query($sql) or die(mysql_error());
$sql = “INSERT INTO news
(to
, news
, timestamp
) VALUES (’”.$uidd[‘email’]."’, '
Congratulations. You Have Won 100 B.D(s) For Finishing With The Top Ranked Newspaper “.$temp[‘name’].”. ', ‘$time’)";
$sql = mysql_query($sql) or die(mysql_error());
}}[/php]
Someone please help me…