From 632ddd1e2cc5eb644886e56dc70589e2f12d8fec Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Fri, 9 Nov 2018 19:18:14 +0000 Subject: [PATCH 1/8] wanted level when killing in duel change --- gamemodes/irresistible/cnr/wanted_level.pwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemodes/irresistible/cnr/wanted_level.pwn b/gamemodes/irresistible/cnr/wanted_level.pwn index 0559096..f3c415e 100644 --- a/gamemodes/irresistible/cnr/wanted_level.pwn +++ b/gamemodes/irresistible/cnr/wanted_level.pwn @@ -71,7 +71,7 @@ stock CNR_SetPlayerWantedLevel( playerid, level ) /* ** Functions ** */ stock GivePlayerWantedLevel( playerid, level ) { - if ( ! IsPlayerConnected( playerid ) || IsPlayerNPC( playerid ) || IsPlayerJailed( playerid ) || level == 0 ) + if ( ! IsPlayerConnected( playerid ) || IsPlayerNPC( playerid ) || IsPlayerJailed( playerid ) || IsPlayerDueling( playerid ) || level == 0 ) return 0; new From f3544de066a9cd4ad0b0b769d4c9e9707687a843 Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Fri, 9 Nov 2018 19:36:52 +0000 Subject: [PATCH 2/8] cutting spectation when player dies has been removed. --- gamemodes/sf-cnr.pwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index aa91d88..36f6ea6 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -2348,7 +2348,7 @@ public OnPlayerDeath( playerid, killerid, reason ) // Reset player variables p_Spawned{ playerid } = false; p_QuitToAvoidTimestamp[ playerid ] = 0; - CutSpectation( playerid ); + //CutSpectation( playerid ); StopPlayerNpcRobbery( playerid ); RemovePlayerFromRace( playerid ); RemovePlayerStolensFromHands( playerid ); From ddd1cf38e838e0ff8fd07b926c6e260bd84d1af3 Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Fri, 9 Nov 2018 19:37:08 +0000 Subject: [PATCH 3/8] jaillist fix --- gamemodes/sf-cnr.pwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 36f6ea6..aba1e8f 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -4469,7 +4469,7 @@ CMD:jaillist( playerid, params[ ] ) szBigString[ 0 ] = '\0'; foreach( new i : Player ) if ( IsPlayerJailed( i ) ) { - format( szBigString, sizeof( szBigString ), "%s%s%s(%d)\t%d seconds", szBigString, p_AdminJailed{ i } ? ( COL_RED ) : ( COL_WHITE ), ReturnPlayerName( i ), i, p_JailTime[ i ] ); + format( szBigString, sizeof( szBigString ), "%s%s%s(%d)\t%d seconds\n", szBigString, p_AdminJailed{ i } ? ( COL_RED ) : ( COL_WHITE ), ReturnPlayerName( i ), i, p_JailTime[ i ] ); } if ( szBigString[ 0 ] == '\0' ) { From 7197c3289be7fc53a8c3ba926531a244481b2c42 Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Sat, 10 Nov 2018 09:56:47 +0000 Subject: [PATCH 4/8] passive players will not be able to pick up weapon, ammo and money drops. --- gamemodes/irresistible/cnr/features/weapon_drop.pwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/weapon_drop.pwn b/gamemodes/irresistible/cnr/features/weapon_drop.pwn index 395499d..776ef4c 100644 --- a/gamemodes/irresistible/cnr/features/weapon_drop.pwn +++ b/gamemodes/irresistible/cnr/features/weapon_drop.pwn @@ -133,6 +133,10 @@ hook OnPlayerPickUpDynPickup( playerid, pickupid ) if ( p_PlayerPickupDelay[ playerid ] > GetServerTime( ) ) return 1; + // if player is in passive mode cannot pickup weapons, ammo + if ( IsPlayerPassive( playerid ) ) + return 1; + // Player Drops foreach ( new dropid : weapondrop ) { From 8f6621524bc3e270e2877c4fa4b500bf7d9d98b7 Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Sat, 10 Nov 2018 10:17:08 +0000 Subject: [PATCH 5/8] playing hitmarker sound when player is spectating --- .../irresistible/cnr/features/damage_feed.pwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/gamemodes/irresistible/cnr/features/damage_feed.pwn b/gamemodes/irresistible/cnr/features/damage_feed.pwn index b820593..03a7206 100644 --- a/gamemodes/irresistible/cnr/features/damage_feed.pwn +++ b/gamemodes/irresistible/cnr/features/damage_feed.pwn @@ -236,6 +236,16 @@ public OnPlayerTakenDamage( playerid, issuerid, Float: amount, weaponid, bodypar PlayerPlaySound( issuerid, g_HitmarkerSounds[ soundid ] [ E_SOUND_ID ], 0.0, 0.0, 0.0 ); } + + // play noise for admins + foreach ( new i : Player ) + { + if ( IsPlayerSpectatingPlayer( i, issuerid ) ) + { + new soundid = p_VIPLevel[ i ] ? p_HitmarkerSound{ i } : 0; + PlayerPlaySound( i, g_HitmarkerSounds[ soundid ] [ E_SOUND_ID ], 0.0, 0.0, 0.0 ); + } + } } DamageFeedAddHitTaken( playerid, issuerid, amount, weaponid ); @@ -282,6 +292,11 @@ stock DamageFeedAddHitTaken( playerid, issuerid, Float: amount, weaponid ) AddDamageHit( g_damageTaken[ playerid ], playerid, issuerid, amount, weaponid ); } +stock IsPlayerSpectatingPlayer( playerid, targetid ) +{ + return ( p_Spectating{ playerid } && p_whomSpectating[ playerid ] == targetid && playerid != targetid ); +} + stock UpdateDamageFeed( playerid, bool: modified = false ) { /* ** Core ** */ From 1815e6323bbed6cb76062da902069cd0f374855e Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Sat, 10 Nov 2018 11:24:44 +0000 Subject: [PATCH 6/8] fireman cannot use /loc anymore --- gamemodes/sf-cnr.pwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index aba1e8f..644d2f8 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -5830,7 +5830,7 @@ CMD:location( playerid, params[ ] ) pID ; - if ( p_Class[ playerid ] == CLASS_CIVILIAN ) return SendError( playerid, "This is not accessible by civilians." ); + if ( p_Class[ playerid ] == CLASS_CIVILIAN || p_Class[ playerid ] == CLASS_FIREMAN ) return SendError( playerid, "This is restricted to police only." ); else if ( sscanf( params, "u", pID ) ) return SendUsage( playerid, "/loc(ation) [PLAYER_ID]" ); else if ( ! IsPlayerConnected( pID ) || IsPlayerNPC( pID ) ) return SendError( playerid, "This player isn't connected!" ); else if ( ! IsPlayerSpawned( pID ) ) return SendError( playerid, "The player selected isn't spawned." ); From 1694d90a14e6ee4389863103812a89eea654019e Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Sat, 10 Nov 2018 11:30:22 +0000 Subject: [PATCH 7/8] business production dialogue addiction of bank balance --- gamemodes/irresistible/cnr/features/business/business.pwn | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/business/business.pwn b/gamemodes/irresistible/cnr/features/business/business.pwn index e0343bc..833ed91 100644 --- a/gamemodes/irresistible/cnr/features/business/business.pwn +++ b/gamemodes/irresistible/cnr/features/business/business.pwn @@ -310,14 +310,15 @@ CMD:business( playerid, params[ ] ) new bool: has = false; - szLargeString = ""COL_WHITE"Name\t"COL_WHITE"Production Time\t"COL_WHITE"Product\n"; + szLargeString = ""COL_WHITE"Name\t"COL_WHITE"Production Time\t"COL_WHITE"Product\t"COL_WHITE"Bank\n"; foreach ( new businessid : business ) if ( IsBusinessAssociate( playerid, businessid ) ) { - format( szLargeString, sizeof( szLargeString ), "%s%s\t%s\t"COL_GOLD"%s\n", + format( szLargeString, sizeof( szLargeString ), "%s%s\t%s\t"COL_GOLD"%s\t"COL_GREEN"%s\n", szLargeString, g_businessData[ businessid ] [ E_NAME ], g_businessData[ businessid ] [ E_PROD_TIMESTAMP ] ? ( secondstotime( g_businessData[ businessid ] [ E_PROD_TIMESTAMP ], ", ", 5 ) ) : ( ""COL_GREEN"Production Finished" ), - g_businessData[ businessid ] [ E_PRODUCT ] == 0 ? ( ""COL_RED"No Product" ) : ( cash_format( g_businessData[ businessid ] [ E_PRODUCT ] * GetProductPrice( businessid ) ) ) + g_businessData[ businessid ] [ E_PRODUCT ] == 0 ? ( ""COL_RED"No Product" ) : ( cash_format( g_businessData[ businessid ] [ E_PRODUCT ] * GetProductPrice( businessid ) ) ), + cash_format( g_businessData[ businessid ][ E_BANK ] ) ), has = true; } From d5236f4bb8fb5643eefac3815c258b26cf56f78d Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Sat, 10 Nov 2018 11:32:01 +0000 Subject: [PATCH 8/8] pilot difficulty "hard" should only give wanted level. --- gamemodes/irresistible/cnr/features/minijobs/pilot.pwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamemodes/irresistible/cnr/features/minijobs/pilot.pwn b/gamemodes/irresistible/cnr/features/minijobs/pilot.pwn index 65a09e9..bed2439 100644 --- a/gamemodes/irresistible/cnr/features/minijobs/pilot.pwn +++ b/gamemodes/irresistible/cnr/features/minijobs/pilot.pwn @@ -361,7 +361,7 @@ CMD:pilot( playerid, params[ ] ) p_PilotMapIcon [ playerid ] = CreateDynamicMapIconEx( g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_X ], g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_Y ], g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_Z ], 51, 0, MAPICON_GLOBAL, 6000.0, { -1 }, { -1 }, aPlayer ); p_PilotCheckPoint [ playerid ] = CreateDynamicRaceCP( 0, g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_X ], g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_Y ], g_AirportLocations[ p_PilotRoute[ playerid ] { 0 } ] [ E_Z ], 0.0, 0.0, 0.0, 10.0, -1, -1, playerid ); - if( p_PilotDifficulty[ playerid ] ) { // give the player 6 wanted for starting + if( p_PilotDifficulty[ playerid ] == RISK_FACTOR_HARD ) { // give the player 6 wanted for starting GivePlayerWantedLevel( playerid, 6 ); }