Jump to content
MakeWebGames

Recommended Posts

Posted

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.

Posted

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.

  • 2 weeks later...
Posted
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...
Posted

$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?

Posted

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.

Posted

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.

  • 4 weeks later...
Posted

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

Posted
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

Posted
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

  • 9 months later...
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...