From ca0c93bb37af8bbeb10dbe89b64166df19806bbe Mon Sep 17 00:00:00 2001 From: Damen Date: Sat, 26 Jan 2019 22:45:00 -0500 Subject: [PATCH] more adjustments based on comments --- gamemodes/irresistible/anticheat/weapon.pwn | 25 +------------------ .../irresistible/cnr/features/cop/arrest.pwn | 3 ++- .../irresistible/cnr/features/weapon_drop.pwn | 3 ++- gamemodes/sf-cnr.pwn | 4 +-- 4 files changed, 7 insertions(+), 28 deletions(-) diff --git a/gamemodes/irresistible/anticheat/weapon.pwn b/gamemodes/irresistible/anticheat/weapon.pwn index 9de7aa1..3b34b83 100644 --- a/gamemodes/irresistible/anticheat/weapon.pwn +++ b/gamemodes/irresistible/anticheat/weapon.pwn @@ -299,27 +299,4 @@ stock AC_CreateDynamicPickup( modelid, type, Float: x, Float: y, Float: z, world #else #define _ALS_CreateDynamicPickup #endif -#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; - } -} \ No newline at end of file +#define CreateDynamicPickup AC_CreateDynamicPickup \ No newline at end of file diff --git a/gamemodes/irresistible/cnr/features/cop/arrest.pwn b/gamemodes/irresistible/cnr/features/cop/arrest.pwn index a385f3a..913aeac 100644 --- a/gamemodes/irresistible/cnr/features/cop/arrest.pwn +++ b/gamemodes/irresistible/cnr/features/cop/arrest.pwn @@ -503,7 +503,7 @@ stock AwardNearestLEO( playerid, reason ) closestLEO = GetClosestPlayerEx( playerid, CLASS_POLICE, radius ); - if ( closestLEO != INVALID_PLAYER_ID ) + if ( IsPlayerConnected( closestLEO ) ) { new reasonText[ 24 ]; @@ -525,6 +525,7 @@ hook OnPlayerAccessEntrance( playerid, entranceid, worldid, interiorid ) { if ( GetPlayerWantedLevel( playerid ) > 2 ) { + new Float: x, Float: y, Float: z; GetEntrancePos( entranceid, x, y, z ); diff --git a/gamemodes/irresistible/cnr/features/weapon_drop.pwn b/gamemodes/irresistible/cnr/features/weapon_drop.pwn index 10f8cf5..6ae8f4f 100644 --- a/gamemodes/irresistible/cnr/features/weapon_drop.pwn +++ b/gamemodes/irresistible/cnr/features/weapon_drop.pwn @@ -431,7 +431,8 @@ stock RemoveSpecificPlayerWeapon( playerid, weaponid, bool:createpickup ) if ( iWeapon != iCurrentWeapon || iWeapon != weaponid ) { GetPlayerWeaponData( playerid, iSlot, iWeaponID[ iSlot ], iWeaponAmmo[ iSlot ] ); } - else if ( createpickup ) + + if ( createpickup ) { new Float: X, Float: Y, Float: Z; diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 29e3b6e..4fb90d2 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -7160,9 +7160,9 @@ stock GetPlayerOutsidePos( playerid, &Float: X, &Float: Y, &Float: Z ) // gets t 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; } \ No newline at end of file