Gochix Posted February 5, 2014 Author Report Share Posted February 5, 2014 vel viens lugums biedri.. ka var uzlikt ta piemeram jauzliek, lai parbauda ja status_fire_lord jau ir 1 tad izmet message kkadu, ja ir 0 tad aiziet talak viss ka parasti.. <?php include ("config.php"); if(isset($_POST['buy'])){ if(isset($_POST['item1'])){ $chaos_points = mysql_query("SELECT points FROM ibf_members WHERE id = $member_id") or die(mysql_error()); while($info = mysql_fetch_array( $chaos_points )) if ( $info['points'] >= 20 ) { mysql_query("UPDATE `ibf_members` SET `points` = `points` - 20 WHERE `id` = $member_id"); mysql_query("UPDATE `ibf_members` SET status_fire_lord = 1 WHERE `id` = $member_id"); // Daram kaut ko ar item1 echo "<center><b><font color=green>Pirkums veiksmīgs!</font></b></center>"; }else{ echo "<center><b><font color=red>Nepietiekami Chaos pointi!</font></b></center>"; } } } ?> Quote Link to comment Share on other sites More sharing options...
Kavacky Posted February 5, 2014 Report Share Posted February 5, 2014 $fire_lord = mysql_query("SELECT status_fire_lord FROM ibf_members WHERE id = $member_id") if ($fire_lord) { echo 'Bwah'; } else { echo 'Nah'; } Quote Link to comment Share on other sites More sharing options...
Gochix Posted February 5, 2014 Author Report Share Posted February 5, 2014 un kura vieta man vinu tur iestuket lai viss iet? Quote Link to comment Share on other sites More sharing options...
Kavacky Posted February 5, 2014 Report Share Posted February 5, 2014 Nu to tu izdomā, kurā brīdī vajag pārbaudīt, vai items jau ir nopirkts, pirms pirkt vēlreiz. Quote Link to comment Share on other sites More sharing options...
Gochix Posted February 5, 2014 Author Report Share Posted February 5, 2014 man vajag taja bridi pirms itemu perk,lai parbauda ja items jau nopirkts tad nelauj, ja nenopirkts tad palaiz talak un veic visas tas parbaudes vai ir pietiekami points utt;) Quote Link to comment Share on other sites More sharing options...
aaxc Posted February 5, 2014 Report Share Posted February 5, 2014 Es tik nesaprotu, kāda vella pēc tu mēģini uztaisīt kautkādu spēlīti pats, ja no programmēšanas neko nesaproti? Quote Link to comment Share on other sites More sharing options...
Gochix Posted February 5, 2014 Author Report Share Posted February 5, 2014 man nevajag speliti nekadu, tas irdomatsvienai spelei, viss kas atlicis ir taa parbaude vai jau ir nopirkts vai nav.. Quote Link to comment Share on other sites More sharing options...
Kavacky Posted February 5, 2014 Report Share Posted February 5, 2014 Es tik nesaprotu, kāda vella pēc tu mēģini uztaisīt kautkādu spēlīti pats, ja no programmēšanas neko nesaproti?Šis vīrs te kaut ko cenšas mācīties, pie tam dara to reti sakarīgā formā, nevis kā kaut kādi citi lohi. Re, tu jau pats atbildēji, kurā brīdī tev to pārbaudi vajag. Tad pakustini vēl nedaudz galvu un tur arī liec. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted February 5, 2014 Report Share Posted February 5, 2014 > Šis vīrs te kaut ko cenšas mācīties, pie tam dara to reti sakarīgā formā, nevis kā kaut kādi citi lohi. Šis vīrs iespaidīgi daudz arī zina, spriežot pēc Project Euler. Quote Link to comment Share on other sites More sharing options...
Gochix Posted February 5, 2014 Author Report Share Posted February 5, 2014 kaut ko viņš negrib palaist mani.. <?php include ("config.php"); if(isset($_POST['buy'])){ if(isset($_POST['item1'])){ $chaos_points = mysql_query("SELECT * FROM ibf_members WHERE id = $member_id") or die(mysql_error()); while($info = mysql_fetch_array( $chaos_points )) if ( $info['status_fire_lord'] = 0) { echo "<center><b><font color=RED>Tu tikko jau nopirki Fire Lord, pagaidi kad tas parādīsies tavā somā vai arī spēlē uzraksti .giveitems un tad nāc atpakaļ un pasūti velreiz ;)</font></b></center>"; } elseif ( $info['points'] >= 20) { mysql_query("UPDATE `ibf_members` SET `points` = `points` - 20 WHERE `id` = $member_id"); mysql_query("UPDATE `ibf_members` SET status_fire_lord = 1 WHERE `id` = $member_id"); // Daram kaut ko ar item1 echo "<center><b><font color=green>Pirkums veiksmīgs!</font></b></center>"; }else{ echo "<center><b><font color=red>Nepietiekami Chaos pointi!</font></b></center>"; } } } ?> uzliekot if ( $info['status_fire_lord'] = 0) { tad viņš mani palaiž tālāk un lauj nopirkt, bet uzliekot if ( $info['status_fire_lord'] = 1) { tad uzreiz izmet echo ta itka es butu nopircis, skatijos ieksh db tur staav 0.. Quote Link to comment Share on other sites More sharing options...
xPtv45z Posted February 5, 2014 Report Share Posted February 5, 2014 while($info = mysql_fetch_array( $chaos_points )) if ( $info['status_fire_lord'] = 0) { Tavuprāt, abos gadījumos notiek salīdzināšana? Quote Link to comment Share on other sites More sharing options...
Kavacky Posted February 5, 2014 Report Share Posted February 5, 2014 ">=" nevis "=>". Again. And again. Quote Link to comment Share on other sites More sharing options...
Gochix Posted February 5, 2014 Author Report Share Posted February 5, 2014 paldies ;) jau biju uzlicis to, ienaacu lai pateiktu ka nevajag vairs. bet Paldies tāpat :) 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.