more adjustments based on comments

This commit is contained in:
Damen 2019-01-26 22:45:00 -05:00
parent f66b4069a1
commit ca0c93bb37
4 changed files with 7 additions and 28 deletions

View File

@ -300,26 +300,3 @@ stock AC_CreateDynamicPickup( modelid, type, Float: x, Float: y, Float: z, world
#define _ALS_CreateDynamicPickup #define _ALS_CreateDynamicPickup
#endif #endif
#define CreateDynamicPickup AC_CreateDynamicPickup #define CreateDynamicPickup AC_CreateDynamicPickup
stock CheckIfPlayerHasWeapon( playerid, weaponid )
{
new
iCurrentWeapon = GetPlayerWeapon( playerid ),
iWeapon,
iAmmo
;
if ( iCurrentWeapon == weaponid )
return true;
else
{
for ( new iSlot = 0; iSlot < 13; iSlot++ )
{
GetPlayerWeaponData( playerid, iSlot, iWeapon, iAmmo );
if ( iWeapon == weaponid )
return true;
}
return false;
}
}

View File

@ -503,7 +503,7 @@ stock AwardNearestLEO( playerid, reason )
closestLEO = GetClosestPlayerEx( playerid, CLASS_POLICE, radius ); closestLEO = GetClosestPlayerEx( playerid, CLASS_POLICE, radius );
if ( closestLEO != INVALID_PLAYER_ID ) if ( IsPlayerConnected( closestLEO ) )
{ {
new reasonText[ 24 ]; new reasonText[ 24 ];
@ -525,6 +525,7 @@ hook OnPlayerAccessEntrance( playerid, entranceid, worldid, interiorid )
{ {
if ( GetPlayerWantedLevel( playerid ) > 2 ) if ( GetPlayerWantedLevel( playerid ) > 2 )
{ {
new Float: x, Float: y, Float: z; new Float: x, Float: y, Float: z;
GetEntrancePos( entranceid, x, y, z ); GetEntrancePos( entranceid, x, y, z );

View File

@ -431,7 +431,8 @@ stock RemoveSpecificPlayerWeapon( playerid, weaponid, bool:createpickup )
if ( iWeapon != iCurrentWeapon || iWeapon != weaponid ) { if ( iWeapon != iCurrentWeapon || iWeapon != weaponid ) {
GetPlayerWeaponData( playerid, iSlot, iWeaponID[ iSlot ], iWeaponAmmo[ iSlot ] ); GetPlayerWeaponData( playerid, iSlot, iWeaponID[ iSlot ], iWeaponAmmo[ iSlot ] );
} }
else if ( createpickup )
if ( createpickup )
{ {
new new
Float: X, Float: Y, Float: Z; Float: X, Float: Y, Float: Z;

View File

@ -7160,9 +7160,9 @@ stock GetPlayerOutsidePos( playerid, &Float: X, &Float: Y, &Float: Z ) // gets t
stock IsPlayerBelowSeaLevel( playerid ) stock IsPlayerBelowSeaLevel( playerid )
{ {
new Float: x, Float: y, Float: z; new Float: z;
GetPlayerPos( playerid, x, y, z ); GetPlayerPos( playerid, z, z, z );
return z < 0.0; return z < 0.0;
} }