Curt Posted February 28, 2011 Posted February 28, 2011 Hello, I release simple mods for free from time to time as a way to pay back to the community that helped me when I first started. This is a simple crack the safe for points mod I made last year sometime... Basicly a player can pay x amount of points/crystals for a chance to guess the 3 digit combination to the safe. If they get the correct combination they get all the points in the safe. Once someone wins the combo resets to random numbers and they start over again :) I know its a simple mod but someone will use it ;) Cheers cracksafepoints.php You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Here is the SQL: You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
wereatwardotcom Posted February 28, 2011 Posted February 28, 2011 fun mod but it has some bugs For instance it doesnt keep track of the pot. also can you add it where game admins can see what the actual code is for testing purposes? Quote
Curt Posted February 28, 2011 Author Posted February 28, 2011 Hello, It does keep track of the pot in the database. Also if your admin account is userid #1 then it will show you the combonation when you view the page. if not then a small edit would allow you so ;) Thanks for the comments, Curt Quote
wereatwardotcom Posted February 28, 2011 Posted February 28, 2011 its not keep track of the pot on the game itself, and also I tried doing the edit and it still does not let me see the combo Quote
wereatwardotcom Posted February 28, 2011 Posted February 28, 2011 here is the error you have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE userid = 1' at line 1 Query was UPDATE users SET crystals=crystals+ WHERE userid = 1 Quote
Curt Posted February 28, 2011 Author Posted February 28, 2011 Did you run the SQL in your database ? Quote
wereatwardotcom Posted February 28, 2011 Posted February 28, 2011 yes I did there is something missing. Quote
Danny696 Posted February 28, 2011 Posted February 28, 2011 Wereat....please dont use the title it makes it harder to read. Also Curt, the problem is in your code, not the SQLs. I believe its line 49, the {$cs['....']} part. Quote
Curt Posted February 28, 2011 Author Posted February 28, 2011 hmm....not sure about that... {$cs['cracksafe_pot']} is the correct vairable.. I just tried it and the mod works fine for me... Quote
jay-dogg2009 Posted February 28, 2011 Posted February 28, 2011 add this to the database [mysql] INSERT INTO `cracksafep` ( `cracksafe_id` , `cracksafe_n1` , `cracksafe_n2` , `cracksafe_n3` , `cracksafe_pot` , `cracksafe_winner` , `cracksafe_when` , `cracksafe_active` ) VALUES ( NULL , '2', '3', '1', '0', '0', '0', '1' ); [/mysql] and this will work only reason it doesnt work is there is not an active game open Quote
Curt Posted March 1, 2011 Author Posted March 1, 2011 ah thanks for pointing that out ;) Top post updated :) Enjoy the mod guys, Curt Quote
jay-dogg2009 Posted March 1, 2011 Posted March 1, 2011 slight update cracksafe_when row is empty no time stamp used You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
wereatwardotcom Posted March 1, 2011 Posted March 1, 2011 works very nicely now. Thank you 100 times over! Quote
RookieNRG Posted March 2, 2011 Posted March 2, 2011 How easy would it be to keep list of winners, or even have display on the same page past winners Quote
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.