How to disable vending machine
#1

as title.

I want to know what function or callback can do this.

thanks for help
Reply
#2

well, i find a old post about this question. the answer is no.

can i make player use higher price to use vending machine ?
Reply
#3

Quote:
Originally Posted by billy4601
View Post
well, i find a old post about this question. the answer is no.

can i make player use higher price to use vending machine ?
Nope they can't be manipulated like that, the best you can do is block them with an object

EDIT: You could make your own system that checks if a certain button (enter i think but i'm not sure) is pressed near a vending machine and deduct x amount of money, but it can't be done natively.
Reply
#4

There isn't a function or a callback for that, but you can disable them.
Reply
#5

Quote:
Originally Posted by Macluawn
View Post
There isn't a function or a callback for that, but you can disable them.
How? i could use that myself, is there a function i missed?
Reply
#6

Quote:
Originally Posted by Macluawn
View Post
There isn't a function or a callback for that, but you can disable them.
How to do that?
Reply
#7

Get all positions of Sprunk Machines in San Andreas. Put them into an array. Use OnPlayerKeyStateChange to check if KEY_EXIT (or whatever it's called) is pressed and if it is pressed use IsPLayerInRangeOfPoint to scan through the array of Sprunk Machine positions, if they are near a Sprunk machine, deduct some money. However, this could be buggy, you'd have to use a very small radius in IsPlayerInRangeOFPoint.
Reply
#8

For the easy way, you can use OnPlayerKeyStateChange and check if player applying sprunk animation after pressing F (With timer) then you can set their health back (With PVar,or decrease player's health by 30) or stop the anomation (IDK this method work or not).
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)