From f5e1a4565c46e9b23c78608e3cc93ddc68912b00 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Fri, 12 Oct 2018 20:26:35 +1100 Subject: [PATCH] moviemode xp tds moved to experience.pwn --- gamemodes/irresistible/cnr/experience.pwn | 22 +++++++++++++++++++++- gamemodes/sf-cnr.pwn | 9 --------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/gamemodes/irresistible/cnr/experience.pwn b/gamemodes/irresistible/cnr/experience.pwn index 8ea5c0d..fd3be78 100644 --- a/gamemodes/irresistible/cnr/experience.pwn +++ b/gamemodes/irresistible/cnr/experience.pwn @@ -177,6 +177,26 @@ hook OnPlayerDisconnect( playerid, reason ) return 1; } +hook OnPlayerMovieMode( playerid, bool: toggled ) +{ + if ( toggled ) + { + TextDrawShowForPlayer( playerid, g_CurrentRankTD ); + TextDrawShowForPlayer( playerid, g_currentXPTD ); + PlayerTextDrawShow( playerid, p_ExperienceTD[ playerid ] ); + ShowPlayerIrresistibleRank( playerid ); + } + else + { + TextDrawHideForPlayer( playerid, g_CurrentRankTD ); + TextDrawHideForPlayer( playerid, g_currentXPTD ); + PlayerTextDrawHide( playerid, p_ExperienceTD[ playerid ] ); + PlayerTextDrawHide( playerid, p_PlayerRankTD[ playerid ] ); + PlayerTextDrawHide( playerid, p_PlayerRankTextTD[ playerid ] ); + } + return 1; +} + /* ** Commands ** */ CMD:experience( playerid, params[ ] ) return cmd_level( playerid, params ); CMD:levels( playerid, params[ ] ) return cmd_level( playerid, params ); @@ -458,4 +478,4 @@ stock SetPlayerSeasonalXP( playerid, Float: seasonal_xp ) { INSERT INTO USER_LEVELS (USER_ID, LEVEL_ID, EXPERIENCE) (SELECT ID as USER_ID, 6 as LEVEL_ID, (BLEW_JAILS + BLEW_VAULT) * 6.0 AS EXPERIENCE FROM USERS); INSERT INTO USER_LEVELS (USER_ID, LEVEL_ID, EXPERIENCE) (SELECT ID as USER_ID, 7 as LEVEL_ID, VEHICLES_JACKED * 6.0 AS EXPERIENCE FROM USERS); INSERT INTO USER_LEVELS (USER_ID, LEVEL_ID, EXPERIENCE) (SELECT ID as USER_ID, 8 as LEVEL_ID, (METH_YIELDED + (TRUCKED*0.33)) * 6.0 AS EXPERIENCE FROM USERS); - */ +*/ diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index e85618a..242c9e2 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -6145,10 +6145,7 @@ CMD:moviemode( playerid, params[ ] ) case true: { ShowPlayerTogglableTextdraws( playerid ); - TextDrawShowForPlayer( playerid, g_CurrentRankTD ); - TextDrawShowForPlayer( playerid, g_currentXPTD ); PlayerTextDrawShow( playerid, p_LocationTD[ playerid ] ); - PlayerTextDrawShow( playerid, p_ExperienceTD[ playerid ] ); if ( IsDoubleXP( ) ) TextDrawShowForPlayer( playerid, g_DoubleXPTD ); TextDrawShowForPlayer( playerid, g_WebsiteTD ); if ( p_WantedLevel[ playerid ] ) PlayerTextDrawShow( playerid, p_WantedLevelTD[ playerid ] ); @@ -6157,7 +6154,6 @@ CMD:moviemode( playerid, params[ ] ) if ( p_FPSCounter{ playerid } ) TextDrawShowForPlayer( playerid, p_FPSCounterTD[ playerid ] ); if ( p_AdminOnDuty{ playerid } ) TextDrawShowForPlayer( playerid, g_AdminOnDutyTD ); TextDrawShowForPlayer( playerid, g_WorldDayTD ); - ShowPlayerIrresistibleRank( playerid ); PlayerTextDrawShow( playerid, g_ZoneOwnerTD[ playerid ] ); for( new i; i < sizeof( g_MovieModeTD ); i ++ ) TextDrawHideForPlayer( playerid, g_MovieModeTD[ i ] ); p_inMovieMode{ playerid } = false; @@ -6167,16 +6163,11 @@ CMD:moviemode( playerid, params[ ] ) { PlayerTextDrawHide( playerid, g_ZoneOwnerTD[ playerid ] ); HidePlayerTogglableTextdraws( playerid ); - TextDrawHideForPlayer( playerid, g_CurrentRankTD ); - TextDrawHideForPlayer( playerid, g_currentXPTD ); PlayerTextDrawHide( playerid, p_LocationTD[ playerid ] ); - PlayerTextDrawHide( playerid, p_ExperienceTD[ playerid ] ); PlayerTextDrawHide( playerid, p_WantedLevelTD[ playerid ] ); TextDrawHideForPlayer( playerid, g_WebsiteTD ); TextDrawHideForPlayer( playerid, g_AdminOnDutyTD ); TextDrawHideForPlayer( playerid, g_DoubleXPTD ); - PlayerTextDrawHide( playerid, p_PlayerRankTD[ playerid ] ); - PlayerTextDrawHide( playerid, p_PlayerRankTextTD[ playerid ] ); TextDrawHideForPlayer( playerid, g_MotdTD ); TextDrawHideForPlayer( playerid, g_NotManyPlayersTD ); TextDrawHideForPlayer( playerid, g_WorldDayTD );