Jump to content
MakeWebGames

Recommended Posts

Posted

Re: Burn House for V2

this aswell

While searching through the abandoned warehouse, you knock over a stack of shelves which fall on top of you. You start screaming for help and 10 minutes later the cops arrive. They take you away to the jail for 90 for breaking and entering.

Go to JailQUERY 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 '`warehouse` = `warehouse` + '1' WHERE `userid` = ('2')' at line 2

Query was UPDATE `users` SET `jail` = '90' `warehouse` = `warehouse` + '1' WHERE `userid` = ('2')

Posted

Re: Burn House for V2

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

this aswell

While searching through the abandoned warehouse, you knock over a stack of shelves which fall on top of you. You start screaming for help and 10 minutes later the cops arrive. They take you away to the jail for 90 for breaking and entering.

Go to JailQUERY 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 '`warehouse` = `warehouse` + '1' WHERE `userid` = ('2')' at line 2

Query was UPDATE `users` SET `jail` = '90' `warehouse` = `warehouse` + '1' WHERE `userid` = ('2')

Posted

Re: Burn House for V2

where do i put this

$db->query(sprintf("UPDATE `users` SET `money` = `money` + '%d',

`warehouse` = `warehouse` + '%d'

WHERE `userid` = ('%u')",

$cash, 1, $userid));

Posted

Re: Burn House for V2

Sorry all for not replying. I got back from Belgium yesterday and didn't have time to go onto the computer at all. I'll post the fix on here when I can. Plus, I added a new outcome or two. I might try to code in a repair feature, that doesn't allow the user who's house has been burned down to train or sell their house until they've fixed/repaired their house. :)

 

And thank you z-e-r-o. :) I'm still a newbie coder, so I'll agree it's not best. ;)

Posted

Re: Burn House for V2

OK. I believe this one should work. :) I've tested it and haven't found any errors. But since there are quite a few outcomes, I may have missed an error, but hopefully not. ;)

Here it is:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Make sure you've run the SQLs and cron as well. :)

Posted

Re: Burn House for V2

how do i make it so once u burned down there house they lose it i added the mod got no error's but they still keep they home after successfully burning it down is there a way to make them lose it

Posted

Re: Burn House for V2

Would you want that as a possible outcome to join the other outcomes or that it is guaranteed to make the other user lose their house? If you were to have that, you'd have to make it a lot harder for somebody to burn down another's house, otherwise the users would get rather annoyed that they keep losing their very expensive house, if they have one. ;)

Posted

Re: Burn House for V2

yh mate id like to try and make it part of the other out comes but if its possible make them lose it but then add a link to have it fixed for a certain price of game money but that is if its possible to do

Posted

Re: Burn House for V2

OK. I was going to add something to the one I posted but never got round to it: The user has to repair their house every time their house is burned down. While their house is damaged, they can't sell their house or train. The user would have to repair their house by paying a repair fee, which could be changed easily.

This wouldn't be a new outcome. I'd just have to update the queries in this mod, update the sell function in the estate.php and update the gym.php.

I'll see what I can do. It shouldn't be too hard. ;)

Posted

Re: Burn House for V2

I came about mine doing it a different way war_hero

Where you have made cases, i decided differently...

 

I made the items "Petrol" and "Lighter" which you can only in crimes for 8-9 brave....

Then added code so it says "You need petrol and a lighter before you can burn someone's house down"

Then when you do have the Lighter and Petrol, you may proceed to burning the house down...

Posted

Re: Burn House for V2

I like your idea radio_active. :) That, too, is a good way of making it.

Right, I think I've finished it now.

Now, when you burn down another user's house, they will have to repair it before they can sell it, buy a new house or train.

If you haven't done so already, create a file called burnhouse.php and paste this into it:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then add this under include "globals.php"; in gym.php and estate.php:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then, run this SQL:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

NOTE: If you haven't run the SQLs from my first post, you'll have to do so before this will work.

 

The price for burning down a house and repairing a house can easily be changed, but if you need help, just send me a message and I'll reply to it as soon as possible. :)

Plus, if you find any errors, please post them and I'll fix them as soon as possible as well. I've tested it and it works fine. :) Although, you may need to change the £ signs to $ signs. ;) (If you use $'s in your game.)

Posted

Re: Burn House for V2

 

nice similar to mine but more work added in mine but still nice mate good job, i personally would use this if i had no money to buy mine

Thanks. :) I'm still a newbie to PHP, so I'm still learning. :-P

  • 1 month later...
Posted

Re: Burn House for V2

 

This is excellent War_hero is becoming a great coder.

Thank you. :D

I'm currently improving my security skills a bit so I haven't had the time to create another mod. :-P But I hope to get another one done soon....ish. :)

  • 3 months later...
Posted

Re: [mccode v2] Burn House

 

I have no idea what I'm doing wrong I added everything as said but when I go to burnhouse.php it just says Invalid User

Are you just going onto burnhouse.php? Try going onto burnhouse.php?ID=1 and see if you get the same message. :)

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...