Jump to content
MakeWebGames

thebobby

Members
  • Posts

    171
  • Joined

  • Last visited

Everything posted by thebobby

  1. <? include 'dbcon.php'; include 'classes.php'; $randN = rand(1,25); $ng = mysql_query("SELECT * FROM numbergame WHERE number = {$randN} LIMIT 1") or mysql_error(); $g = mysql_fetch_array($ng); Send_Event($g['userid'],"<font color=green>Congratulations, You have won 25 points in the number game!</font>"); mysql_query("UPDATE `grpgusers` SET `points` = `points` + 25 WHERE `id` = '{$g['userid']}' LIMIT 1") or mysql_error(); mysql_query("UPDATE `numbergame` SET `userid` = 0") or mysql_error();   // kill of the hour $kf = mysql_query("SELECT * FROM `grpgusers` ORDER BY `hkills` DESC LIMIT 1") or mysql_error(); $kh = mysql_fetch_array($kf); $kill_class = new User($kh['id']); $amountofkills = $kh['hkills']; $killsid = $kh['id']; $reskill = "0"; Send_Event($killsid,"<font color=orange>Congratulations, You are the mobster of the hour and won 100 points!</font>"); mysql_query("UPDATE `grpgusers` SET `points` = `points` + 100, `hkills` = '$reskill' WHERE `id` = '{$kh['id']}' LIMIT 1") or mysql_error(); $inskills= mysql_query("INSERT INTO `hourfame` (`who`, `kills`)". "VALUES ('$killsid', '$amountofkills')") or mysql_error(); $resetthekills= mysql_query("UPDATE `grpgusers` SET `hkills` = 0") or mysql_error(); //other stuff $result = mysql_query("SELECT * FROM `grpgusers`"); $line = mysql_fetch_array($result, MYSQL_ASSOC); $updates_user = new User($line['id']); $result3 = mysql_query("SELECT*FROM `gangs` WHERE `crimetime` > '0'"); $worked3 = mysql_fetch_array($result3); $updates_gang = new Gang($worked3['id']); $newfreezehrs = $updates_user->freezehrs - 1; $newfreezehrs = ($newfreezehrs < 0) ? 0 : $newfreezehrs; $newmailbanhrs = $updates_user->mailbanhrs - 1; $newmailbanhrs = ($newmailbanhrs < 0) ? 0 : $newmailbanhrs; $newforumbanhrs = $updates_user->forumbanhrs - 1; $newforumbanhrs = ($newforumbanhrs < 0) ? 0 : $newforumbanhrs; $newgangcrime = $updates_gang->time - 1; $result = mysql_query("UPDATE `grpgusers` SET `sbbanhrs`='".$newsbbanhrs."', `forumbanhrs`='".$newforumbanhrs."', `mailbanhrs`='".$newmailbanhrs."', `freezehrs`='".$newfreezehrs."' WHERE `id`='".$updates_user->id."'"); $result = mysql_query("UPDATE `gangs` SET `crimetime`='".$newgangcrime."' WHERE `crimetime`!='0'"); ?>
  2. ya thats what i need to know. Dont know what needs to be in there for them
  3. i need to make a database for gang houses and for gang wars can some one help me i have code on game allready
  4. they r on cpanel they show on server as working but not on game as if i manually click on them in internet browser they work
  5. hour cron posted how u post that php source code all i know is to copy and paste it here for refills on bars
  6. errors gone from crons but still not working any ideas
  7. ok thats done so how long do i wait to see if it is working
  8. part of database.php //Function to handle database errors. function db_error($query, $errno, $error) { die('<font color="#000000">' . $errno . ' - ' . $error . ' ' . $query . ' <font color="#ff0000">[sTOP]</font> </font>'); } //Function to query the database. function db_query($query, $link = 'db_link') { global $$link;   $result = mysql_query($query, $$link) or db_error($query, mysql_errno(), mysql_error());   return $result;
  9. this is db php <? $conn = mysql_connect("localhost","mafiasti_loot","123xyz"); $db = mysql_select_db("mafiasti_grpg"); ?>
  10. actually my update for refill bars and number game
  11. hour cron <? include 'dbcon.php'; include 'classes.php'; $randN = rand(1,25); $ng = mysql_query("SELECT * FROM numbergame WHERE number = {$randN} LIMIT 1") or mysql_error(); $g = mysql_fetch_array($ng); Send_Event($g['userid'],"<font color=green>Congratulations, You have won 25 points in the number game!</font>"); mysql_query("UPDATE `grpgusers` SET `points` = `points` + 25 WHERE `id` = '{$g['userid']}' LIMIT 1") or mysql_error(); mysql_query("UPDATE `numbergame` SET `userid` = 0") or mysql_error();   // kill of the hour $kf = mysql_query("SELECT * FROM `grpgusers` ORDER BY `hkills` DESC LIMIT 1") or mysql_error(); $kh = mysql_fetch_array($kf); $kill_class = new User($kh['id']); $amountofkills = $kh['hkills']; $killsid = $kh['id']; $reskill = "0"; Send_Event($killsid,"<font color=orange>Congratulations, You are the mobster of the hour and won 100 points!</font>"); mysql_query("UPDATE `grpgusers` SET `points` = `points` + 100, `hkills` = '$reskill' WHERE `id` = '{$kh['id']}' LIMIT 1") or mysql_error(); $inskills= mysql_query("INSERT INTO `hourfame` (`who`, `kills`)". "VALUES ('$killsid', '$amountofkills')") or mysql_error(); $resetthekills= mysql_query("UPDATE `grpgusers` SET `hkills` = 0") or mysql_error(); //other stuff $result = mysql_query("SELECT * FROM `grpgusers`"); $line = mysql_fetch_array($result, MYSQL_ASSOC); $updates_user = new User($line['id']); $result3 = mysql_query("SELECT*FROM `gangs` WHERE `crimetime` > '0'"); $worked3 = mysql_fetch_array($result3); $updates_gang = new Gang($worked3['id']); $newfreezehrs = $updates_user->freezehrs - 1; $newfreezehrs = ($newfreezehrs < 0) ? 0 : $newfreezehrs; $newmailbanhrs = $updates_user->mailbanhrs - 1; $newmailbanhrs = ($newmailbanhrs < 0) ? 0 : $newmailbanhrs; $newforumbanhrs = $updates_user->forumbanhrs - 1; $newforumbanhrs = ($newforumbanhrs < 0) ? 0 : $newforumbanhrs; $newgangcrime = $updates_gang->time - 1; $result = mysql_query("UPDATE `grpgusers` SET `sbbanhrs`='".$newsbbanhrs."', `forumbanhrs`='".$newforumbanhrs."', `mailbanhrs`='".$newmailbanhrs."', `freezehrs`='".$newfreezehrs."' WHERE `id`='".$updates_user->id."'"); $result = mysql_query("UPDATE `gangs` SET `crimetime`='".$newgangcrime."' WHERE `crimetime`!='0'"); ?>
  12. <? include 'dbcon.php'; include 'classes.php'; $randN = rand(1,25); $ng = mysql_query("SELECT * FROM numbergame WHERE number = {$randN} LIMIT 1") or mysql_error(); $g = mysql_fetch_array($ng); Send_Event($g['userid'],"<font color=green>Congratulations, You have won 25 points in the number game!</font>"); mysql_query("UPDATE `grpgusers` SET `points` = `points` + 25 WHERE `id` = '{$g['userid']}' LIMIT 1") or mysql_error(); mysql_query("UPDATE `numbergame` SET `userid` = 0") or mysql_error();
  13. sorry but where i am not very script smart
  14. and that is in cpanel
  15. i have a problem with my new cons they only work if i manually do them. thay all come up with errors like these Notice: Undefined property: User::$speedoffense in /home/mafiasfi/public_html/classes.php on line 740 Notice: Undefined property: User::$speedoffense in /home/mafiasfi/public_html/classes.php on line 742 Notice: Undefined index: ban in /home/mafiasfi/public_html/classes.php on line 792 Notice: Undefined index: lastchase in /home/mafiasfi/public_html/classes.php on line 928 Notice: Undefined index: pet in /home/mafiasfi/public_html/classes.php on line 979 Notice: Undefined index: cost in /home/mafiasfi/public_html/classes.php on line 991 Notice: Undefined index: friends in /home/mafiasfi/public_html/classes.php on line 1007 Notice: Undefined index: enemys in /home/mafiasfi/public_html/classes.php on line 1009 Notice: Undefined index: sbban in /home/mafiasfi/public_html/classes.php on line 1013
  16. lol didnt know which one to put in
  17. Minute Hour Day Month Weekday Command Actions */5 * * * * curl http://hitmanmafia.com/updates1.php Edit Delete 0 0 * * * curl http://hitmanmafia.com/Day_Cron123CrOnNAhhsjFddgtS84nI.php Edit Delete 0 * * * * curl http://hitmanmafia.com/Hour_cRON_CHhourlycrontorunW88N.php Edit Delete
  18. Minute Hour Day Month Weekday Command Actions */5 * * * * curl http://hitmanmafia.com/updates1.php Edit Delete 0 0 * * * curl http://hitmanmafia.com/Day_Cron123CrOnNAhhsjFddgtS84nI.php Edit Delete 0 * * * * curl http://hitmanmafia.com/Hour_cRON_CHhourlycrontorunW88N.php Edit Delete
  19. Hello, i am looking for someone to help me with some grpg mods. example : user tags [user]id[*/user] dont work gang upgrades schooling
×
×
  • Create New...