-
Posts
3,137 -
Joined
-
Last visited
-
Days Won
35
Content Type
Profiles
Forums
Events
Everything posted by Djkanna
-
Take no notice of my action it was for testing purposes only add onclick='this.value=""' to your message field <input type='text' name='msg' id='textbox' size='50' class='inputback' onclick='this.value=""' /> So for example once someone enters a message and the message stays there so you have to erase what you last wrote to add new message using the code above would erase the text as soon as it's clicked.
-
I don't get it people on here post up full unedited Mc Codes scripts sometimes something is broken and we help them no problem and no questions asked. But none of you will give Coly010 the SQL for gangs that doesn't seem fair nor right..
-
<html> <head> </head> <body> <form action="#" method="post"> <input type="text" name="name" value="Enter Message" onclick="this.value=''" /> <input type="submit" value="Submit" /> </form> </body> </head> Works fine :), so if you click on the text box to type the 'Value which is set as Enter message;' dissapears...
-
For example you want to use like a message in the text box.. <form action="something.fileext" method="post"> <input type="text" name="message" value="Input your message here" onclick="this.value=''" /> <input type="submit" value="Submit" /> </form> My Javascript isn't so good but it might work onclick="this.value=''"
-
Show me an old game engine that isn't what you've said above and isn't like every other game engine out there...
-
switch($_GET['action']) { case 'add': add(); break; case 'Buy': Buy(); break; default: index(); break; } if (!in_array($_GET['action'], array('index', 'add'))) { echo('Invalid Command!'); exit($h->endpage()); } Wonder what would happen if I clicked Buy....
-
Yeah but mt_rand on (1,2) is really not something you should be bothered about you can use either with very little unoticable differences. Where as if you had a higher max then sure mt_rand may be suitable. But in this case rand is perfectly suitable.
-
I honestly like your simplicity approach well done my friend
-
As far as I know if you're using an array() you'd get an array to string PHP notice :-/ $list = "One,Two,Three"; // List // Explode $getList = explode(",", $list); echo $getList[0]; // One echo $getList[1]; // Two echo $getList[2]; // Three Hope this helps somewhat.
-
Good luck with it Kenjidev :)
-
In this case rand() would do and actually may have a speed difference aswell.
-
I'm pretty sure anyone can copyright something as long as they know the principle of copyrighting and what not allthough this isn't my subject of expertise but if you think about it there is a lot of products that are copyrighted by kids so I'm guessing so..
-
Oh a lawyer, do children have lawyers? Yes Children can get lawyers/solicitors/attorneys what ever you'd like to call them.
-
Edited again try that :)
-
Whoops edited the above post sorry about that.
-
That's fair enough when it shows right, I find it easier to debug and read once it's tabbed then again that's just personal preference ;)
-
$users = $db->query ( "SELECT u.`userid`, u.`username`, u.`level`, u.`hp`, u.`gang`, u.`location`, g.`gangname`, g.`gangPREF`, c.`cityname` FROM `users` u LEFT JOIN `gangs` g ON `gangID` = u.`gang` LEFT JOIN `cities` c ON c.`cityID` = u.`location` WHERE ( c.`cityID` = ".$ir['location']." ) " ); Try that untested though. If it does work you can use $u['cityname'] for something if you like :)
-
Fail at syntax highlighter but it was proper tabbed (my way of tabbing (tab key))
-
Not just a 'simple mistake' I redesigned it.. Your original code <?php // Mod Created By Mccodes V2 // Edited by Rasheed Saeed - Renkia // Copyright to Dev-community ([url]www.dev-community.net[/url]) // Contact me if any problems | [email][email protected][/email] include "globals.php"; $mpq=$db->query(" SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $mp=$db->fetch_row($mpq); $_GET['property']=abs((int) $_GET['property']); if($_GET['property']) { $npq=$db->query(" SELECT * FROM houses WHERE hID={$_GET['property']}"); $np=$db->fetch_row($npq); if($np['hWILL'] < $mp['hWILL']) { print "You cannot go backwards in houses!"; } else if ($np['hPRICE'] > $ir['money']) { print "You do not have enough money to buy the {$np['hrNAME']}."; } else { $db->query("UPDATE users SET money=money-{$np['hPRICE']},will=0,maxwill={$np['hWILL']} WHERE userid=$userid"); print "Congrats, you bought the {$np['hNAME']} for \${$np['hPRICE']}!"; } } else if (isset($_GET['sellhouse'])) { $npq=$db->query("SELECT * FROM houses WHERE hWILL={$ir['maxwill']}"); $np=$db->fetch_row($npq); if($ir['maxwill'] == 100) { print "You already live in the lowest property!"; } else { $db->query("UPDATE users SET money=money+{$np['hPRICE']},will=0,maxwill=100 WHERE userid=$userid"); print "You sold your {$np['hNAME']} and went back to your shed."; } } else { print "<center>[b]<u>Your current property:</u>[/b] <font color=red>[b]{$mp['hNAME']}[/b]</font> "; print "The houses you can buy are listed below. Click a house to buy it. "; if($ir['willmax'] > 100) { print "<a href='estate.php?sellhouse'> <u>Sell Your Property</u>?</a> "; } $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print " <table cellspacing=1 class='table'><tr style='background:gray;'><th><font color=black>House</th><th><font color=black>House Price</th><th><font color=black>House Will</th><th><font color=black>Buy?</th></tr>"; $hq=$db->query("SELECT * FROM houses WHERE hWILL>{$ir['maxwill']} ORDER BY hWILL ASC"); while($r=$db->fetch_row($hq)) { print "<tr><td><center>{$r['hNAME']}</a></td><td><center>\$$t".money_formatter($r['hPRICE'],'')."</td><td><center>{$r['hWILL']}</td><td><center><a href='estate.php?property={$r['hID']}'>Buy</center></tr>"; } print "</table>"; } } $h->endpage(); ?>
-
Hehe.. Thanks are you going to post yours up I'd like to see?
-
Fair enough not everyone likes my style lol. Thanks :)
-
Looking for Attack Page -See ScreenShot-
Djkanna replied to KyleH112's topic in Requests & In Production
[mccode v2.x] Attack List. (Request) -
Removed, may be back.
-
"I Hope they serve beer in hell" - if you havent read it, and enjoy laughing your ass off til you cry, this ones for you ;x The made a movie about it, but the book is 10x better. I hope it's fact not fiction :D
-
Thanks DjKanna i am Albenski i been coming on here for about a year trying to learn php to getmy game up and running i can do a few things just dont understand php at all but i think what little i know of php and with MWG website i can do quit a bit Ah you we're around when I was on leave lol, well again good luck with learning PHP and your game.