From 4b699b905620380119629c27852362eaf42a86da Mon Sep 17 00:00:00 2001 From: Dusan Date: Wed, 12 Jun 2019 21:11:11 +0200 Subject: [PATCH 1/9] Remove fires --- gamemodes/irresistible/cnr/features/fires.pwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/fires.pwn b/gamemodes/irresistible/cnr/features/fires.pwn index 0d53b58..7acd594 100644 --- a/gamemodes/irresistible/cnr/features/fires.pwn +++ b/gamemodes/irresistible/cnr/features/fires.pwn @@ -117,6 +117,10 @@ hook OnServerUpdate( ) hook OnServerGameDayEnd( ) { + for ( new fireid = 0; fireid < MAX_FIRES; fireid ++ ) + { + HouseFire_Remove( fireid ); + } HouseFire_Create( ); return 1; } From 829b2ed39fe92510800de112d76833e2f4474ac2 Mon Sep 17 00:00:00 2001 From: Dusan Date: Mon, 17 Jun 2019 14:22:39 +0200 Subject: [PATCH 2/9] Cop level benefits --- .../irresistible/cnr/features/cop/arrest.pwn | 15 ++++++++---- .../irresistible/cnr/features/cop/bail.pwn | 4 ++-- .../cnr/features/robbery/safes.pwn | 24 +++++++++++++------ 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/cop/arrest.pwn b/gamemodes/irresistible/cnr/features/cop/arrest.pwn index 0c012a4..37f668a 100644 --- a/gamemodes/irresistible/cnr/features/cop/arrest.pwn +++ b/gamemodes/irresistible/cnr/features/cop/arrest.pwn @@ -180,6 +180,9 @@ CMD:arrest( playerid, params[ ] ) if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." ); new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( COP_ARREST_PAY_PER_WANTED ); new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER ); + if ( GetPlayerLevel( victimid, E_POLICE ) >= 75 ) { + totalSeconds = floatround( float( totalSeconds ) * 0.5 ); + } GivePlayerScore( playerid, 2 ); GivePlayerExperience( playerid, E_POLICE ); GivePlayerCash( playerid, totalCash ); @@ -396,9 +399,13 @@ stock BreakPlayerCuffs( playerid ) } else p_BobbyPins[ playerid ] --; - new probability = 50; // success rate probability + new Float: probability = fRandomEx( 0, 100 ); - if ( random( 101 ) <= probability ) + // multiply success rate every 25 levels (only 1, 2, 3, 4x) + probability *= GetPlayerLevel( playerid, E_POLICE ) / 25.0 + 1.0; + + // if probability >= n% after multiplying as well then uncuff + if ( probability >= 75.0 ) { if ( ! IsPlayerCuffed( playerid ) ) { @@ -439,12 +446,12 @@ stock AwardNearestLEO( playerid, reason ) { if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 || IsPlayerDead( playerid ) ) return false; - + #if defined __cloudy_event_system if ( IsPlayerInEvent( playerid ) ) return false; #endif - + new Float: radius = ( IsPlayerInAnyVehicle( playerid ) ? 150.0 : 75.0 ); // If player is in a vehicle, increase radius due to ability to get farther quicker. new closestLEO = GetClosestPlayerEx( playerid, CLASS_POLICE, radius ); diff --git a/gamemodes/irresistible/cnr/features/cop/bail.pwn b/gamemodes/irresistible/cnr/features/cop/bail.pwn index 57d44d1..3a523c5 100644 --- a/gamemodes/irresistible/cnr/features/cop/bail.pwn +++ b/gamemodes/irresistible/cnr/features/cop/bail.pwn @@ -32,7 +32,7 @@ CMD:bail( playerid, params[ ] ) else if ( GetPVarInt( pID, "bail_antispam" ) > g_iTime ) return SendError( playerid, "You must wait 10 seconds before offering a bail to this player." ); else { - equa = BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ]; + equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * GetPlayerLevel( playerid, E_POLICE ) / 100 + 1.0 ); if ( p_JailTime[ pID ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; p_BailOfferer[ pID ] = playerid; p_BailTimestamp[ pID ] = g_iTime + 120; @@ -46,7 +46,7 @@ CMD:bail( playerid, params[ ] ) CMD:acceptbail( playerid, params[ ] ) { new - equa = BAIL_DOLLARS_PER_SECOND * p_JailTime[ playerid ]; + equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ playerid ] ) * GetPlayerLevel( playerid, E_POLICE ) / 100 + 1.0 ); if ( p_JailTime[ playerid ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; diff --git a/gamemodes/irresistible/cnr/features/robbery/safes.pwn b/gamemodes/irresistible/cnr/features/robbery/safes.pwn index 50d24a0..c958923 100644 --- a/gamemodes/irresistible/cnr/features/robbery/safes.pwn +++ b/gamemodes/irresistible/cnr/features/robbery/safes.pwn @@ -538,6 +538,10 @@ stock createRobberyLootInstance( playerid, robberyid, type ) random_chance = 100.0; } + if ( GetPlayerLevel( playerid, E_POLICE ) >= 50 ) { + random_chance = 100.0; + } + // level increase chance of success random_chance += GetPlayerLevel( playerid, E_ROBBERY ) * 0.2; // increase success rate by 0.2% per level @@ -603,14 +607,20 @@ stock createRobberyLootInstance( playerid, robberyid, type ) else if ( business_id != -1 ) GetZoneFromCoordinates( szLocation, g_businessData[ business_id ] [ E_X ], g_businessData[ business_id ] [ E_Y ], g_businessData[ business_id ] [ E_Z ] ); - if ( GetPlayerInterior( playerid ) != 0 ) - SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE" near %s.", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ], szLocation ); - else - SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE".", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ] ); + if ( GetPlayerLevel( playerid, E_POLICE ) < 50 ) + { + if ( GetPlayerInterior( playerid ) != 0 ) { + SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE" near %s.", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ], szLocation ); + } else { + SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE".", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ] ); + } - SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot, and the alarm went off. Cops have been alerted." ); - GivePlayerWantedLevel( playerid, 6 ); - CreateCrimeReport( playerid ); + SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot, and the alarm went off. Cops have been alerted." ); + GivePlayerWantedLevel( playerid, 6 ); + CreateCrimeReport( playerid ); + } else { + SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot could be found. Cops have not been alerted as your police level is high." ); + } } g_robberyData[ robberyid ] [ E_ROB_TIME ] = g_iTime + MAX_ROBBERY_WAIT; g_robberyData[ robberyid ] [ E_ROBBED ] = true; From 371582cd37fc9194d7bdedb27ef5618f6854500c Mon Sep 17 00:00:00 2001 From: Dusan Date: Mon, 17 Jun 2019 14:45:08 +0200 Subject: [PATCH 3/9] Fixes --- .../irresistible/cnr/features/cop/arrest.pwn | 4 ++-- .../irresistible/cnr/features/cop/bail.pwn | 4 ++-- .../cnr/features/robbery/safes.pwn | 22 +++++++------------ 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/cop/arrest.pwn b/gamemodes/irresistible/cnr/features/cop/arrest.pwn index 37f668a..7120b1c 100644 --- a/gamemodes/irresistible/cnr/features/cop/arrest.pwn +++ b/gamemodes/irresistible/cnr/features/cop/arrest.pwn @@ -180,7 +180,7 @@ CMD:arrest( playerid, params[ ] ) if ( GetPlayerState( playerid ) == PLAYER_STATE_WASTED ) return SendError( playerid, "You cannot use this command since you are dead." ); new totalCash = ( p_WantedLevel[ victimid ] < MAX_WANTED_LVL ? p_WantedLevel[ victimid ] : MAX_WANTED_LVL ) * ( COP_ARREST_PAY_PER_WANTED ); new totalSeconds = p_WantedLevel[ victimid ] * ( JAIL_SECONDS_MULTIPLIER ); - if ( GetPlayerLevel( victimid, E_POLICE ) >= 75 ) { + if ( GetPlayerLevel( victimid, E_POLICE ) >= 75.0 ) { totalSeconds = floatround( float( totalSeconds ) * 0.5 ); } GivePlayerScore( playerid, 2 ); @@ -399,7 +399,7 @@ stock BreakPlayerCuffs( playerid ) } else p_BobbyPins[ playerid ] --; - new Float: probability = fRandomEx( 0, 100 ); + new Float: probability = fRandomEx( 0.0, 100.0 ); // multiply success rate every 25 levels (only 1, 2, 3, 4x) probability *= GetPlayerLevel( playerid, E_POLICE ) / 25.0 + 1.0; diff --git a/gamemodes/irresistible/cnr/features/cop/bail.pwn b/gamemodes/irresistible/cnr/features/cop/bail.pwn index 3a523c5..df0116b 100644 --- a/gamemodes/irresistible/cnr/features/cop/bail.pwn +++ b/gamemodes/irresistible/cnr/features/cop/bail.pwn @@ -32,7 +32,7 @@ CMD:bail( playerid, params[ ] ) else if ( GetPVarInt( pID, "bail_antispam" ) > g_iTime ) return SendError( playerid, "You must wait 10 seconds before offering a bail to this player." ); else { - equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * GetPlayerLevel( playerid, E_POLICE ) / 100 + 1.0 ); + equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * ( GetPlayerLevel( pID, E_POLICE ) / 100.0 + 1.0 ) ); if ( p_JailTime[ pID ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; p_BailOfferer[ pID ] = playerid; p_BailTimestamp[ pID ] = g_iTime + 120; @@ -46,7 +46,7 @@ CMD:bail( playerid, params[ ] ) CMD:acceptbail( playerid, params[ ] ) { new - equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ playerid ] ) * GetPlayerLevel( playerid, E_POLICE ) / 100 + 1.0 ); + equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * ( GetPlayerLevel( pID, E_POLICE ) / 100.0 + 1.0 ) ); if ( p_JailTime[ playerid ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; diff --git a/gamemodes/irresistible/cnr/features/robbery/safes.pwn b/gamemodes/irresistible/cnr/features/robbery/safes.pwn index c958923..a3e9588 100644 --- a/gamemodes/irresistible/cnr/features/robbery/safes.pwn +++ b/gamemodes/irresistible/cnr/features/robbery/safes.pwn @@ -538,7 +538,7 @@ stock createRobberyLootInstance( playerid, robberyid, type ) random_chance = 100.0; } - if ( GetPlayerLevel( playerid, E_POLICE ) >= 50 ) { + if ( GetPlayerLevel( playerid, E_POLICE ) >= 50.0 ) { random_chance = 100.0; } @@ -607,20 +607,14 @@ stock createRobberyLootInstance( playerid, robberyid, type ) else if ( business_id != -1 ) GetZoneFromCoordinates( szLocation, g_businessData[ business_id ] [ E_X ], g_businessData[ business_id ] [ E_Y ], g_businessData[ business_id ] [ E_Z ] ); - if ( GetPlayerLevel( playerid, E_POLICE ) < 50 ) - { - if ( GetPlayerInterior( playerid ) != 0 ) { - SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE" near %s.", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ], szLocation ); - } else { - SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE".", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ] ); - } + if ( GetPlayerInterior( playerid ) != 0 ) + SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE" near %s.", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ], szLocation ); + else + SendClientMessageToCops( -1, ""COL_BLUE"[ROBBERY]"COL_WHITE" %s has failed robbing %s"COL_WHITE".", ReturnPlayerName( playerid ), g_robberyData[ robberyid ] [ E_NAME ] ); - SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot, and the alarm went off. Cops have been alerted." ); - GivePlayerWantedLevel( playerid, 6 ); - CreateCrimeReport( playerid ); - } else { - SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot could be found. Cops have not been alerted as your police level is high." ); - } + SendClientMessage( playerid, -1, ""COL_GREY"[SERVER]"COL_WHITE" No loot, and the alarm went off. Cops have been alerted." ); + GivePlayerWantedLevel( playerid, 6 ); + CreateCrimeReport( playerid ); } g_robberyData[ robberyid ] [ E_ROB_TIME ] = g_iTime + MAX_ROBBERY_WAIT; g_robberyData[ robberyid ] [ E_ROBBED ] = true; From 0bee42f90ac66daf44c464a6d1dcf22e333e20fe Mon Sep 17 00:00:00 2001 From: Dusan Date: Mon, 17 Jun 2019 14:46:50 +0200 Subject: [PATCH 4/9] Fixes --- gamemodes/irresistible/cnr/features/cop/bail.pwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemodes/irresistible/cnr/features/cop/bail.pwn b/gamemodes/irresistible/cnr/features/cop/bail.pwn index df0116b..1e71480 100644 --- a/gamemodes/irresistible/cnr/features/cop/bail.pwn +++ b/gamemodes/irresistible/cnr/features/cop/bail.pwn @@ -46,7 +46,7 @@ CMD:bail( playerid, params[ ] ) CMD:acceptbail( playerid, params[ ] ) { new - equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * ( GetPlayerLevel( pID, E_POLICE ) / 100.0 + 1.0 ) ); + equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ playerid ] ) * ( GetPlayerLevel( playerid, E_POLICE ) / 100.0 + 1.0 ) ); if ( p_JailTime[ playerid ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; From caa4536491bc61fa353aec69a38e4711dab97123 Mon Sep 17 00:00:00 2001 From: Dusan Date: Mon, 17 Jun 2019 15:08:23 +0200 Subject: [PATCH 5/9] Fixes --- .../irresistible/cnr/features/cop/bail.pwn | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/cop/bail.pwn b/gamemodes/irresistible/cnr/features/cop/bail.pwn index 1e71480..3cb7ec4 100644 --- a/gamemodes/irresistible/cnr/features/cop/bail.pwn +++ b/gamemodes/irresistible/cnr/features/cop/bail.pwn @@ -32,13 +32,13 @@ CMD:bail( playerid, params[ ] ) else if ( GetPVarInt( pID, "bail_antispam" ) > g_iTime ) return SendError( playerid, "You must wait 10 seconds before offering a bail to this player." ); else { - equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * ( GetPlayerLevel( pID, E_POLICE ) / 100.0 + 1.0 ) ); - if ( p_JailTime[ pID ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; - p_BailOfferer[ pID ] = playerid; - p_BailTimestamp[ pID ] = g_iTime + 120; - SetPVarInt( pID, "bail_antispam", g_iTime + 1 ); - SendServerMessage( playerid, "You have offered %s(%d) bail for "COL_GOLD"%s", ReturnPlayerName( pID ), pID, cash_format( equa ) ); - SendClientMessageFormatted( pID, -1, ""COL_GREY"[SERVER]"COL_WHITE" %s(%d) has offered to bail you out for "COL_GOLD"%s"COL_WHITE". "COL_ORANGE"/acceptbail"COL_WHITE" to accept the bail.", ReturnPlayerName( playerid ), playerid, cash_format( equa ) ); + equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ pID ] ) * ( 1.0 - GetPlayerLevel( pID, E_POLICE ) / 125.0 ) ); + if ( p_JailTime[ pID ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; + p_BailOfferer[ pID ] = playerid; + p_BailTimestamp[ pID ] = g_iTime + 120; + SetPVarInt( pID, "bail_antispam", g_iTime + 1 ); + SendServerMessage( playerid, "You have offered %s(%d) bail for "COL_GOLD"%s", ReturnPlayerName( pID ), pID, cash_format( equa ) ); + SendClientMessageFormatted( pID, -1, ""COL_GREY"[SERVER]"COL_WHITE" %s(%d) has offered to bail you out for "COL_GOLD"%s"COL_WHITE". "COL_ORANGE"/acceptbail"COL_WHITE" to accept the bail.", ReturnPlayerName( playerid ), playerid, cash_format( equa ) ); } return 1; } @@ -46,7 +46,7 @@ CMD:bail( playerid, params[ ] ) CMD:acceptbail( playerid, params[ ] ) { new - equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ playerid ] ) * ( GetPlayerLevel( playerid, E_POLICE ) / 100.0 + 1.0 ) ); + equa = floatround( float( BAIL_DOLLARS_PER_SECOND * p_JailTime[ playerid ] ) * ( 1.0 - GetPlayerLevel( playerid, E_POLICE ) / 125.0 ) ); if ( p_JailTime[ playerid ] >= ALCATRAZ_TIME_WANTED ) equa *= 2; @@ -61,7 +61,7 @@ CMD:acceptbail( playerid, params[ ] ) new cashEarned = floatround( equa * 0.70 ); - GivePlayerCash( playerid, -equa ); + GivePlayerCash( playerid, -equa ); GivePlayerCash( p_BailOfferer[ playerid ], cashEarned ); StockMarket_UpdateEarnings( E_STOCK_GOVERNMENT, cashEarned, 0.1 ); SendClientMessageFormatted( p_BailOfferer[ playerid ], -1, ""COL_GREEN"[BAIL]"COL_WHITE" %s(%d) has paid bail. You have earned "COL_GOLD"%s"COL_WHITE" from his bail.", ReturnPlayerName( playerid ), playerid, cash_format( cashEarned ) ); From e8b5df6e77adc217d1e08f9bd7f4fcc7d704e894 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Mon, 17 Jun 2019 23:19:41 +1000 Subject: [PATCH 6/9] change min money earned by fireman --- gamemodes/irresistible/cnr/features/fires.pwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/fires.pwn b/gamemodes/irresistible/cnr/features/fires.pwn index 7acd594..32207d5 100644 --- a/gamemodes/irresistible/cnr/features/fires.pwn +++ b/gamemodes/irresistible/cnr/features/fires.pwn @@ -11,7 +11,7 @@ /* ** Definitions ** */ #define MAX_FIRES ( 10 ) -#define FIRE_EXTINGUISH_PAYOUT ( 6000 ) +#define FIRE_EXTINGUISH_PAYOUT ( 5000 ) /* ** Variables ** */ enum E_FIRE_DATA @@ -85,8 +85,8 @@ hook OnPlayerUpdateEx( playerid ) if ( g_fireData[ i ] [ E_HEALTH ] <= 0.0 ) { - new - money_earned = RandomEx( FIRE_EXTINGUISH_PAYOUT / 2, FIRE_EXTINGUISH_PAYOUT ); + new min_money_earned = floatround( float( FIRE_EXTINGUISH_PAYOUT ) * 0.75 ); + new money_earned = RandomEx( min_money_earned, FIRE_EXTINGUISH_PAYOUT ); ach_HandleExtinguishedFires( playerid ); SendClientMessageToAllFormatted( -1, "{A83434}[FIREMAN]"COL_WHITE" %s(%d) has earned "COL_GOLD"%s"COL_WHITE" for extinguishing a house fire.", ReturnPlayerName( playerid ), playerid, cash_format( money_earned ) ); From 3894b8a35c2f3a191800ebee8110b62d0f884d01 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Mon, 17 Jun 2019 23:19:51 +1000 Subject: [PATCH 7/9] -- update changelog --- scriptfiles/changelogs/cnr/_changelogs.cfg | 1 + scriptfiles/changelogs/cnr/v11.68.210.txt | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 scriptfiles/changelogs/cnr/v11.68.210.txt diff --git a/scriptfiles/changelogs/cnr/_changelogs.cfg b/scriptfiles/changelogs/cnr/_changelogs.cfg index 8a9fbcd..6bb8154 100644 --- a/scriptfiles/changelogs/cnr/_changelogs.cfg +++ b/scriptfiles/changelogs/cnr/_changelogs.cfg @@ -1,3 +1,4 @@ +v11.68.210 v11.66.204 v11.65.200 v11.60.190 diff --git a/scriptfiles/changelogs/cnr/v11.68.210.txt b/scriptfiles/changelogs/cnr/v11.68.210.txt new file mode 100644 index 0000000..7880e87 --- /dev/null +++ b/scriptfiles/changelogs/cnr/v11.68.210.txt @@ -0,0 +1,8 @@ +(+) New players are given $5,000 when they register. +(+) Police level over 75 will half the number of seconds you spend in jail. +(+) Success rate of bobby pins doubles every 25th police level. +(+) Bail is reduced up to a maximum of 80% with every police level. +(/) Payout for robberies in LS and LV has been reduced. +(/) Fireman minimum pay increased, maximum set to $5,000 though per fire. +(*) Adds map loading/unloading functionality to event module. +(*) All fires are remade after an in-game day. \ No newline at end of file From 23f530940bacf1376e799ef584904d4d75a3c04f Mon Sep 17 00:00:00 2001 From: Stev Date: Mon, 17 Jun 2019 18:40:16 +0100 Subject: [PATCH 8/9] pushing required level benefits --- .../cnr/features/player/experience.pwn | 44 +++++++++++++++++-- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/player/experience.pwn b/gamemodes/irresistible/cnr/features/player/experience.pwn index 7769837..39ab4b9 100644 --- a/gamemodes/irresistible/cnr/features/player/experience.pwn +++ b/gamemodes/irresistible/cnr/features/player/experience.pwn @@ -44,9 +44,32 @@ enum E_RANK_DATA E_COLOR, }; +enum E_BENEFIT_DATA +{ + E_LEVELS: E_LEVEL_INDEX, + E_BENEFIT[ 64 ], + Float: E_LEVEL_REQUIRE +}; + static const Float: EXP_MAX_PLAYER_LEVEL = 100.0; +static const + g_requirementData [ ] [ E_BENEFIT_DATA ] = + { + // whatever the level stuff is (no idea) + { E_POLICE, "Half the number of seconds you spend in jail.", 75.0 }, + { E_POLICE, "Success rate for booby pins increase every police level", 0.0 }, + + { E_ROBBERY, "Higher the robbery level, the better success rate of a robbery", 0.0 }, + { E_ROBBERY, "Higher the robbery level, the faster you can break into a safe", 0.0 }, + + { E_DEATHMATCH, "Benefit of dropping a health pickup when killing a player", 10.0 }, + + { E_ROLEPLAY, "Increase success rate in mining based on roleplay level", 0.0 } + } +; + static const g_levelData [ ] [ E_LEVEL_DATA ] = { @@ -106,8 +129,23 @@ stock Float: GetPlayerLevel( playerid, E_LEVELS: level ) /* ** Hooks ** */ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) { - if ( dialogid == DIALOG_VIEW_LEVEL && response ) { - return cmd_level( playerid, sprintf( "%d", GetPVarInt( playerid, "experience_watchingid" ) ) ), 1; + if ( dialogid == DIALOG_VIEW_LEVEL && response ) + { + new + watchingid = GetPVarInt( playerid, "experience_watchingid" ); + + szLargeString = ""COL_GREY"Benefit\t"COL_GREY"Required Level\n"; + + for ( new i = 0; i < sizeof( g_requirementData ); i ++ ) + { + if ( g_requirementData[ i ][ E_LEVEL_INDEX ] == E_LEVELS: listitem ) + { + format( szLargeString, sizeof( szLargeString ), "%s"COL_WHITE"%s\t"COL_GOLD"%s\n", szLargeString, g_requirementData[ i ][ E_BENEFIT ], number_format( g_requirementData[ i ][ E_LEVEL_REQUIRE ], .decimals = 0 ) ); + } + } + + ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_TABLIST_HEADERS, sprintf( "{FFFFFF}%s's %s Level", ReturnPlayerName( watchingid ), g_levelData[ listitem ] [ E_NAME ] ), szLargeString, "Close", "" ); + return 1; } else if ( dialogid == DIALOG_XPMARKET && response ) { @@ -256,7 +294,7 @@ CMD:level( playerid, params[ ] ) } SetPVarInt( playerid, "experience_watchingid", watchingid ); - return ShowPlayerDialog( playerid, DIALOG_VIEW_LEVEL, DIALOG_STYLE_TABLIST_HEADERS, sprintf( "{FFFFFF}%s's Level - Total Level %d", ReturnPlayerName( watchingid ), player_total_lvl ), szLargeString, "Refresh", "Close" ); + return ShowPlayerDialog( playerid, DIALOG_VIEW_LEVEL, DIALOG_STYLE_TABLIST_HEADERS, sprintf( "{FFFFFF}%s's Level - Total Level %d", ReturnPlayerName( watchingid ), player_total_lvl ), szLargeString, "Select", "Close" ); } CMD:rank( playerid, params[ ] ) From c816dc5a78821bae5a63e27fb64de792a1f49970 Mon Sep 17 00:00:00 2001 From: Stev Date: Mon, 17 Jun 2019 18:53:26 +0100 Subject: [PATCH 9/9] 50% less business payout in other cities --- gamemodes/irresistible/cnr/features/business/business.pwn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/business/business.pwn b/gamemodes/irresistible/cnr/features/business/business.pwn index 70ad150..12922e7 100644 --- a/gamemodes/irresistible/cnr/features/business/business.pwn +++ b/gamemodes/irresistible/cnr/features/business/business.pwn @@ -1761,6 +1761,9 @@ stock GetProductPrice( businessid, bool: hardened = false ) if ( strmatch( szCity, "San Fierro" ) ) { price *= 1.10; } + else { + price *= 0.50; + } // hardened with vehicle, 25% more profit if ( hardened ) {