jds137 Posted January 3, 2010 Posted January 3, 2010 Heres what I have done so far. Since I cant find a good loan shark mod for the life of me. It works, but isnt secure, and has some bugs. Anyone wanna pitch in and help? For the record, I am not the best coder, I am still learning. And I thank all in MWG for their help so far since I became a member. Since I am not as brilliant as most of you, for repayment fees, I was gonna add a cron to debit $200 a day for the loan. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Joshua Posted January 4, 2010 Posted January 4, 2010 A little bit of security added, shortened a few queries. Havent had a chance to test, but should work. if not i just missed a ' as i'm on a laptop >,< I hate em :P You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
Monkey644 Posted January 17, 2010 Posted January 17, 2010 A little bit of security added, shortened a few queries. Havent had a chance to test, but should work. if not i just missed a ' as i'm on a laptop >,< I hate em :P Hey I was wondering if you could look through your code please as i can not get it to work... Quote
AlabamaHit Posted January 21, 2010 Posted January 21, 2010 I was going to wait to post this cause it is late. but I did get it done. Let me know if you see any errors, or bugs. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. Quote
jds137 Posted January 24, 2010 Author Posted January 24, 2010 $db->query("UPDATE `users` SET `money` = `money` - 250 WHERE `loan` > 0", $c); I added to the day cron. Does anyone know of a way to be sure its payed back. Like maybe a house repo after x amount of days? Quote
AlabamaHit Posted January 24, 2010 Posted January 24, 2010 you don't need the $c in the query also, you should make sure they ahve money or come up with some other way cause if they have nothing then they will go into negative. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. This is just a simple idea. Not thought through. And not tested. Quote
Djkanna Posted January 27, 2010 Posted January 27, 2010 AlabamaHit: Printf() where and how you've used it is unneeded and ereg() has been deprecated. You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. ^ ^ Unneeded :) Quote
Zero-Affect Posted January 30, 2010 Posted January 30, 2010 i really hate the following => You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It's like the worst thing i've ever seen why not basically setup a table with a list of files which cannot be accessed while in hospital or jail explore.php bank.php and so on... then it would be simple You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I have not tested this idea and im sure there will be a downfall (i actually use this method on crimgame) but don't forget you need a database... with two columns one for the file and another for the caution enum would be best for the caution enum 'hospital', 'jail', 'jail/hospital'. Good luck and if you edit it please post your edits i'd love to see where this goes. Quote
Renkia Posted February 22, 2010 Posted February 22, 2010 Wow great. 8o But small problem.... QUERY ERROR: Unknown column 'loan' in 'field list' Query was UPDATE users SET loan = loan + 5000, money = money + 5000 WHERE userid = 1 I Was no good with these kind of things. Reserach shall be done. But if you have the code mind posting? :D Cheers Quote
Djkanna Posted February 22, 2010 Posted February 22, 2010 ALTER TABLE `users` ADD `loan` INT (11) NOT NULL in PhpMyAdmin Quote
Equinox Posted February 23, 2010 Posted February 23, 2010 i really hate the following => You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It's like the worst thing i've ever seen why not basically setup a table with a list of files which cannot be accessed while in hospital or jail explore.php bank.php and so on... then it would be simple You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I have not tested this idea and im sure there will be a downfall (i actually use this method on crimgame) but don't forget you need a database... with two columns one for the file and another for the caution enum would be best for the caution enum 'hospital', 'jail', 'jail/hospital'. Good luck and if you edit it please post your edits i'd love to see where this goes. Zero-Affect : not a single person comments :( Very nice Zero, you're a god Quote
Zero-Affect Posted February 23, 2010 Posted February 23, 2010 Or you know not :P ? Post count climbing - you'll have to do it properly to catch upto me darling ;) *kiss kiss* Quote
Djkanna Posted February 23, 2010 Posted February 23, 2010 i really hate the following => You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. It's like the worst thing i've ever seen why not basically setup a table with a list of files which cannot be accessed while in hospital or jail explore.php bank.php and so on... then it would be simple You're unable to view this code. Viewing code within this forum requires registration, you can register here for free. I have not tested this idea and im sure there will be a downfall (i actually use this method on crimgame) but don't forget you need a database... with two columns one for the file and another for the caution enum would be best for the caution enum 'hospital', 'jail', 'jail/hospital'. Good luck and if you edit it please post your edits i'd love to see where this goes. That's actually a nice way to go about it :) Or you know not :P Next time make sense... :P Quote
jds137 Posted February 25, 2010 Author Posted February 25, 2010 Ok folks, I must stop the thread hijack in progress, and get back to the original post. So has anyone got any thoughts for improvement on this mod. Quote
Zan Posted December 24, 2010 Posted December 24, 2010 i used alabama hits php code and Djkanna's Sql..and worked perfectly for me.... Quote
Dominion Posted December 24, 2010 Posted December 24, 2010 i used alabama hits php code and Djkanna's Sql..and worked perfectly for me.... You don’t need to post every time you use a mod... Quote
Zan Posted December 24, 2010 Posted December 24, 2010 im letteing ppl know that ..doing this way it will work...so that other newbies like me can do it more easier :P Quote
Dominion Posted December 24, 2010 Posted December 24, 2010 im letteing ppl know that ..doing this way it will work...so that other newbies like me can do it more easier :P You’re still bumping an old post where you really have no need. Please avoiding bumping older posts. 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.