Jump to content
MakeWebGames

Hospital (v2)


cranks

Recommended Posts

When a player attacks someone and they die, they get sent to hospital. How can i change that so when they die, they go to (0) hp but they don't get sent to hospital. So then the player would have to pay a certain amount to heal themselves in the hospital.

How would i go about doing this?

Link to comment
Share on other sites

  • Remove hospital completely
  • Check if user has just been beaten and have column which is 0 by default and when users health is 0 change the column to 1
  • If the column is 1 they're dead and they can't do anything unless they pay
  • For random payment look in to rand();
  • Have link which GETS the users ID when they pay and update that column back to 0 and make sure you give them full health again. Don't forget to minus the money.

 

Personally I wouldn't do this, because a player will be stuck forever in that zone if they don't have money, which will probably result in users creating multiple accounts to transfer cash across.

Link to comment
Share on other sites

  • Remove hospital completely
  • Check if user has just been beaten and have column which is 0 by default and when users health is 0 change the column to 1
  • If the column is 1 they're dead and they can't do anything unless they pay
  • For random payment look in to rand();
  • Have link which GETS the users ID when they pay and update that column back to 0 and make sure you give them full health again. Don't forget to minus the money.

 

Personally I wouldn't do this, because a player will be stuck forever in that zone if they don't have money, which will probably result in users creating multiple accounts to transfer cash across.

I have a energy system in my game which works with the idea of this hospital.

Players starts with so much energy a day which is used for fighting, and doing jobs ect.. A player can do a job and earn money, and they can use that if they need to heal. There will be a energy cap, but it will go up every hour or so, adding extra energy until it reaches the cap, and so on :p

Link to comment
Share on other sites

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