diff --git a/gamemodes/irresistible/cnr/features/_features.pwn b/gamemodes/irresistible/cnr/features/_features.pwn index 8a09567..6ea9c75 100644 --- a/gamemodes/irresistible/cnr/features/_features.pwn +++ b/gamemodes/irresistible/cnr/features/_features.pwn @@ -33,4 +33,4 @@ // #include "irresistible\cnr\features\eastereggs.pwn" // pool -// #include "irresistible\cnr\features\pool.pwn" +#include "irresistible\cnr\features\pool.pwn" diff --git a/gamemodes/irresistible/cnr/features/crowdfund.pwn b/gamemodes/irresistible/cnr/features/crowdfund.pwn index dc90c51..cda56e8 100644 --- a/gamemodes/irresistible/cnr/features/crowdfund.pwn +++ b/gamemodes/irresistible/cnr/features/crowdfund.pwn @@ -112,7 +112,7 @@ CMD:crowdfunds( playerid, params[ ] ) return ShowPlayerCrowdfunds( playerid ); /* ** Functions ** */ stock ShowPlayerCrowdfunds( playerid ) { return mysql_tquery( dbHandle, - "SELECT CROWDFUNDS.ID, CROWDFUNDS.FEATURE, CROWDFUNDS.FUND_TARGET, SUM(CROWDFUND_PATREONS.AMOUNT) AS RAISED, UNIX_TIMESTAMP(RELEASE_DATE) AS RELEASE, UNIX_TIMESTAMP(END_DATE) AS END FROM CROWDFUNDS " \ + "SELECT CROWDFUNDS.ID, CROWDFUNDS.FEATURE, CROWDFUNDS.FUND_TARGET, SUM(CROWDFUND_PATREONS.AMOUNT) AS RAISED, UNIX_TIMESTAMP(RELEASE_DATE) AS RELEASE_TS, UNIX_TIMESTAMP(END_DATE) AS END_TS FROM CROWDFUNDS " \ "LEFT JOIN CROWDFUND_PATREONS on CROWDFUNDS.ID = CROWDFUND_PATREONS.CROWDFUND_ID " \ "GROUP BY CROWDFUNDS.ID ORDER BY CROWDFUNDS.ID DESC LIMIT " # MAX_CROWDFUNDS, "OnDisplayCrowdfunds", "i", playerid @@ -230,9 +230,7 @@ thread OnDisplayCrowdfundInfo( playerid, crowdfund_id ) thread OnDisplayCrowdfunds( playerid ) { new - rows; - - cache_get_data( rows, tmpVariable ); + rows = cache_get_row_count( ); if ( ! rows ) { return SendError( playerid, "There is no crowdfund to show. Try again later." ); @@ -259,8 +257,8 @@ thread OnDisplayCrowdfunds( playerid ) new Float: percent_raised = ( amount_raised / target_amount ) * 100.0; new curr_timestamp = gettime( ); - new release_timestamp = cache_get_field_content_int( row, "RELEASE", dbHandle ); - new end_timestamp = cache_get_field_content_int( row, "END", dbHandle ); + new release_timestamp = cache_get_field_content_int( row, "RELEASE_TS", dbHandle ); + new end_timestamp = cache_get_field_content_int( row, "END_TS", dbHandle ); // inactive if ( ( curr_timestamp > release_timestamp && release_timestamp != 0 ) || ( curr_timestamp > end_timestamp ) ) diff --git a/gamemodes/irresistible/cnr/features/houses/house.pwn b/gamemodes/irresistible/cnr/features/houses/house.pwn index ea28f62..806e662 100644 --- a/gamemodes/irresistible/cnr/features/houses/house.pwn +++ b/gamemodes/irresistible/cnr/features/houses/house.pwn @@ -320,7 +320,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) new houseid = p_InHouse[ playerid ]; format( g_houseData[ houseid ] [ E_HOUSE_NAME ], 30, "%s", inputtext); - mysql_format( dbHandle, szNormalString, sizeof( szNormalString ), "UPDATE `HOUSES` SET `NAME`='%s' WHERE `ID`=%d", g_houseData[ houseid ] [ E_HOUSE_NAME ], p_InHouse[ playerid ] ); + mysql_format( dbHandle, szNormalString, sizeof( szNormalString ), "UPDATE `HOUSES` SET `NAME`='%e' WHERE `ID`=%d", g_houseData[ houseid ] [ E_HOUSE_NAME ], p_InHouse[ playerid ] ); mysql_single_query( szNormalString ); format( szBigString, sizeof( szBigString ), ""COL_GOLD"House:"COL_WHITE" %s(%d)\n"COL_GOLD"Owner:"COL_WHITE" %s\n"COL_GOLD"Price:"COL_WHITE" %s", g_houseData[ houseid ] [ E_HOUSE_NAME ], houseid, g_houseData[ houseid ] [ E_OWNER ], cash_format( g_houseData[ houseid ] [ E_COST ] ) ); UpdateDynamic3DTextLabelText( g_houseData[ houseid ] [ E_LABEL ] [ 0 ], COLOR_WHITE, szBigString ); @@ -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/houses/realestate.pwn b/gamemodes/irresistible/cnr/features/houses/realestate.pwn index f614367..ee7302e 100644 --- a/gamemodes/irresistible/cnr/features/houses/realestate.pwn +++ b/gamemodes/irresistible/cnr/features/houses/realestate.pwn @@ -236,6 +236,7 @@ thread HouseListing_OnBuyHome( playerid, house_listing_id ) // credit seller if they are on/offline new + houseid = cache_get_field_content_int( 0, "HOUSE_ID" ), sellerid; foreach ( sellerid : Player ) if ( GetPlayerAccountID( sellerid ) == owner_account_id ) { @@ -246,13 +247,11 @@ thread HouseListing_OnBuyHome( playerid, house_listing_id ) if ( 0 <= sellerid < MAX_PLAYERS && Iter_Contains( Player, sellerid ) ) { p_OwnedHouses[ sellerid ] --; GivePlayerIrresistibleCoins( sellerid, ask_price ); - SendServerMessage( sellerid, "You have successfully sold your house for "COL_GOLD"%s IC"COL_WHITE" to %s(%d)!", number_format( ask_price, .decimals = 2 ), ReturnPlayerName( playerid ), playerid ); + SendServerMessage( sellerid, "You have successfully sold your home (%s) for "COL_GOLD"%s IC"COL_WHITE" to %s(%d)!", g_houseData[ houseid ] [ E_HOUSE_NAME ], number_format( ask_price, .decimals = 2 ), ReturnPlayerName( playerid ), playerid ); } else { mysql_single_query( sprintf( "UPDATE `USERS` SET `COINS` = `COINS` + %f WHERE `ID` = %d", ask_price, owner_account_id ) ); } - new - houseid = cache_get_field_content_int( 0, "HOUSE_ID" ); // show sellers name & house name SendServerMessage( playerid, "You have successfully bought %s's home (%s"COL_WHITE") for "COL_GOLD"%s IC"COL_WHITE"!", g_houseData[ houseid ] [ E_OWNER ], g_houseData[ houseid ] [ E_HOUSE_NAME ], number_format( ask_price, .decimals = 2 ) ); diff --git a/gamemodes/irresistible/cnr/features/random_messages.pwn b/gamemodes/irresistible/cnr/features/random_messages.pwn index 4e499cc..21c37fe 100644 --- a/gamemodes/irresistible/cnr/features/random_messages.pwn +++ b/gamemodes/irresistible/cnr/features/random_messages.pwn @@ -68,7 +68,8 @@ static stock { "{8ADE47}Stephanie:"COL_WHITE" Race your friends in a street race or outrun race by using "COL_GREY"/race"COL_WHITE"!" }, { "{8ADE47}Stephanie:"COL_WHITE" Want 3 days of free V.I.P? Add an "COL_GREY"/email"COL_WHITE" to your account!" }, { "{8ADE47}Stephanie:"COL_WHITE" Contribute to our feature "COL_GREY"/crowdfunds"COL_WHITE"! Early supporters get benefits!" }, - { "{8ADE47}Stephanie:"COL_WHITE" Don't want to be interrupted as an innocent player? Enter passive mode with "COL_GREY"/passive"COL_WHITE"!" } + { "{8ADE47}Stephanie:"COL_WHITE" Don't want to be interrupted as an innocent player? Enter passive mode with "COL_GREY"/passive"COL_WHITE"!" }, + { "{8ADE47}Stephanie:"COL_WHITE" You can buy premium player homes using "COL_GREY"/estate"COL_WHITE"!" } }, g_randomMessageTick = 0 ; 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 f4dbae8..5946870 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -53,7 +53,7 @@ native gpci ( playerid, serial[ ], len ); new bool: False = false; -#define IsPlayerPlayingPool(%0) (False) +// #define IsPlayerPlayingPool(%0) (False) /* ** SF-CNR ** */ #include "irresistible\_main.pwn" @@ -14128,10 +14128,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; @@ -18012,7 +18014,7 @@ stock GivePlayerWantedLevel( playerid, wantedlevel, bool:loadingstats = false ) format( szWanted, sizeof( szWanted ), "] %d ]", p_WantedLevel[ playerid ] ); PlayerTextDrawSetString( playerid, p_WantedLevelTD[ playerid ], szWanted ); if ( ! p_inMovieMode{ playerid } ) PlayerTextDrawShow( playerid, p_WantedLevelTD[ playerid ] ); - PassiveMode_Reset( playerid, 0 ); // remove passive mode if the player is wanted + ResetPlayerPassiveMode( playerid, .passive_disabled = true ); // remove passive mode if the player is wanted } } else SetPlayerColorToTeam( playerid ), PlayerTextDrawHide( playerid, p_WantedLevelTD[ playerid ] ), Uncuff( playerid );