Jump to content
MakeWebGames

sniko

Members
  • Posts

    2,210
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by sniko

  1. sniko

    Help?

    When you say "Does not work", can you expand...? What result does it give, if any Have you used the 'debug' feature (or die(mysql_error());)
  2. That is a very good design, indeed! How about, do it for the non-mobile, then a simple app to manage your team for your mobile :)
  3. A few questions, if I may...   Question 1 Do we have to supply our address, zip, phone number ETC? Question 2 How will you contact us, if we qualify?
  4. sniko

    iMakePlay.com

    Or direct it to orpgcreator until you think of a grounding idea? (That way the traffic won't become 'void')
  5. You haven't really 'sold' the game to us in your thread... (Remember, most of us are developers, not players) Exterior game needs visually updating Interior game needs visually updating Story line....? My reregistration message was blank Nothing really stands out to be unique I log-in, now what? I just train?   (I know it's ALPHA, but some things to think about before you go into BETA, perhaps...?)
  6. "Well you see, Norm, it's like this . . A herd of buffalo can only move as fast as the slowest buffalo. And when the heard is hunted, it is the slowest and weakest ones at the back that are killed first. This natural selection is good for the herd as a whole, because the general speed and health of the whole group keeps improving by the regular killing of the weakest members. In much the same way, the human brain can only operate as fast as the slowest brain cells. Now, as we know, excessive intake of alcohol kills brain cells. But naturally, it attacks the slowest and weakest brain cells first. In this way, regular consumption of beer eliminates the weaker brain cells, making the brain a faster and more efficient machine. And that, Norm, is why you always feel smarter after a few beers." - Drink more! :) Bit late, but, Happy Birthday
  7. Yeah, that's where you'd create another table of recent attacks, something like the following; revengeAttacks attacker victim time   Then, after each attack, do something along the following INSERT INTO `revengeAttacks` (`attacker`,`victim`,`time`) VALUES ($attacker, $victim, unix_timestamp()) Then, modify step 3, and look in the revengeAttacks table, and see if the attacker is equal to the _GET user id, and if it is, treat it as a revenge attack. Once the attack is done, remove the correct records from the table, and insert a new one
  8. No worries at all :) For further issues you may have, step away, clear your mind and re-build the solution from the ground up, disregarding what you've already done. I take this process when I have problems, and it works like a charm. Remember, the computer is stupid and only does what you tell it, so, write down what you've got to do, to solve the problem, in a format, like I've done above ;)
  9. Why not do the following; Add a column in `users`, lastAttackedBy After the attack is done, change the value of lastAttackedBy in the victims row, with the attackers ID When they go to attack, check to see if the user id (_GET) matches lastAttackedBy, and if it does, treat it as a revenge kill.
  10. How about this for a code generating?   // We've registered, and inserted into the database $userid = mysql_insert_id(); $code = gen_code( $user ); // Now insert $code into the database, using mysq_insert_id() to scour the table for the correct user mysql_query("UPDATE `table` SET `code`='{$code}' WHERE `primary_key`=". $user); // And now the function to generate the code function gen_code($user) { $time = $user . microtime(); $code = base_convert($time, 8, 16); $code = substr($code, 0, 10); return strtoupper($code); }   That way the code will always be unique, and the user id is involved.
  11. typo = spelling mistake, whilst typing, normally occurs when typing too fast
  12. It has come to my attention, whilst procrastinating, that some games, the ones I tested anyway, are still vulnerable to form editing, and being able to make, what I call 'blanks'. For example, I've made, on some sites (I apologize in advance, but I had to test, and put the word out, and help you become aware) I can do this, and so can many, by using their brain. Anyway, I'm unsure If I can post the process of how I do it on here, so I won't. I think this vulnerability came to eyesight a while back, but was never really addressed? Correct me If I am wrong.   Stop people from having blank names Stop people from having no gender   Open up preferences.php and find the following function. (On a game I tested, it had a hidden form input with the gender placed as the value, I simply replaced this value with something, which is not in the ENUM, thus having no gender) If your gender change function isn't something like the following, replace it. function conf_sex_change() { global $ir,$c,$userid,$h; if($ir['gender'] == "Male") { $g="Female"; } else { $g="Male"; } print "Are you sure you want to become a $g?<br /> <a href='preferences.php?action=sexchange2'>Yes</a> | <a href='preferences.php'>No</a>"; } function do_sex_change() { global $db,$ir,$c,$userid,$h; if($ir['gender'] == "Male") { $g="Female"; } else { $g="Male"; } $db->query("UPDATE users SET gender='$g' WHERE userid=$userid"); print "Success, you are now $g!<br /> <a href='preferences.php'>Back</a>"; }   Now to address the name 'blank' If you put or a UNIX command as your new name, it'll return a blank. So, find the do_name_change() function, and ensure the following; On the new name input variable; You've used htmlentities. You've ensured that the input is more than x chars and less than x chars. You've used trim. You've (optional) filtered down so html special codes aren't available to use.   Secure your dropdowns! You've stored the available options in an array. You've generated the options in some sort of loop. You've checked the input is in the array.   That's about it. All that I've gathered from procrastinating.
  13. I find football players are way overpaid for what they do, even behind the scenes. I think hospital workers, and people who support the country, soldiers and others, except those claiming rich MP's and economy ruining bankers, should get more pay. /rant. But, if I had to, I'd support Spurs, and I really don't care who wins to be honest :) But I'll agree with the OP, just to keep the moral and karma (A)
  14. Ok cool, another question, if I may? How come you're using an engine if you're seeking 2 programmers? Surely, and it'll be wise, to have the game designed from the ground up, meaning, no engine? This method may be time consuming in the short run, but in the long run, better as you've designed it, and it'll be unique :?
  15. Out of curiosity really....   - Is your friend part of this forum, if so can we have his/her alias? - What mafia game script? - Is it legal?
  16. True, but it will surely be in some sort of procurement policy, I.E not wasting their services (memory wastage) :?
  17. Personally, and this is directed at your post, I found it all quite hard to read, as it is not split in sections, but that's just my view. Also, I go to the drug lab, via 'Explore' I assume I've got the correct system, and I buy more drug lab space, getting this message.
  18. I'll do this, and not beat around the bush....   /* * UPDATE LOG * - conf_pri_change - select name is not logical, changed. - conf_pri_change - submit button value is not logical, changed. - conf_pri_change - allowed the option to be selected to what it is already - do_pri_change - useless code removed. - do_pri_change - secured _POST - do_pri_change - updated success notice */ function conf_pri_change() { global $ir,$c,$userid,$h; print "<h3>Page Privacy</h3> <form action='preferences.php?action=prichange2' method='post'> <select name='privacy' type='dropdown'> <option value='1' ". ($ir['pageprivacy'] == 1 ? "selected" : NULL) .">ON</option> <option value='0' ". ($ir['pageprivacy'] == 0 ? "selected" : NULL) .">OFF</option></select> <input type='submit' value='Change Privacy' /></form>"; } function do_pri_change() { global $db,$ir,$c,$userid,$h; $_POST['privacy'] = 1 ? 1 : 0; $db->query("UPDATE users SET `pageprivacy`=". $_POST['privacy'] ." WHERE userid=". $userid); print "Privacy ". ($_POST['privacy'] ? "is on" : "is off"); } }
  19. Psst. As you're, in your query, using $db and $userid, the only things you'd need to global, if any, would be; $db $userid Your first step is also incorrect, maybe re-read it? global $db,$userid; //If you HAVE to. $page = basename( $_SERVER['PHP_SELF'] ); $db->query("UPDATE users SET lastpage='{$page}' WHERE userid=$userid"); //As it was just set to attacking.   Now on user profile <?php [... user profile ...] echo 'Last Action ', $r['lastpage']; ?>   Comprende?
  20. Oooo thank you! :) I wanted the OP, and other readers, be aware of such things ;) (I also posted about memory wastage)
  21. Might want to add some insurance on that....   $colours = array("main","blue","red","green"); if( isset($_POST) ) { if( !in_array($_POST['layout'], $colours) ) { $_POST['layout'] = 'main'; } $_POST['layout'] = $_POST['layout'].'css'; // [..] show msg, update field. } else { // [...] foreach($colours as $c) { echo '<option value="', $c ,'.css">', $c ,' theme</option>'; }   This is so they can't save the webpage to their computer and change the source code, and execute it. For instance, change this line; <option value="blue.css">Blue Theme</option> To this; <option value="redUltraCoolMagic.css">Red Ultra Cool Magic</option> And then run it on their machine, thus making them not having a theme.... Just some insurance ;) Edit Also, as we all know, the stylesheets will end with .css, so why store '.css'? Say you have 1,000 users, that is (Math, please serve me correctly) .css - 4 bytes 4 bytes * 1000 = 3.90625 kilobytes But say you have 10,000 members, that is (Again, math, please serve me correctly) 4 byes * 10,000 = 39.0625 kilobytes That will be, x amount of memory, wasted. Just something to think about. (I know in the examples given, it's low, but consider if you're on a tight budget, as these 'mistakes', throughout your whole game, was wasting xMB, which not only uses more bandwidth, no matter if you've optimized your queries or not, but server storage space.... Yes. I may be being anal, but think about the top companies, for instance Google. 4 bytes * 1,000,000,000 = 3.7252903 gigabytes Get where I'm going....?
  22. Good luck on figuring it out :) (By table structure, I assume the table tag structure (<table>) etc...)
  23. $gangmsg = 'N/A'; if($r['gang'] >0) { //Profile page is in a gang $gangmsg = '<a href="gangs.php?action=view&ID=', $r['gang'] ,'">', $r['gangNAME'] ,'</a>'; } $gang = mysql_query("SELECT `gangNAME` FROM `gangs` WHERE ( (`gangPRESIDENT` = $userid) OR (`gangVICEPRES` = $userid) )"); if( mysql_num_rows($gang) ) { //The page viewer is the gang president, or vice if($r['gang'] > 0) { //Profile page is in a gang $gangmsg .= '<a href="yourgang.php?action=staff&act2=recruit&ID=', $r['userid'] ,'">Invite to Gang</a>'; } } echo 'Gang: ', $gangmsg;
  24. Why not something like this, and I've no knowledge with gRPG, but... (Insert database field - `layout`, TINYINT)   <?php $layout = array(1 => "blue.css", 2 => "red.css"); // Store css names in an array $layout = $layout[$user_class->layout]; // Search the array for the css file name ?> <link rel="stylesheet" href="styles/<?php echo $layout; ?>" type="text/css" />   I hope that makes sense. Oh, and I assumed the $user_class was fetch object, and the bluelayout/redlayout where the column names....
  25. sniko

    headers allready sent =(

    Try the suppress method @header( [...] ); Or, maybe try the meta refresh? <meta http-equiv="refresh" content="0; url=x" /> Also, remember when you use header or meta refresh put exit; straight after.
×
×
  • Create New...