Hendrickson Posted November 1, 2011 Share Posted November 1, 2011 It seems my users have found how to just paste attack.php?nextstep=1&ID=1&wepid=98 And attack from anywhere. How can I add a location check to the attack.php so they must be in the same location otherwise its die and (you must be in the same location to attack someone text) Quote Link to comment Share on other sites More sharing options...
gurpreet Posted November 1, 2011 Share Posted November 1, 2011 At least give it an attempt? Here's a hint: $ir['location'] Quote Link to comment Share on other sites More sharing options...
Hendrickson Posted November 2, 2011 Author Share Posted November 2, 2011 I'm no good at this coding stuff..... :( I haven't a clue to code what i want here. I thought it would have been default in the attack.php... Quote Link to comment Share on other sites More sharing options...
Neon Posted November 2, 2011 Share Posted November 2, 2011 Haven't a clue? um... maybe if($ir['location'] != OTHER LOCATION VAR) { // ahhh were not in same area, error out } else { // all is good } Quote Link to comment Share on other sites More sharing options...
chicka Posted November 2, 2011 Share Posted November 2, 2011 This should do it for you if ($youdata['location'] != $odata['location']) { print "You can only attack someone in the same location!<br /> <a href='index.php'>Back</a>"; $db->query("UPDATE users SET attacking=0 WHERE userid=$userid"); $h->endpage(); Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted November 2, 2011 Share Posted November 2, 2011 I'm no good at this coding stuff..... :( I haven't a clue to code what i want here. I thought it would have been default in the attack.php... Seriously why are you even attempting to setup up a game. Oh your not your getting everyone else to do the work you need for you. Unless you have a budget to pay coders with then I cannot see how your game is going to be any different from any other stock mccodes game. Quote Link to comment Share on other sites More sharing options...
ShadyCoco Posted November 2, 2011 Share Posted November 2, 2011 if($ir['location'] != $r['location']) { echo'noob.'; exit; else { //attack code here... } Quote Link to comment Share on other sites More sharing options...
gurpreet Posted November 2, 2011 Share Posted November 2, 2011 The game runs on 'this coding stuff' so if you have no clue, why spend $200 or whatever on a game? hmm.. Quote Link to comment Share on other sites More sharing options...
Hendrickson Posted November 2, 2011 Author Share Posted November 2, 2011 (edited) Harsh... Thanks for those that help. Its a game I took over. I'm only use to html and css. I dont and haven't coded php at all. I'm learning. How is the game different from the stock setup? There different design, css, graphics etc. Not all of us are masters of php. And we have to start from some where. Not I'm not trying to get stuff for free. I'm just sick of getting peoples paid help that later just want my ftp/cpanel accounts etc. The forum here seems a safer option. Apart from the hostility from some users. Thanks to those that help. Edited November 2, 2011 by Hendrickson Quote Link to comment Share on other sites More sharing options...
gurpreet Posted November 2, 2011 Share Posted November 2, 2011 If someone asks for your FTP/Cpanel tell them no? They can make the files that are necessary and send the altered files to you Quote Link to comment Share on other sites More sharing options...
Hendrickson Posted November 2, 2011 Author Share Posted November 2, 2011 If someone asks for your FTP/Cpanel tell them no? They can make the files that are necessary and send the altered files to you That's exactly what I do. But as of late 90% of people pm me for jobs are recent accounts and say they need ftp access or mysql. Which = I can't get anything done. Or try and send me code that includes stuff like user table "DROP" Quote Link to comment Share on other sites More sharing options...
gurpreet Posted November 2, 2011 Share Posted November 2, 2011 Always read through everything people send, and just say no then, and find someone more reliable. There's plenty of people here who are recognised for making quality mods. Just spend some time looking around and it'll be worth it.l Quote Link to comment Share on other sites More sharing options...
chicka Posted November 2, 2011 Share Posted November 2, 2011 Danny696 made a list of trusted coders. I suggest you find that thread and ask one of them. Most if not all of them come with good referrals, will code what you want and not ask you for your cpanel access. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.