From 1c3fecdc91d1c845d4012349517c6e5a82df1b47 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Wed, 29 May 2019 23:05:13 +1000 Subject: [PATCH] add SERVER_OPERATOR setting in config.pwn --- .../irresistible/cnr/commands/admin/admin_four.pwn | 2 ++ gamemodes/irresistible/cnr/commands/cmd_help.pwn | 2 +- .../irresistible/cnr/features/gangs/gangs.pwn | 2 +- .../irresistible/cnr/features/houses/house.pwn | 4 ++-- .../cnr/features/player/irresistibleguard.pwn | 2 +- .../irresistible/cnr/features/robbery/clerks.pwn | 2 +- .../irresistible/cnr/features/vip/coin_market.pwn | 14 +++++++------- .../irresistible/cnr/features/vip/player_note.pwn | 2 +- .../irresistible/cnr/features/vip/redeem_code.pwn | 6 +++--- .../irresistible/cnr/features/visage/blackjack.pwn | 2 +- gamemodes/irresistible/config/server.pwn | 6 +++++- 11 files changed, 25 insertions(+), 19 deletions(-) diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_four.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_four.pwn index c6886e8..544c5fc 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_four.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_four.pwn @@ -24,6 +24,7 @@ CMD:destroyallav( playerid, params[ ] ) return 1; } +#if !defined __cloudy_event_system CMD:event( playerid, params[ ] ) { if ( p_AdminLevel[ playerid ] < 4 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); @@ -31,6 +32,7 @@ CMD:event( playerid, params[ ] ) SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have your world to 69." ); return SetPlayerVirtualWorld( playerid, 69 ); } +#endif CMD:setworld( playerid, params[ ] ) { diff --git a/gamemodes/irresistible/cnr/commands/cmd_help.pwn b/gamemodes/irresistible/cnr/commands/cmd_help.pwn index 5526263..985f183 100644 --- a/gamemodes/irresistible/cnr/commands/cmd_help.pwn +++ b/gamemodes/irresistible/cnr/commands/cmd_help.pwn @@ -58,7 +58,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) return cmd_help( playerid, "" ); if ( listitem >= 64 ) - return SendError( playerid, "Unable to process request, contact Damen in regards to this." ); + return SendError( playerid, "Unable to process request, contact " SERVER_OPERATOR " in regards to this." ); new digits[ 64 ]; diff --git a/gamemodes/irresistible/cnr/features/gangs/gangs.pwn b/gamemodes/irresistible/cnr/features/gangs/gangs.pwn index 067e070..8b98ff3 100644 --- a/gamemodes/irresistible/cnr/features/gangs/gangs.pwn +++ b/gamemodes/irresistible/cnr/features/gangs/gangs.pwn @@ -635,7 +635,7 @@ thread OnPlayerGangLoaded( playerid ) else { p_GangID[ playerid ] = -1; - SendServerMessage( playerid, "Had an issue loading your gang. Contact Damen (0x92F)." ); + SendServerMessage( playerid, "Had an issue loading your gang. Contact " SERVER_OPERATOR " (0x92F)." ); printf("[GANG] [ERROR] Had an issue loading a gang row id %d", gang_sql_id ); } } diff --git a/gamemodes/irresistible/cnr/features/houses/house.pwn b/gamemodes/irresistible/cnr/features/houses/house.pwn index a3d91f2..9481cef 100644 --- a/gamemodes/irresistible/cnr/features/houses/house.pwn +++ b/gamemodes/irresistible/cnr/features/houses/house.pwn @@ -630,10 +630,10 @@ thread OnHouseLoad( ) } printf( "[HOUSES]: %d houses have been loaded. (Tick: %dms)", rows, GetTickCount( ) - loadingTick ); - // Make Damen the owner of unowned VIP houses + // Make server operator the owner of unowned VIP houses foreach ( new houseid : houses ) if ( g_houseData[ houseid ] [ E_COST ] < 10000 ) { if ( strmatch( g_houseData[ houseid ] [ E_OWNER ], "No-one" ) ) { - SetHouseOwner( houseid, 1, "Damen" ); + SetHouseOwner( houseid, SERVER_OPERATOR_ACC_ID, SERVER_OPERATOR ); } } return 1; diff --git a/gamemodes/irresistible/cnr/features/player/irresistibleguard.pwn b/gamemodes/irresistible/cnr/features/player/irresistibleguard.pwn index 889f9b5..5be6eba 100644 --- a/gamemodes/irresistible/cnr/features/player/irresistibleguard.pwn +++ b/gamemodes/irresistible/cnr/features/player/irresistibleguard.pwn @@ -353,7 +353,7 @@ thread OnAccountGuardDelete( playerid ) ; if ( id != p_accountSecurityData[ playerid ] [ E_ID ] ) - return SendError( playerid, "Something is wrong with your email. Talk to Damen." ), 1; + return SendError( playerid, "Something is wrong with your email. Talk to " SERVER_OPERATOR "." ), 1; if ( g_iTime - last_changed < 300 ) { return SendError( playerid, "You can use this feature in %s.", secondstotime( 300 - ( g_iTime - last_changed ) ) ); diff --git a/gamemodes/irresistible/cnr/features/robbery/clerks.pwn b/gamemodes/irresistible/cnr/features/robbery/clerks.pwn index 0de4a0d..048e3f0 100644 --- a/gamemodes/irresistible/cnr/features/robbery/clerks.pwn +++ b/gamemodes/irresistible/cnr/features/robbery/clerks.pwn @@ -557,7 +557,7 @@ function OnPlayerHoldupStore( playerid, clerkid, step ) } if ( !( 0 <= amount < 10000 ) ) - return SendError( playerid, "A money exploit occurred. Contact Damen ASAP." ); + return SendError( playerid, "A money exploit occurred. Contact " SERVER_OPERATOR " ASAP." ); GivePlayerCash( playerid, amount ); GivePlayerExperience( playerid, E_ROBBERY, 0.2 ); // give 10% of what it normally does, since it does this for like 4-5 times diff --git a/gamemodes/irresistible/cnr/features/vip/coin_market.pwn b/gamemodes/irresistible/cnr/features/vip/coin_market.pwn index 197d8ff..2ba784b 100644 --- a/gamemodes/irresistible/cnr/features/vip/coin_market.pwn +++ b/gamemodes/irresistible/cnr/features/vip/coin_market.pwn @@ -210,11 +210,11 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) // Redirect player if ( selected_vip == VIP_DIAMOND ) { - ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" ); + ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM " SERVER_OPERATOR " on the forum when you make a decision!", "Gift it!", "I'll Think!" ); } else if ( selected_vip == VIP_PLATINUM ) { - ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" ); + ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM " SERVER_OPERATOR " on the forum when you make a decision!", "Gift it!", "I'll Think!" ); } else { @@ -416,12 +416,12 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) if ( sscanf( inputtext, "u", pID ) ) { SendError( playerid, "Please enter a player's ID or name." ); - ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" ); + ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM " SERVER_OPERATOR " on the forum when you make a decision!", "Gift it!", "I'll Think!" ); } else if ( !IsPlayerConnected( pID ) ) { SendError( playerid, "This player is not connected." ); - ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" ); + ShowPlayerDialog( playerid, DIALOG_DONATED_PLATBRONZE, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Platinum V.I.P, you have the option of gifting Bronze VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM " SERVER_OPERATOR " on the forum when you make a decision!", "Gift it!", "I'll Think!" ); } else { @@ -447,12 +447,12 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) if ( sscanf( inputtext, "u", pID ) ) { SendError( playerid, "Please enter a player's ID or name." ); - ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" ); + ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM " SERVER_OPERATOR " on the forum when you make a decision!", "Gift it!", "I'll Think!" ); } else if ( !IsPlayerConnected( pID ) ) { SendError( playerid, "This player is not connected." ); - ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM Damen on the forum when you make a decision!", "Gift it!", "I'll Think!" ); + ShowPlayerDialog( playerid, DIALOG_DONATED_DIAGOLD, DIALOG_STYLE_INPUT, ""COL_GOLD"SF-CNR Donation", ""COL_WHITE"As you've redeemed Diamond V.I.P, you have the option of gifting Gold VIP to someone.\n\nIf you would like to gift it to yourself, type your name/id or the person you're gifting it to.\n\n"COL_ORANGE"If you just don't know yet, cancel and PM " SERVER_OPERATOR " on the forum when you make a decision!", "Gift it!", "I'll Think!" ); } else { @@ -801,7 +801,7 @@ static stock ShowPlayerVipRedeemedDialog( playerid ) ""COL_GREY" * What are the commands?"COL_WHITE" Use /vipcmds to view a detailed list of VIP commands.\n"\ ""COL_GREY" * What did I receive?"COL_WHITE" Check through your V.I.P package contents via our site (forum -> announcements board).\n" ); strcat( szLargeString, ""COL_GREY" * How to redeem my houses/vehicles?"COL_WHITE" You will be announced to the admins and noted down for assistance, so please wait!\n"\ - ""COL_GREY" * I'm unsure, help?"COL_WHITE" If you have any questions, please /ask otherwise enquire Damen via the forums!\n\nThanks for choosing to spend your Irresistible Coins, enjoy what you've got! :P" ); + ""COL_GREY" * I'm unsure, help?"COL_WHITE" If you have any questions, please /ask otherwise enquire " SERVER_OPERATOR " via the forums!\n\nThanks for choosing to spend your Irresistible Coins, enjoy what you've got! :P" ); ShowPlayerDialog( playerid, DIALOG_NULL, DIALOG_STYLE_MSGBOX, ""COL_GOLD"SF-CNR Donation", szLargeString, "Got it!", "" ); } diff --git a/gamemodes/irresistible/cnr/features/vip/player_note.pwn b/gamemodes/irresistible/cnr/features/vip/player_note.pwn index 45de4a6..dfaf6e7 100644 --- a/gamemodes/irresistible/cnr/features/vip/player_note.pwn +++ b/gamemodes/irresistible/cnr/features/vip/player_note.pwn @@ -146,7 +146,7 @@ thread deleteplayernote( playerid, noteid ) if ( rows ) { SaveToAdminLog( playerid, noteid, "removed note" ); mysql_single_query( sprintf( "UPDATE `NOTES` SET `DELETED`=%d WHERE `ID`=%d", p_AccountID[ playerid ], noteid ) ); - SendServerMessage( playerid, "You have removed note id %d. If there are any problems, contact Damen/Council.", noteid ); + SendServerMessage( playerid, "You have removed note id %d. If there are any problems, contact " SERVER_OPERATOR "/Council.", noteid ); AddAdminLogLineFormatted( "%s(%d) has deleted note id %d", ReturnPlayerName( playerid ), playerid, noteid ); return 1; } diff --git a/gamemodes/irresistible/cnr/features/vip/redeem_code.pwn b/gamemodes/irresistible/cnr/features/vip/redeem_code.pwn index a8b1a96..4ee283b 100644 --- a/gamemodes/irresistible/cnr/features/vip/redeem_code.pwn +++ b/gamemodes/irresistible/cnr/features/vip/redeem_code.pwn @@ -44,7 +44,7 @@ hook OnScriptInit( ) SetDynamicObjectMaterialText( ( g_TopDonorWall = CreateDynamicObject( 3074, -1574.3559, 885.1296, 14.0153, 0.0000, 0.0000, -0.0156 ) ), 0, "Nobody donated :(", 130, "Arial", 48, 0, -65536, 0, 1 ); // Latest Donor TD - g_TopDonorTD = TextDrawCreate(320.000000, 2.000000, "Top Donor Damen - $0.00, ~w~~h~~h~Latest Donor Damen - $0.00"); + g_TopDonorTD = TextDrawCreate(320.000000, 2.000000, "Top Donor " SERVER_OPERATOR " - $0.00, ~w~~h~~h~Latest Donor " SERVER_OPERATOR " - $0.00"); TextDrawAlignment(g_TopDonorTD, 2); TextDrawBackgroundColor(g_TopDonorTD, 0); TextDrawFont(g_TopDonorTD, 1); @@ -87,7 +87,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) strcat( szLargeString, ""COL_WHITE"Thank you a lot for donating! :D In return for your dignity, you have received Irresistible Coins.\n\n"\ ""COL_GREY" * What do I do with Irresistible Coins?"COL_WHITE" You can claim the V.I.P of your choice via "COL_GREY"/irresistiblecoins market"COL_WHITE".\n" ); strcat( szLargeString, ""COL_GREY" * How many do I have?"COL_WHITE" You can see how many Irresistible Coins you have via "COL_GREY"/irresistiblecoins"COL_WHITE".\n" \ - ""COL_GREY" * I'm unsure, help?"COL_WHITE" If you have any questions, please /ask otherwise enquire Damen via the forums!\n\nThank you once again for your contribution to our community! :P" ); + ""COL_GREY" * I'm unsure, help?"COL_WHITE" If you have any questions, please /ask otherwise enquire " SERVER_OPERATOR " via the forums!\n\nThank you once again for your contribution to our community! :P" ); return ShowPlayerDialog( playerid, DIALOG_FINISHED_DONATING, DIALOG_STYLE_MSGBOX, ""COL_GOLD"SF-CNR Donation", szLargeString, "Got it!", "" ); } else if ( dialogid == DIALOG_FINISHED_DONATING ) @@ -97,7 +97,7 @@ hook OnDialogResponse( playerid, dialogid, response, listitem, inputtext[ ] ) else if ( dialogid == DIALOG_LATEST_DONOR ) { if ( GetPVarType( playerid, "just_donated" ) != PLAYER_VARTYPE_FLOAT ) - return SendError( playerid, "Seems to be an issue where we couldn't find how much you donated. Report to Damen." ); + return SendError( playerid, "Seems to be an issue where we couldn't find how much you donated. Report to " SERVER_OPERATOR "." ); new Float: fAmount = GetPVarFloat( playerid, "just_donated" ); diff --git a/gamemodes/irresistible/cnr/features/visage/blackjack.pwn b/gamemodes/irresistible/cnr/features/visage/blackjack.pwn index 54c4fdf..d644acc 100644 --- a/gamemodes/irresistible/cnr/features/visage/blackjack.pwn +++ b/gamemodes/irresistible/cnr/features/visage/blackjack.pwn @@ -710,7 +710,7 @@ stock SendClientMessageToBlackjack( tableid, colour, format[ ], va_args<> ) stock InitializeBlackjackTextdraws( id ) { - g_blackjackTurnTD[ id ] = TextDrawCreate(330.000000, 204.000000, "Damen has 5 seconds"); + g_blackjackTurnTD[ id ] = TextDrawCreate(330.000000, 204.000000, "" SERVER_OPERATOR " has 5 seconds"); TextDrawAlignment(g_blackjackTurnTD[ id ], 2); TextDrawBackgroundColor(g_blackjackTurnTD[ id ], 255); TextDrawFont(g_blackjackTurnTD[ id ], 1); diff --git a/gamemodes/irresistible/config/server.pwn b/gamemodes/irresistible/config/server.pwn index 560e4e6..e07c5e1 100644 --- a/gamemodes/irresistible/config/server.pwn +++ b/gamemodes/irresistible/config/server.pwn @@ -17,6 +17,10 @@ #define SERVER_IP "54.36.127.43:7777" #define SERVER_TWITTER "IrresistibleDev" +/* ** Server Operator ** */ +#define SERVER_OPERATOR "Lorenc" +#define SERVER_OPERATOR_ACC_ID 1 + /* ** Comment line to disable feature ** */ //#define SERVER_RULES_URL "files.sfcnr.com/en_rules.txt" // used for /rules (cnr\features\server_rules.pwn) #define SERVER_TWITTER_FEED_URL "files.sfcnr.com/cnr_twitter.php" // used for /twitter (cnr\commands\cmd_twitter.pwn) @@ -55,7 +59,7 @@ hook OnScriptInit( ) /* ** Functions ** */ stock IsPlayerLeadMaintainer( playerid ) // Limits money, coin, xp spawning to this user id { - return GetPlayerAccountID( playerid ) == 1 || GetPlayerAccountID( playerid ) == 674688; + return GetPlayerAccountID( playerid ) == SERVER_OPERATOR_ACC_ID; } stock IsPlayerServerMaintainer( playerid ) // Same as lead maintainer, just cant spawn money/xp/coins