From 0be53aab7c3330a18a814f7d7bca9ab069af20bf Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Thu, 27 Dec 2018 12:51:45 +1100 Subject: [PATCH] making use of TogglePlayerSetting instead of DisablePassiveMode --- gamemodes/irresistible/cnr/dialog_ids.pwn | 2 +- .../irresistible/cnr/features/player/player_settings.pwn | 4 ---- gamemodes/sf-cnr.pwn | 6 +++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/gamemodes/irresistible/cnr/dialog_ids.pwn b/gamemodes/irresistible/cnr/dialog_ids.pwn index fdc21f7..674178b 100644 --- a/gamemodes/irresistible/cnr/dialog_ids.pwn +++ b/gamemodes/irresistible/cnr/dialog_ids.pwn @@ -210,7 +210,7 @@ #define DIALOG_COMPONENTS_SELL 1200 #define DIALOG_HOUSE_SELL 1201 #define DIALOG_BUSINESS_SELL_CONFIRM 1202 -#define DIALOG_PASSIVE_MODE 1203 +//#define DIALOG_PASSIVE_MODE 1203 #define DIALOG_NEXT_PAGE_VIP 1204 /* ** Hooks ** */ diff --git a/gamemodes/irresistible/cnr/features/player/player_settings.pwn b/gamemodes/irresistible/cnr/features/player/player_settings.pwn index 22b872b..2ef7491 100644 --- a/gamemodes/irresistible/cnr/features/player/player_settings.pwn +++ b/gamemodes/irresistible/cnr/features/player/player_settings.pwn @@ -197,8 +197,4 @@ stock IsPlayerSettingToggled( playerid, settingid ) { stock IsPlayerVIPSkinToggled( playerid ) { return p_PlayerSettings[ playerid ] { SETTING_VIPSKIN }; -} - -stock DisablePassiveMode( playerid ) { - return p_PlayerSettings[ playerid ] { SETTING_PASSIVE_MODE } = true; } \ No newline at end of file diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index c4a49ff..f4475fb 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -1293,7 +1293,7 @@ public OnPlayerWeaponShot( playerid, weaponid, hittype, hitid, Float: fX, Float: { continue; } - + } return ShowPlayerHelpDialog( playerid, 2000, "You cannot damage an innocent player's vehicle unless they have wanted players alongside them!" ), 0; @@ -2049,7 +2049,7 @@ public OnPlayerText( playerid, text[ ] ) } } DCC_SendChannelMessageFormatted( discordGeneralChan, "**%s(%d):** %s", ReturnPlayerName( playerid ), playerid, text ); // p_Class[ playerid ] == CLASS_POLICE ? 12 : 4 - + foreach ( new iPlayer : Player ) { if ( IsPlayerSettingToggled( iPlayer, SETTING_CHAT_ID ) ) @@ -5993,7 +5993,7 @@ public OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) //p_CitySet{ playerid } = false; p_SpawningCity{ playerid } = CITY_SF; - DisablePassiveMode( playerid ); + TogglePlayerSetting( playerid, SETTING_PASSIVE_MODE, true ); p_Uptime[ playerid ] = 0; ShowAchievement( playerid, "Registering to SF-CnR!", 1 ); p_PlayerLogged{ playerid } = true;