hospital bed code?

xxfanywe

Member
Mar 25, 2015
40
3
hey everyone i am looking to program a mini game for my upcoming hotel and when you die in the mini game you are sent to a room with a hospital bed but i do not know the code to make them go straight to the bed and be stuck on the bed till the timer is finished can anyone help please
 

xxfanywe

Member
Mar 25, 2015
40
3
Okay well first of all; You have to make the command that will hit the user then send them to the room and set the boolean to true. This boolean only controls ENTRY of the room.

i've done all of that altercationz told me boolean codes etc but the code for sending the user to hospital does nothing
 

Velaski

winner
Aug 4, 2015
562
165
i've done all of that altercationz told me boolean codes etc but the code for sending the user to hospital does nothing
Did you set the boolean as true on the if statement that Target HP < 0?

If you want to covert to RP, atleast have some prior knowledge?
 
Last edited:

JayC

Always Learning
Aug 8, 2013
5,493
1,398
no as it's not a roleplay and i do not want to convert it to a roleplay
Bro. The code is in your roommanager class already. You have to set that boolean to true and send the user to the room - the only thing that code does is if the room is the hospital it will check if the boolean is true and if the boolean is true it will put them in a bed. You still have to code the health, change the boolean and send the user to the room upon death. We aren't going to spoon feed this to you anymore.
 

xxfanywe

Member
Mar 25, 2015
40
3
Bro. The code is in your roommanager class already. You have to set that boolean to true and send the user to the room - the only thing that code does is if the room is the hospital it will check if the boolean is true and if the boolean is true it will put them in a bed. You still have to code the health, change the boolean and send the user to the room upon death. We aren't going to spoon feed this to you anymore.

dude how many times i have done all of this the code he m gave me is incorrect and i dont want to add health at all i have added my booleans and on my command i have added targetclient.gethabbo().senttohospital = true; , senttohospital sends a user on to a bed but it ain't doing that
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
Sent To Hospital DOES NOT send the user to the room. I don't understand why this is so hard for you to get? The Sent To Hospital boolean is a test for when they enter the hospital ROOM to see if they need to be put onto a bed or not. YOU NEED TO SEND THE USER TO THE HOSPITAL AND SET THAT BOOLEAN TO TRUE?
 

xxfanywe

Member
Mar 25, 2015
40
3
Sent To Hospital DOES NOT send the user to the room. I don't understand why this is so hard for you to get? The Sent To Hospital boolean is a test for when they enter the hospital ROOM to see if they need to be put onto a bed or not. YOU NEED TO SEND THE USER TO THE HOSPITAL AND SET THAT BOOLEAN TO TRUE?

in the code i added a prepareroom method which sends them to the room and i have set the boolean to true
 

xxfanywe

Member
Mar 25, 2015
40
3
GREAT OKAY NOW WE ARE MAKING PROGRESS!
So the boolean gets set to true and it prepares the room, DOES THE USER GO TO THE ROOM?

yes look listen i have already done all of this before you even said it.
it prepares the room the user goes to the room the boolean is set to true but when they enter the room they ain't on a hospital bed
 
May 1, 2015
467
152
I fail to understand why this isn't working for you, in your combat commands when the player dies prepare the room for them, set "SentToHospital" to true in the combat command and it should move them to the bed with no issues.
 

xxfanywe

Member
Mar 25, 2015
40
3
I fail to understand why this isn't working for you, in your combat commands when the player dies prepare the room for them, set "SentToHospital" to true in the combat command and it should move them to the bed with no issues.

hi thanks for replying can you all please stop speaking of combat and health as im not adding that yet for now , the senttohospital boolean will be set true on a simple command like :slap x , on my slap command i have added targetclient.gethabbo().senttohospital = true; when the user does the command they are teleported to the room id however they are not sent on to the bed
 

Users who are viewing this thread

Top