fix potential mining bug that allowed mining two rocks at a time?

This commit is contained in:
Lorenc Pekaj 2018-11-02 09:52:13 +11:00
parent cb6c7475a5
commit 3fcf35fc9a

View File

@ -261,7 +261,7 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
// mine the ore // mine the ore
if ( GetPlayerWeapon( playerid ) == WEAPON_SHOVEL ) if ( GetPlayerWeapon( playerid ) == WEAPON_SHOVEL )
{ {
if ( ! IsPlayerUsingAnimation( playerid ) && ! IsPlayerAttachedObjectSlotUsed( playerid, 4 ) && ! IsPlayerAttachedObjectSlotUsed( playerid, 3 ) ) if ( ! IsPlayerUsingAnimation( playerid ) && ! IsPlayerAttachedObjectSlotUsed( playerid, 4 ) && ! IsPlayerAttachedObjectSlotUsed( playerid, 3 ) && ! IsPlayerMining( playerid ) )
{ {
static static
Float: X, Float: Y, Float: Z; Float: X, Float: Y, Float: Z;