From cdfe84671d8be6d39f6e060b63633b9937d294ee Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Wed, 26 Sep 2018 00:23:25 +1000 Subject: [PATCH] allow players over the vip limit to utilize their houses/vehicles --- gamemodes/irresistible/cnr/features/houses/house.pwn | 2 ++ gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn | 2 ++ gamemodes/irresistible/cnr/vip.pwn | 2 ++ gamemodes/sf-cnr.pwn | 2 ++ 4 files changed, 8 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/houses/house.pwn b/gamemodes/irresistible/cnr/features/houses/house.pwn index cec64c5..806e662 100644 --- a/gamemodes/irresistible/cnr/features/houses/house.pwn +++ b/gamemodes/irresistible/cnr/features/houses/house.pwn @@ -392,10 +392,12 @@ CMD:h( playerid, params[ ] ) if ( p_accountSecurityData[ playerid ] [ E_ID ] && ! p_accountSecurityData[ playerid ] [ E_VERIFIED ] && p_accountSecurityData[ playerid ] [ E_MODE ] != SECURITY_MODE_DISABLED ) return SendError( playerid, "You must be verified in order to use this feature. "COL_YELLOW"(use /verify)" ); +#if VIP_ALLOW_OVER_LIMIT == false if ( ! p_VIPLevel[ playerid ] && p_OwnedHouses[ playerid ] > GetPlayerHouseSlots( playerid ) && ! strmatch( params, "sell" ) ) { ResetSpawnLocation( playerid ); return SendError( playerid, "Please renew your V.I.P or sell this home to match your house allocated limit (/h sell)." ); } +#endif new ID = p_InHouse[ playerid ]; diff --git a/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn b/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn index 7c7030c..b2416bb 100644 --- a/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn +++ b/gamemodes/irresistible/cnr/features/vehicles/vehicles.pwn @@ -245,6 +245,7 @@ CMD:v( playerid, params[ ] ) if ( p_accountSecurityData[ playerid ] [ E_ID ] && ! p_accountSecurityData[ playerid ] [ E_VERIFIED ] && p_accountSecurityData[ playerid ] [ E_MODE ] != SECURITY_MODE_DISABLED ) return SendError( playerid, "You must be verified in order to use this feature. "COL_YELLOW"(use /verify)" ); +#if VIP_ALLOW_OVER_LIMIT == false // force hoarders to sell if ( ! p_VIPLevel[ playerid ] && p_OwnedVehicles[ playerid ] > GetPlayerVehicleSlots( playerid ) && ! strmatch( params, "sell" ) && ! strmatch( params, "bring" ) ) { for( new i = 0; i < p_OwnedVehicles[ playerid ]; i++ ) if ( g_vehicleData[ playerid ] [ i ] [ E_OWNER_ID ] == p_AccountID[ playerid ] ) { @@ -252,6 +253,7 @@ CMD:v( playerid, params[ ] ) } return SendError( playerid, "Please renew your V.I.P or sell this vehicle to match your vehicle allocated limit. (/v sell/bring only)" ); } +#endif new vehicleid = GetPlayerVehicleID( playerid ), diff --git a/gamemodes/irresistible/cnr/vip.pwn b/gamemodes/irresistible/cnr/vip.pwn index ee0c38c..546e350 100644 --- a/gamemodes/irresistible/cnr/vip.pwn +++ b/gamemodes/irresistible/cnr/vip.pwn @@ -39,6 +39,8 @@ #define ICM_NAME ( 7 ) #define ICM_VEH_SLOT ( 8 ) +#define VIP_ALLOW_OVER_LIMIT ( true ) + /* ** Variables ** */ enum E_IC_MARKET_DATA { diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 7ac9af7..d1cd45c 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -14124,10 +14124,12 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) if ( ! response ) return ShowPlayerSpawnMenu( playerid ); + #if VIP_ALLOW_OVER_LIMIT == false if ( ! p_VIPLevel[ playerid ] && p_OwnedHouses[ playerid ] > GetPlayerHouseSlots( playerid ) ) { ResetSpawnLocation( playerid ); return SendError( playerid, "Please renew your V.I.P or sell this home to match your house allocated limit (/h sell)." ); } + #endif new x = 0;