Jump to content
MakeWebGames

AlabamaHit

Members
  • Posts

    1,308
  • Joined

  • Last visited

Everything posted by AlabamaHit

  1. event_add($topic['ft_owner_id'],"someone posted",$c); This?
  2. AlabamaHit

    Template Server

    As long as it is free templates your giving away if it is paid ones, I would remove that as quickly as possible. Kids on here "will" start stealing them.
  3. v1 is simply v2 without a lot of stuff.. and no database class......... (All new people, you do know that mccodes is just php.., not it's own language???? lol)
  4. type='password' type='name' That is the problem type='text' that is what they should be.
  5. Do something like this.. Make a table called daily_train 3 fields daily_train_id daily_train_userid daily_train_time   Add this query to your gym page for after they train.   $daily_check = sprintf("SELECT daily_train_id FROM daily_train WHERE daily_train_userid = %u",abs(@intval($ir['userid']))); $check = $db->query($daily_check); if($db->num_rows($check) > 0) { $daily = sprintf("UPDATE daily_train SET daily_train_time = unix_timestamp() WHERE daily_train_userid = %u",abs(@intval($ir['userid']))); $db->query($daily); } else { $daily = sprintf("INSERT INTO daily_train VALUES('', %u, unix_timestamp())",abs(@intval($ir['userid']))); $db->query($daily); }   Now to check at the top of the page (gym) add this   $allow_train_sprint = sprintf("SELECT daily_train_time FROM daily_train WHERE daily_train_userid = %u",abs(@intval($ir['userid']))); $allow_train = $db->query($allow_train_sprint); $allow_t = $db->fetch_row($allow_train); if($allow_t['daily_train_time'] < time() - 86400) { printf('Sorry, you can only train once a day.'); printf('[url="index.php"]> Go Home[/url]'); $h->endpage(); exit(); }   This is made very quick, and untested..
  6. If they want a mod they will post. If they don't then they obviously don't want a mod. You are spamming lol.
  7. you don't need the $c in the query also, you should make sure they ahve money or come up with some other way cause if they have nothing then they will go into negative.   $loan_get = $db->query("SELECT money FROM users WHERE loan > 0"); while($loan = $db->fetch_row($loan_get)) { if($loan['money'] >= 250) { $db->query("UPDATE users SET money = money - 250"); } else { //Put whatever you want to do to them if they don't have the 250 here. } }   This is just a simple idea. Not thought through. And not tested.
  8. Default one works. Only thing If you have not edited the code is the Users name doing the attacking. Does it have quotes in it? or something like that?
  9. It don't matter if it is code off of google. lol. We can NOT help without seeing the query in error. it would be the same as me asking your. What color shirt do i have on? lol
  10. Thanks for posting a screenshot. On a rating, i would give a 4/10. It is plain with <hr /> added. But, if it fits your game that is what matters. So for sya my engine i'm working on it would be the 4 but on yours could be a 20/10 :)
  11. Not enough information provided to help you. There is obviously something screwed with a query. But without a snippet of the code where the error is we can't help.
  12. Screenshot??? Don't post a game link. Why would someoen want to register to a sight to view a page, lol.
  13. We all get better everyday :D
  14. Yes. But you have to look at it differently. Just because I worked on a game. Don't mean I did all the code. He had more than one coder. And he tried to code himself. Trust me I didn't do that. Also. I don't see all codes when I code for a game. I get emailed Only that page. I fix it, and email it back. I don't see all their stuff. So I can't be called out for a page that I didn't do. Just because it was on a game I did work for. Know what I mean :)
  15. I was going to wait to post this cause it is late. but I did get it done. Let me know if you see any errors, or bugs.   <?php //Loanshark redone. //By AlabamaHit and some by Immortalthug include_once('globals.php'); if($ir['jail'] > 0 || $ir['hospital'] > 0) { printf('This page cannot be accessed while in the jail or hospital. '); printf('[url="index.php"]> Go Home[/url]'); exit(); } //Left this from Immortalthug. Just had to add a ','. $_GET['action'] = (isset($_GET['action']) && is_string($_GET['action'])) ? htmlentities($_GET['action'], ENT_QUOTES) : FALSE; if(!in_array($_GET['action'], array('borrow','repay','loanshark_main',''))) { printf('Sorry, it seems something went wrong. Go back and try again. '); printf('[url="loanshark.php"]> Go Back[/url]'); exit(); } switch($_GET['action']) { case 'borrow': borrow_money_start(); break; case 'repay': repay_money_start(); break; default: loanshark_main(); break; } function loanshark_main() { global $ir; //This is just the amount left they can borrow. I added to the end. So they can only see what they can borrow up to. $maxloan = $ir['level'] * 5000 - $ir['loan']; printf('<img scr="./images/loan-shark.jpg" height="200" width="600"> '); printf('<h3>Vinny Da Shark</h3>'); printf('How ya doin? '); printf('I hear you are looking to borrow some money! '); printf('Thats what I am here for. '); printf('For using me services all I ask for is a small fee of $200 bucks a day. '); printf('Dont line then GTFO!!! '); $current_loan = $ir['loan'] == 0 ? ('You do not currently have a loan. ') : ('You currently have a loan of $'.number_format($ir['loan']).'. '); printf($current_loan); printf('The max you can borrow is $'.number_format($maxloan).' '); printf('-[url="loanshark.php?action=borrow"]Borrow Money[/url] '); printf('-[url="loanshark.php?action=repay"]Repay Loan[/url] '); } function borrow_money_start() { global $ir,$db; //Add a post here, so one of those switches are not needed. $maxloan = $ir['level'] * 5000; if(isset($_POST['borrowed'])) { //Stops borrowing 1 dollar short and borrowing again. if($_POST['borrowed'] + $ir['loan'] > $maxloan) { printf('Sorry, you are trying to borrow more than your max amount allowed. '); printf('[url="loanshark.php?action=borrow"]> Go Back[/url]'); } else if(!ereg("[0-9]",$_POST['borrowed'])) //Only allow numbers. { printf('Sorry, it seems something went wrong. Please go back and try again. '); printf('[url="loanshark.php?action=borrow"]> Go Back[/url]'); } else { $update_user = sprintf("UPDATE users SET loan = loan + %u, money = money + %u WHERE userid = %u",abs(@intval($_POST['borrowed'])),abs(@intval($_POST['borrowed'])),abs(@intval($ir['userid']))); $db->query($update_user); printf('You just borrowed $'.number_format($_POST['borrowed']).' from the loan shark. '); printf('[url="loanshark.php"]> Go Back[/url] '); printf('[url="index.php"]> Go Home[/url]'); } } else { //Check if they have the max already. if($ir['loan'] == $maxloan) { printf('You have already taken out the max loan. You must pay it back before you can borrow more. '); printf('[url="loanshark.php?action=repay"]> Repay[/url]'); exit(); } $amount_left = $maxloan - $ir['loan']; //This is just the total of what they are allowed left to borrow. printf('The max amount you can borrow is $'.number_format($amount_left).' '); printf('You currently have a loan of $'.number_format($ir['loan']).' '); printf('<form action="loanshark.php?action=borrow" method="post">'); printf('Amount: <input type="text" value="'.$amount_left.'" name="borrowed" /> '); printf('<input type="submit" value="Borrow" />'); printf('</form>'); } } function repay_money_start() { global $ir,$db; //Again added post here to remove another switch that is not needed. if(isset($_POST['repayed'])) { //Stop from paying to much. if($_POST['repayed'] > $ir['loan']) { printf('Seems you are trying to pay back to much. '); printf('[url="loanshark.php?action=repay"]> Go Back[/url]'); } else if(!ereg("[0-9]",$_POST['repayed'])) //Only allow numbers. { printf('Sorry, it seems something went wrong. Please go back and try again. '); printf('[url="loanshark.php?action=repay"]> Go Back[/url]'); } else if($_POST['repayed'] > $ir['money']) //Check if they have enough money. { printf('Seems you do not have enough money to pay back that amount. '); printf('[url="loanshark.php?action=repay"]> Go Back[/url]'); } else { $update_user = sprintf("UPDATE users SET loan = loan - %u, money = money - %u WHERE userid = %u",abs(@intval($_POST['repayed'])),abs(@intval($_POST['repayed'])),abs(@intval($ir['userid']))); $db->query($update_user); printf('You just payed back the loan shark '.number_format($_POST['repayed']).'. '); printf('[url="loanshark.php"]> Go Back[/url]'); } } else { //Stop page if they don't have a loan. if($ir['loan'] == 0) { printf('It seems you do not have a loan. '); printf('[url="loanshark.php"]> Go Back[/url]'); } else { printf('You have a loan of $'.number_format($ir['loan']).' '); printf('<form action="loanshark.php?action=repay" method="post">'); printf('Amount: <input type="text" value="'.$ir['loan'].'" name="repayed" /> '); printf('<input type="submit" value="Repay" />'); printf('</form>'); } } } $h->endpage(); ?>
  16. I have never in my life used that combination.......... I think you have me confussed with someone else, lol
  17. Add the Database Class from v2 to v1?? Then you would never have to worry about it lol. And go even futher also. Make a page called globals.php and add all the top stuff then you wouldn't have to change to much lol.
  18. Think it was typo surely he ment 10 - 12 months before you have the basics. lol.
  19. Yeah I personally use debit card to put money on pay pal.
  20. You obviously look at things different. Of course they are differnt. They can be compared it is the sam ething. If you think it is ok for someone that has absolutely no idea what they are doing to get money from peopel that Expect them to know what they are doing is ok. Then you are a crook to. If you don't know what your doing you should NOT GET PAID FOR IT!!. It is just that simple. I didn't want to word it like that but guess no one is going to know what I'm talking about unless I do. And no it is not a personal attack. I just don't agree. If i played a game and donated 300 and it got screwed up cause the owner don't know anytyhing. Then I would be very mad. Cause they would have just screwed me. Don't look up to crooks and cons. Cause if you look up to KIDS that make money off a game by comign on here with a million questions and not knowing what they do they are crooks and you are looking up to the wrong peoople my friend. Simple short...If you can't do it don't. Can't swim, don't get in pool.. Can't drive, don't get in driver seat. Can't cook, get out of the kitchen. Can't code..."Don't" own a game. Very simple if you ask me. None of the games I ever owned was ever hacked. or exploited. So what you say is to an extent. But wouldn't say completely true.
  21. I'm against hackers and bug exploiters. But I agree. If you put a game online and get hacked it is 100% Your fault. You should NOT be trying to make money off somethign you have no idea how to do. If you can't secure then you can't code. If you can't code why should people pay you to play a game you made.? Not fair. If you think it is. Grow up. Cause it is not. Would you take your car to a person to rebuild the motor if they have never successfully changed the oil on a car before and expect to ahve to pay them? Well hell no. Same thing here just differenct senerio.
  22. The file itself must have permission to be written. I think 0777. But not 100% sure.
  23. What I did with my engine I'm working on. Is I just make a query to call what I need on each page. I didn't make a laggy page lol.
  24. It is all a personal preference. I persnally don't use it either. When I include a file i use include_once('filename'); No difference in it. Just all personal preference. And when converting somethign I just change the top crap to include_once('globals.php'); No reason to go and change all those query's even though it is easy with Replace All in notepad.. it is no way safer. Just go and look at the database class. How can it be it is nothing more than a function changing the mysql_ to $db-> there is no more security added into the database class.
×
×
  • Create New...