Jump to content
MakeWebGames

nyjatt

Members
  • Posts

    5
  • Joined

  • Last visited

nyjatt's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. ok ill look into that but how will i put this code into mccodes v2? like how will i make it work? i dont know how to explain it very well sorry. how can i make it compatible?
  2. ok so how would i add to the crimes to the game cause i cant figure that out and this is the code i have for the crimes is this well formatted and is it compatiable?   <?php if ($_POST['Commit']){ $radiobutton=$_POST['radiobutton']; if ($radiobutton == "1"){ $crime_chance = rand(1,10); $crimetime1 = 10; $Crime_exp = rand(1,10); $Crime_money =rand(100,500); $timewait1=time()+ $crimetime1; $sql2="SELECT * from crimetimes WHERE name='$name'"; $result2=mysql_query($sql2); while($rows2=mysql_fetch_array($result2)){ // Start looping table row $timeleft1= $rows2['crime1']; $available1= $rows2['crime1a'];   $last1 = $timeleft1 - time(); if ($available1 == 1) { echo "You need to wait be fore you can do this crime"; }elseif ($crime_chance == 2){ echo "You fail HAHAHAHA"; $result = mysql_query("UPDATE crimetimes SET crime1a='1', crime1='$timewait1' WHERE name='$name'") or die(mysql_error()); }else{ $result = mysql_query("UPDATE crimetimes SET crime1a='1', crime1='$timewait1' WHERE name='$name'") or die(mysql_error()); $result = mysql_query("UPDATE users SET exp=exp+'$Crime_exp', money=money+'$Crime_money' WHERE name='$name'") or die(mysql_error());   echo "You Stole from a child and received $$Crime_money"; } } } } $sql2="SELECT * from crimetimes WHERE name='$name'"; $result2=mysql_query($sql2); while($rows2=mysql_fetch_array($result2)){ // Start looping table row $timeleft1= $rows2['crime1']; $timeleft2= $rows2['crime2']; $timeleft3= $rows2['crime3']; $timeleft4= $rows2['crime4']; $timeleft5= $rows2['crime5'];   $last1 = $timeleft1 - time(); $last2 = $timeleft2 - time(); $last3 = $timeleft3 - time(); $last4 = $timeleft4 - time(); $last5 = $timeleft5 - time(); }   if($last1 <= 0){ $result = mysql_query("UPDATE crimetimes SET crime1a='0', crime1='' WHERE name='$name'") or die(mysql_error()); } if($last2 <= 0){ $result = mysql_query("UPDATE crimetimes SET crime2a='0', crime2='' WHERE name='$name'") or die(mysql_error()); } if($last3 <= 0){ $result = mysql_query("UPDATE crimetimes SET crime3a='0', crime3='' WHERE name='$name'") or die(mysql_error()); } if($last4 <= 0){ $result = mysql_query("UPDATE crimetimes SET crime4a='0', crime4='' WHERE name='$name'") or die(mysql_error()); } if($last5 <= 0){ $result = mysql_query("UPDATE crimetimes SET crime5a='0', crime5='' WHERE name='$name'") or die(mysql_error()); }   ?>
  3. Thanks for the brave part im gonna try it out when I go on my computer. For the second part I mean like I want to add more categories for crime. (Not from the admin panel) like I want to add crimes that run on time then on brave. So yu have to wait like 30 seconds before you can do the crime again. Thanks in ahead
  4. Thanks for the brave part im gonna try it out when I go on my computer. For the second part I mean like I want to add more categories for crime. (Not from the admin panel) like I want to add crimes that run on time then on brave. So yu have to wait like 30 seconds before you can do the crime again. Thanks in ahead
  5. Hi I want to know how can I make it so that yu get 1 brave each minute no 1 every 5 minutes. And another question while I'm at it Ok well I want to add crimes that run under a time limit so if I make a section for gta: have 4 options there on what crime I can do ... choose 1 and commit the crime. If it pass or fails I have to wait x seconds to do it again and. Their is a ticker showing. I kind of know how to code the crime but the thing is how will I be able to add this to the game that's more of the question then how to code it. So to brief all that up how can I add a crime with a time ticker and how to reduce brave from 1 brave ea 5 mins to 1 ea minute.
×
×
  • Create New...