Jump to content
MakeWebGames

peterisgb

Members
  • Posts

    738
  • Joined

  • Last visited

  • Days Won

    41

Everything posted by peterisgb

  1. i want to make a horse race, where people can bet on a horse and win or loose. i need a little help with a few of the actions. this is what i got so far <?php include "globals.php"; global $db,$ir,$r,$c,$userid,$h,$li; $db->query("UPDATE users SET lastpage='Race track' WHERE userid=$userid"); switch($_GET['action']) { case 'betonhorse2': do_betonhorse_change(); break; case 'racehorse2': do_racehorse_change(); break; default: tracks_home(); break; } function tracks_home() { global $db,$ir,$c,$userid,$h; $horsespeed1=rand(3, 15); $horsespeed2=rand(3, 15); $horsespeed3=rand(3, 15); $horsespeed4=rand(3, 15); print " <table bgcolor='white'><tr><td> <hr color='red' width='40%'><font color='red' size='+2'><center>1</center></font><hr color='red' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed1'><img src='images/horse.gif'></marquee> <br /> <hr color='blue' width='40%'><font color='blue' size='+2'><center>2</center></font><hr color='blue' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed2'><img src='images/horse.gif'></marquee> <br /> <hr color='green' width='40%'><font color='green' size='+2'><center>3</center></font><hr color='green' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed3'><img src='images/horse.gif'></marquee> <br /> <hr color='orange' width='40%'><font color='orange' size='+2'><center>4</center></font><hr color='orange' width='40%'> <marquee behavior='scroll' scrollamount='$horsespeed4'><img src='images/horse.gif'></marquee> </td </tr></table> "; } print ""; $h->endpage(); ?>
  2. nice one, thanks for trying it, at least it getting out there lol, illusions gave me a couple good tips on it.
  3. yeah i wanted to do that but i'm not that good at coding yet.
  4. well i just introduced a teams thing, which each team, odd ids and even ids are in two different teams, in my case its all odd ids are hackers and all even ids are police. the hackers attack the police and police attack hackers, maybe you could work on something along these lines, the basics of this are in the thread before this one. something along these lines but improved would be good, i found it make users more active and want to use the attack system more. gets them more involved and competitive. :) an idea :)
  5. thanks it worked like a charm, just another little help The default userlist pages, is there a way i can create another userlist and get it to display only Odd ID's or Even ID's?
  6. i'll tset it out and get back with the resaults
  7. so if i'm right like this? $db->query("UPDATE users SET sides=sides+1 WHERE userid={$ir['userid']} AND ((($ir['userid'] % 2) != 0)) AND (($r['userid'] % 2) == 0))) ",$c); or like this $db->query("UPDATE users SET sides=sides+1 WHERE userid=$userid AND (($ir['userid'] % 2) != 0))",$c); $db->query("UPDATE users SET sides=sides+1 WHERE userid=$userid AND (($r['userid'] % 2) == 0))",$c); or is that wrong.
  8. well in ODD userid attacks a EVEN user ID then that user will get a +1, and if an EVEN id attacks a ODD user id they get a +1 but if a EVEN ID user attacks and EVEN user id they dont get a +1 same with ODD attacking ODD Its battles with good and evil. odds being evil and even id are good, that system is there now but i cant figure this line out to add to attackwon.php etc.
  9. hello i need a little help with a sql which i'm not quite understand. could i have some help $db->query("UPDATE users SET sides=sides+1 WHERE userid={$ir['userid']}",$c); This is what i got so far, how would i get this formula to work like this sides +1 if (userid % 2) = 0"); and (userid % 2) <> 0"); so you only get a +1 if you are odd ID attacking Even ID and same vice versa.
  10. yeah, i cant use it as my useronline page has far to much info on, mines on this forum somewhere.
  11. could you put the system on a better file sharing site please.
  12. not bad, i used one like this long time ago, nice one for the add
  13. ii dont know, i've decided not to use it but just make my own lol.
  14. this dont seem to work for me.
  15. hello i am looking for a referral system which the person who referred a person would only receive there referral prize once the player they referred hit a certain level. I believe there use to be one in the free modification area but i am unable to find it either by looking through the forums and using the search Could someone put me in the right direction please Thanks in advance
  16. is there a way to stop users from refreshing on pages like crimes and gyms etc.
  17. its done now, i managed to get it sorted, thanks for the helps peps
  18. erm :s i kinda get you, i'm still learning,
  19. $de = $db->query("SELECT question, correct, prize, prizeamount FROM qotd WHERE id ORDER BY `id` DESC"); $qotd = $db->fetch_row($de); this works :) ty for the help, just need to sort the forms out now.
  20. $qotd=$db->query("SELECT * FROM `qotd` ORDER BY `id` ASC"); ??? and the where, well if i read this right   $qotd=$db->query("SELECT * FROM `qotd` WHERE `id` AND `question` AND `correct` ORDER BY `id` ASC"); ok databse query, select stuff from qotd and the where is asking which tables it needs info and order by the id ASC which erm... displays last question only? :s
  21. i added the auto id, as to the echo, i tried that but failed, not good at echos lol, but the question still aint displaying lol. $q=$db->query("SELECT * FROM qotd WHERE question AND correct"); if (!$q) { die(mysql_error()); } mysql_close($q); like that? This is what i have now, i've not put the die thingy as it didnt change anything lol <?php session_start(); include "globals.php"; global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT * FROM `qotd` WHERE id AND `question` AND `correct` ORDER BY `id` ASC"); print " <br /> <form name='form1' method='post' action=''> Todays Question: <font color='green'>{$q['question']}</font> <br /> Your Answer.<input name='answer' type='text' id='answer'><br /> <input type='submit' name='Submit' value='Submit'> </form> "; $dis = ""; if (isset($_POST['Submit'])) { $answer = $_POST['answer']; if($answer == "{$q['correct']}") { print"Correct, You have been awarded 1,000 Gold, <META HTTP-EQUIV=Refresh CONTENT='10; URL=questions.php'>"; $db->query("UPDATE users SET crystals=crystals+5000 WHERE userid=$userid"); $db->query("UPDATE users SET question=1 WHERE userid=$userid"); event_add("Well done, you got todays Question Correct, you Received 5,000 Gold"); } else { $db->query("UPDATE users SET question=1 WHERE userid=$userid"); event_add("Unlucky, you got today's question wrong"); $dis = "Unlucky, Try again tomorrow <META HTTP-EQUIV=Refresh CONTENT='10; URL=questions.php'>"; } } print ""; $h->endpage(); ?>
  22. i'm having some problems getting this script to work, not sure if its anything i am doing wrong but could someone point out my error. the database is set up correctly, table name is Question tables inside are question, correct which are varchar 255 My Prbblem seems to be its not selecting the info from the database and showing it. Well heres the code <?php session_start(); include "globals.php"; global $db,$ir,$c,$h,$userid; $q=$db->query("SELECT * FROM Question WHERE question AND correct",$c); print "<br /> <form name='form1' method='post' action=''> Todays Question: {$q['question']} <br /><br /> Your Answer.<input name='answer' type='text' id='answer'><br /> <input type='submit' name='Submit' value='Submit'> </form>"; $dis = ""; if (isset($_POST['Submit'])) { $password = $_POST['answer']; if($answer == "{$q['correct']}") { print"Correct, You have been awarded 1,000 Gold, <META HTTP-EQUIV=Refresh CONTENT='10; URL=questions.php'>"; $db->query("UPDATE users SET crystals=crystals+1000 WHERE userid=$userid"); $db->query("UPDATE users SET question=1 WHERE userid=$userid"); event_add("Well done, you got todays Question Correct, you Received 1,000 Gold"); } else { $db->query("UPDATE users SET question=1 WHERE userid=$userid"); event_add("Unlucky, you got today's question wrong"); $dis = "Unlucky, Try again tomorrow <META HTTP-EQUIV=Refresh CONTENT='10; URL=questions.php'>"; } } print ""; print ""; $h->endpage(); ?>
  23. i use this. you do no need no quieres.
  24. i dont know knowthing about javascript lol
  25. 2 = Iframes. Custom Criminal is in Iframe1. In Iframe 1 is, crime Name, Crime Brave and Crime Do Crime Do is then sent to Iframe2. But iframe 2 just says "You do not have enough Brave to perform this crime." In this case its not collecting the GET c from Iframe1 for Iframe2. How do i get the GET from Iframe2 to find the GET c from Iframe1. Help would be alot of help. thanks
×
×
  • Create New...