How To Edit Money soft drink
#1

how to Edit Money soft drink ?


https://upanhtocdo.com/image/FAJlvS
Reply
#2

Detect if the player is close to a vending machine, detect if the player's pressing the key to use a vending machine and then finally detect if the player's doing the vending machine animation and then you can give the money they spend back to them and charge them how much ever you want. Just note that vending machines are client-side, therefore your money won't be decreased server-side if you are using a variable like pInfo[playerid][Money]
Reply
#3

What you could do is detect if the player is pressing 'F' and check if the animation index is equal to 1660, which should be the "insert money into vending machine" animation and then lower their money based on that.

EDIT: Rufio beat me too it
Reply
#4

me is a new people that you can be specified for me please code
Reply
#5

Use this to detect keys;
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange

Use this to find out what the key for 'F' is;
https://sampwiki.blast.hk/wiki/Keys

Use this to find out a player's animation index;
https://sampwiki.blast.hk/wiki/GetPlayerAnimationIndex

Use this to find out if the player is in range of a point;
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint

Use an enum that holds info of all the vending machines;
https://sampforum.blast.hk/showthread.php?tid=318307 This is a good tutorial about enums.

Use this to get the player's money;
https://sampwiki.blast.hk/wiki/GetPlayerMoney

Use this to set the player's money;
https://sampwiki.blast.hk/wiki/GivePlayerMoney
Reply
#6

thanks you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)