11.08.2012, 10:16
Quote:
What is this?
This include calls the function OnPlayerUseVending when a player uses a vending machine (Sprunk or other). When a player presses F, this a timer gets started. If the player has the vending animation (1660) applied, he must be using a vend machine. This is my first include, so it might not be the best optimized include. Use This include can be used for creating a health anticheat. Eg: Код:
#include <OnPlayerUseVending> [...] OnPlayerUseVending(playerid){ realHealth[playerid] += 35; if(realHealth[playerid]>100) realHealth[playerid] = 100; } Download Pastebin - http://pastebin.com/EsvA7miL SolidFiles - http://www.solidfiles.com/d/a6a3170d62/ Changelog 0.1 - first version Next - I will be adding the positions of all the vending machines so OnPlayerUseVending will only be called if the player is near a vending machine. I have a list of all the vending machines, but some are missing. I will try to find out the positions of all the vending machines and then update the include. Bugs None found. Report if you find any bugs. |
Because what if I applyanimation to the player, and he presses that button?