Posts: 65
Threads: 3
Joined: Feb 2010
Reputation:
0
a vending machine created with create object and such will crash the player when he uses it with F. i suggest you do that someway diffrent, even though you players have to type a command to heal, some would certainly press F and get crashed :-/
thats only my opinion
Posts: 494
Threads: 9
Joined: Feb 2012
Reputation:
0
Why not place the vending machine in a certain area like outside the hospital, and when the player transports there he would be healed? Isn't as good as you were wanting but at least it wouldn't crash your game like Falco-Ger said.
Posts: 1,849
Threads: 96
Joined: Apr 2010
Reputation:
0
A Healing machine when can be TP'ed anywhere? Thats fucked up lol.
Just make the command /bandage or /healup. It will heal the player. Put a timer as SetTimerEx for the player to make the using variable to 1. And add a check at /bandage or /healup command which checks for that variable is 0 or not. If it is 0 it will work. If it is not zero then will show a error message. Add a timer to set the variable to 0 after 5 mins.
Posts: 6,236
Threads: 310
Joined: Jan 2011
Reputation:
0
Pressing F at created vending machines does not crash you at all.
Create it with CreateObject
Use IsPlayerInRangeOfPoint under OnPlayerKeyStateChange to detect the players action
Posts: 188
Threads: 28
Joined: Apr 2012
Reputation:
0
Thanx at all! how to spawn a Checkpoint i don't remember the callback :/
Posts: 188
Threads: 28
Joined: Apr 2012
Reputation:
0
hmmm. too much work for a beginner like me using checkpoints... instead using pickups is more easy? how is the code to add when player is on pickup and use KEY_SECONDARY_ATTACK use the vending machine, reheal him and the player lose 1000$ ? thanx for help