Fix mining face position
Fixed : https://github.com/zeelorenc/sf-cnr/issues/64 Reported-by: Stanislav Gromov ( Daniel-Cortez ) Signed-off-by: Pichai Lertwachirakul ( zekodef )
This commit is contained in:
parent
52fe146e93
commit
44b9b1d1e3
@ -272,6 +272,7 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
{
|
||||
static
|
||||
Float: X, Float: Y, Float: Z;
|
||||
static Float: offset = 0.0;
|
||||
|
||||
foreach ( new m : miningrock )
|
||||
{
|
||||
@ -283,7 +284,8 @@ hook OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
|
||||
if ( g_miningData[ m ] [ E_ORES ] <= 0 )
|
||||
return SendError( playerid, "There are no ores left in this rock." );
|
||||
|
||||
SetPlayerFacePoint( playerid, X, Y, Z );
|
||||
GetDynamicObjectPos( g_miningData[ m ] [ E_OBJECT ], X, Y, Z );
|
||||
SetPlayerFacePoint( playerid, X, Y, offset );
|
||||
SetPlayerMineOre( playerid, m );
|
||||
SendServerMessage( playerid, "You're now mining a rock." );
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user