Jump to content
MakeWebGames

mxyi

Members
  • Posts

    49
  • Joined

  • Last visited

Everything posted by mxyi

  1. Oh, i just thought that the code that i was on about wud help him, he didnt ask for a new method just to get it working and thats what i did -.-
  2. huh? i only just quickly looked over it and mine isnt like that and i know html.. i just never used it with that :P then why doesent it work i just assumed it didnt change the color because of that sorry.. EDIT:and i had a thanks aswell? -.-
  3. lol i got it working thanks all the mysql_escape thing was the only thing wrong :D thanks dudes..
  4. <font color='blue'> that should be <font color=blue> i hope i helped :P
  5. mxyi

    Cron help

    Hello, i need some help with crons,i have all the crons working on my host but every week my accont gets suspended because of the 1 min cron, how do i run the quiries without using curl,like unix_timestamp method i saw it before but i couldnt find it by using search so can anyone help me :) thanks guys
  6. Nope it was free and dan, i got fatal error call to undefined function mysql_escape() on line 19 :(
  7. Will try it now, i assume it will work because dan is very helpfull and smart :D
  8. Hey guys, i found this mod that allows users to have theire own user card but the code doesent work i get the error Fatal error: Cannot redeclare class database in /home/bloodles/public_html/class/class_db_mysql.php on line 16 so can anyone help me fix it because it will be cool to have a player card for users :D dont worry about where it says image.png because i actauly have a backround image called that :P so all i need is someone to fix the code! please any help will do, im using mc codes v2 <?php //Coded By Eternal //www.deadlyghetto.net //Leave this please require "globals.php"; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_mysql.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; if(isset($_GET['id']) AND ctype_digit($_GET['id'])) { $id = mysql_escape(trim($_GET['id'])); } else {echo" Invalid Action";} if($id) { $query = sprintf("select level, username,money from users where userid = %u",$id); $result = mysql_query($query); $data = mysql_fetch_array($result); $info =" My Info \n {$data['username']} Level: {$data['level']} Cash: \$".number_format($data['money'])."\n http://www.domain.com/register.php?r=".$id.""; // Create a 300x100 image $im = imagecreatetruecolor(200, 100); $image = imagecreatefrompng('image.png'); // Get a background for jpg it is imagecreatefromjpg() imagealphablending($image, true); // setting alpha blending on ~~~ remove if not using png imagesavealpha($image, true); // save alphablending setting (important) ~~~ remove if not using png $black = imagecolorallocate($image, 0x00, 0x00, 0x00); // Path to our ttf font file //$font_file = './arial.ttf'; // Any type of TTF font can take place as it is defining it to an image. imagefttext($image, 13, 0, 20, 60, $black, $font_file, $info); // I S R L T C F TX /*************************\ I= Background image S= Font Size R= Right Border L= Left Border T= Top Border C Font Color* Colour F File to load eg.. arial.ttf TX Text Info */ // Output image to the browser header('Content-Type: image/png'); imagepng($image); imagedestroy($image); } else{echo" die";} ?> hope you guys can help! THANKS :D
  9. hey guys, i added a username color system wich allows donators to chose a name colour.. i need someone to make a code like on loggedin.php so when they log in it checks if theyre a donator if not it runs a query so it sets theire name color to NULL on the mysql tables if theire non-donator because some non donators still have theire color from when they set it when they were a donator or could i put this in cron_minute.php or is there a diffrent way? thanks :)
  10. you are deh uber leet! THANK YOU!
  11. i got a error QUERY ERROR: Unknown column 'red' in 'field list' Query was UPDATE users SET username_color=red WHERE userid=1
  12. hey i recently added a color change method for donators, i added username_color to the user SQL table here are the username color cases in preferences.php case 'colorchange2': do_color_change(); break; case 'colorchange': color_change(); break; and here is the code... function color_change() { global $ir,$c,$userid,$h; print "<h3>Change Name Color</h3> Below are a list of colors in which you can change your name to with an example of each.... <form action='preferences.php?action=colorchange2' method='post'> Color: <select name='color' type='dropdown'> <option value='lime'>None <option value='red'>RED <option value='blue'>BLUE <option value='green'>GREEN <input type='submit' value='Change color' /></form>"; } function do_color_change() { global $db,$ir,$c,$userid,$h; if($_POST['color'] == none) { $color = lime; } if($_POST['color'] == red) { $color = red; } if($_POST['color'] == blue) { $color = blue; } if($_POST['color'] == green) { $color = green; } $db->query("UPDATE users SET username_color=$color WHERE userid=$userid"); print "Name Color Changed!"; } and this happens : is there a way of adding a button to it so it can submit the info to the database? please help! i really need a button to submit the info the the database but i got no idea how to do it :( thank you!
  13. WOOP! i added the code 2 lined code in replace of the 1 line code n it worked :D thanks so much it fixed the online status too :D
  14. ah i see, because on the 'Time is now..' thing at the bottom of the screen its diffrent the mail one? is that the same problem? i think i understand could you fix me code for me? thanks im a newb at coding, thanks!
  15. ok sorry bout that wait i couldnt get onto my cpanel x/ heres viewuser.php <?php include "globals.php"; $_GET['u'] = abs((int) $_GET['u']); if(!$_GET['u']) { print "Invalid use of file"; } else { $q=$db->query("SELECT u.*,us.*,c.*,h.*,g.*,f.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN cities c ON u.location=c.cityid LEFT JOIN houses h ON u.maxwill=h.hWILL LEFT JOIN gangs g ON g.gangID=u.gang LEFT JOIN fedjail f ON f.fed_userid=u.userid WHERE u.userid={$_GET['u']}"); if($db->num_rows($q) == 0) { print "Sorry, we could not find a user with that ID, check your source."; } else { $r=$db->fetch_row($q); if($r['user_level'] == 1) { $userl="Member"; } else if($r['user_level'] == 2) { $userl="Admin"; } else if ($r['user_level'] == 3) { $userl="Secretary"; } else if($r['user_level'] == 0) { $userl="NPC"; } else {$userl="Assistant"; } $lon=($r['laston'] > 0) ?date('F j, Y g:i:s a',$r['laston']) : "Never"; $sup=date('F j, Y g:i:s a',$r['signedup']); $ts=$r['strength']+$r['agility']+$r['guard']+$r['labour']+$r['IQ']; $d=""; if($r['laston'] > 0) { $la=time()-$r['laston']; $unit="seconds"; if($la >= 60) { $la=(int) ($la/60); $unit="minutes"; } if($la >= 60) { $la=(int) ($la/60); $unit="hours"; if($la >= 24) { $la=(int) ($la/24); $unit="days"; } } $str="$la $unit ago"; } else { $str="--"; } if($r['last_login'] > 0) { $ll=time()-$r['last_login']; $unit2="seconds"; if($ll >= 60) { $ll=(int) ($ll/60); $unit2="minutes"; } if($ll >= 60) { $ll=(int) ($ll/60); $unit2="hours"; if($ll >= 24) { $ll=(int) ($ll/24); $unit2="days"; } } $str2="$ll $unit2 ago"; } else { $str2="--"; } if($r['donatordays']) { $r['username'] = "<font color=red>{$r['username']}</font>";$d="[img=donator.gif]"; } if($r['laston'] >= time()-15*60) { $on="<font color=green>[b]Online[/b]</font>"; } else { $on="<font color=red>[b]Offline[/b]</font>"; } print "<h3>Profile for {$r['username']}</h3> <table width=100% cellspacing=1 class='table'><tr style='background:gray'><th>General Info</th><th>Financial Info</th> <th>Display Pic</th></tr> <tr><td>Name: {$r['username']} [{$r['userid']}] $d User Level: $userl Duties: {$r['duties']} Gender: {$r['gender']} Signed Up: $sup Last Active: $lon Last Action: $str Last Login: $str2 Online: $on Days Old: {$r['daysold']} Location: {$r['cityname']}</td><td> Money: \${$r['money']} Crystals: {$r['crystals']} Property: {$r['hNAME']} Referals: "; $rr=$db->query("SELECT * FROM referals WHERE refREFER={$r['userid']}"); print $db->num_rows($rr); print " Friends: {$r['friend_count']} Enemies: {$r['enemy_count']} </td> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : ""; print "</td></tr> <tr style='background:gray'><th>Physical Info</th><th>Links</th><th>$sh</th></tr> <tr><td>Level: {$r['level']} Health: {$r['hp']}/{$r['maxhp']} Gang: "; if($r['gang']) { print "[url='gangs.php?action=view&ID={$r[']{$r['gangNAME']}[/url]"; } else { print "N/A"; } if($r['fedjail']) { print " [b]<font color=red>In federal jail for {$r['fed_days']} day(s). {$r['fed_reason']}</font>"; } if($r['hospital']) { print " [b]<font color=red>In hospital for {$r['hospital']} minutes. {$r['hospreason']}</font>[/b]"; } if($r['jail']) { print " [b]<font color=red>In jail for {$r['jail']} minutes. {$r['jail_reason']}</font>[/b]"; } print "</td><td>[[url='mailbox.php?action=compose&ID={$r[']Send Mail[/url]] [[url='sendcash.php?ID={$r[']Send Cash[/url]] "; if($set['sendcrys_on']) { print "[[url='sendcrys.php?ID={$r[']Send Crystals[/url]] "; } if($set['sendbank_on']) { if($ir['bankmoney'] >= 0 && $r['bankmoney'] >= 0) { print "[[url='sendbank.php?ID={$r[']Bank Xfer[/url]] "; } if($ir['cybermoney'] >= 0 && $r['cybermoney'] >= 0) { print "[[url='sendcyber.php?ID={$r[']CyberBank Xfer[/url]] "; } } print " [[url='attack.php?ID={$r[']Attack[/url]] [[url='contactlist.php?action=add&ID={$r[']Add Contact[/url]]"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { print " [[url='jailuser.php?userid={$r[']Jail[/url]] [[url='mailban.php?userid={$r[']MailBan[/url]]"; } if($ir['donatordays'] > 0) { print " [[url='friendslist.php?action=add&ID={$r[']Add Friends[/url]] [[url='blacklist.php?action=add&ID={$r[']Add Enemies[/url]] "; } print "</td><td>"; if($ir['user_level'] == 2 || $ir['user_level'] == 3 || $ir['user_level'] == 5) { $r['lastiph']=@gethostbyaddr($r['lastip']); $r['lastiph']=checkblank($r['lastiph']); $r['lastip_loginh']=@gethostbyaddr($r['lastip_login']); $r['lastip_loginh']=checkblank($r['lastip_loginh']); $r['lastip_signuph']=@gethostbyaddr($r['lastip_signup']); $r['lastip_signuph']=checkblank($r['lastip_signuph']); print "<h3>Internet Info</h3><table width='100%' border='0' cellspacing='1' class='table'> <tr><td></td><td class='h'>IP</td><td class='h'>Hostname</td></tr> <tr><td class='h'>Last Hit</td><td>$r[lastip]</td><td>$r[lastiph]</td></tr> <tr><td class='h'>Last Login</td><td>$r[lastip_login]</td><td>$r[lastip_loginh]</td></tr> <tr><td class='h'>Signup</td><td>$r[lastip_signup]</td><td>$r[lastip_signuph]</td></tr></table>"; print "<form action='staffnotes.php' method='post'> Staff Notes: <textarea rows=7 cols=40 name='staffnotes'>{$r['staffnotes']}</textarea> <input type='hidden' name='ID' value='{$_GET['u']}' /> <input type='submit' value='Change' /></form>"; } else { print ""; } print "</tr></table>"; } } function checkblank($in) { if(!$in) { return "N/A"; } return $in; } $h->endpage(); ?> what other files do you need? :S
  16. Ok il try getin them now,
  17. I dont get error messages just it says im ofline when im not and the 'last action' part always says 4 hours not like 0 secs :(
  18. on the staff online section it says Ryan (4 hours) why does it say 4hours? it also says on my profile 'Offline' When i am online but on explore > users online it says who is actualy online, can someone help me fix this? thanks!
  19. just a little freebie one :P
  20. Hey Guys, I have created a new mafia game with mccodes v2 (america wars) its a new game isnt up fully yet but we despritally need a blackish redish mafia theme, ill be happy to use any theme thats mafiaish :P my freinds making a banner so we dont need a banner, also could you tell me how to add the theme? i dont see a styles.css D; thanks!
  21. crons oh they dont? do you know anywere we can host the crons online wich includes the 1min cron for free? thanks
  22. me and him are working on the crons now :) thanks alot guys btw were using 000webhost and mccv2 ;D
  23. i already have its just i dont understand how they work ;(
  24. Hello, my freinds game is called penguin mafia, its not 100% set up yet and we need some help, first thing is that energy/will/brave/health does not regain and also things that you can do daily (lucky boxes ect..) does not reset, and days played doesnt count either,ive noticed that its all to do with time,like the hospital and jail minutes dont go down,so anyone know why the time doesent work? i very aprecitate any awnsers thanks :) Mx-Yi Our Progress - |||||||||| 10% ;D
×
×
  • Create New...