cranks Posted November 6, 2014 Share Posted November 6, 2014 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? Quote Link to comment Share on other sites More sharing options...
Script47 Posted November 6, 2014 Share Posted November 6, 2014 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. Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted November 6, 2014 Share Posted November 6, 2014 Remove in the query where it says hospital = <someNumber>, hospreason = <someReason> from your attack files that are not attack.php (i forget the names of them ;)) Quote Link to comment Share on other sites More sharing options...
cranks Posted November 6, 2014 Author Share Posted November 6, 2014 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 Quote Link to comment Share on other sites More sharing options...
Magictallguy Posted November 12, 2014 Share Posted November 12, 2014 Remove in the query where it says hospital = <someNumber>, hospreason = <someReason> from your attack files that are not attack.php (i forget the names of them ;)) attackbeat, attacklost, attacktake, attackwon Quote Link to comment Share on other sites More sharing options...
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.