From 3e51f450e227a37c017253e666d2a8fa1288593f Mon Sep 17 00:00:00 2001 From: Dusan Date: Fri, 31 May 2019 12:50:28 +0200 Subject: [PATCH 1/2] Typos --- gamemodes/irresistible/cnr/commands/admin/_admin.pwn | 1 + .../irresistible/cnr/commands/admin/admin_five.pwn | 4 ++-- .../irresistible/cnr/commands/admin/admin_six.pwn | 6 +++--- .../irresistible/cnr/commands/admin/admin_three.pwn | 10 +++++----- gamemodes/irresistible/cnr/features/gates.pwn | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gamemodes/irresistible/cnr/commands/admin/_admin.pwn b/gamemodes/irresistible/cnr/commands/admin/_admin.pwn index a4eede9..04f54ac 100644 --- a/gamemodes/irresistible/cnr/commands/admin/_admin.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/_admin.pwn @@ -145,6 +145,7 @@ static stock { 5, "/achangename", "Change a players name" }, { 5, "/unbanip", "Unbanning a IP address" }, { 5, "/unban", "Unban a player from the server" }, + { 5, "/unforceac", "Unforce a player from using CAC" }, { 5, "/doublexp", "Enable/disable double XP" }, { 5, "/toggleviewpm", "Toggle to view private messages" }, { 5, "/respawnallv", "Respawning all server vehicles" }, diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn index b9582df..3af945c 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_five.pwn @@ -755,7 +755,7 @@ CMD:unforceac( playerid, params[ ] ) Query[ 70 ]; if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); - else if ( sscanf( params, "s[24]", player ) ) SendUsage( playerid, "/unban [NAME]" ); + else if ( sscanf( params, "s[24]", player ) ) SendUsage( playerid, "/unforceac [PLAYER_NAME]" ); else { new pID = GetPlayerIDFromName( player ); @@ -780,7 +780,7 @@ thread OnPlayerUnforceAC( playerid, player[ ], pID, bool:offline ) Query[ 70 ], rows = cache_get_row_count( ); if ( !rows ) return SendError( playerid, "The database does not contain the username you are attempting to remove from forced ac." ); - + if ( offline ) { diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_six.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_six.pwn index bc36451..3dd333f 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_six.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_six.pwn @@ -72,7 +72,7 @@ CMD:createentrance( playerid, params[ ] ) ; if ( p_AdminLevel[ playerid ] < 6 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); - else if ( sscanf( params, "ufffdddds[32]", ownerid, toX, toY, toZ, interior, world, customInterior, vipOnly, label ) ) return SendUsage( playerid, "/createhouse [OWNER] [TO_X] [TO_Y] [TO_Z] [INTERIOR] [WORLD] [CUSTOM_INTERIOR] [VIP_ONLY] [LABEL]" ); + else if ( sscanf( params, "ufffdddds[32]", ownerid, toX, toY, toZ, interior, world, customInterior, vipOnly, label ) ) return SendUsage( playerid, "/createentrance [OWNER] [TO_X] [TO_Y] [TO_Z] [INTERIOR] [WORLD] [CUSTOM_INTERIOR] [VIP_ONLY] [LABEL]" ); else if ( !IsPlayerConnected( ownerid ) || IsPlayerNPC( ownerid ) ) return SendError( playerid, "Invalid Player ID." ); else { @@ -83,7 +83,7 @@ CMD:createentrance( playerid, params[ ] ) entranceid = CreateEntrance( label, X, Y, Z, toX, toY, toZ, interior, world, customInterior > 0, vipOnly > 0 ); if ( entranceid == -1 ) - return SendClientMessage( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" Unable to create a entrance due to a unexpected error." ); + return SendClientMessage( playerid, -1, ""COL_PINK"[ENTRANCE]"COL_WHITE" Unable to create a entrance due to a unexpected error." ); SaveToAdminLog( playerid, entranceid, "created entrance" ); g_entranceData[ entranceid ] [ E_SAVED ] = true; @@ -91,7 +91,7 @@ CMD:createentrance( playerid, params[ ] ) format( szBigString, 256, "INSERT INTO `ENTRANCES` (`OWNER`, `LABEL`, `X`, `Y`, `Z`, `EX`, `EY`, `EZ`, `INTERIOR`, `WORLD`, `CUSTOM`, `VIP_ONLY`) VALUES ('%s','%s',%f,%f,%f,%f,%f,%f,%d,%d,%d,%d)", mysql_escape( ReturnPlayerName( ownerid ) ), mysql_escape( label ), X, Y, Z, toX, toY, toZ, interior, world, customInterior, vipOnly ); mysql_single_query( szBigString ); - SendClientMessageFormatted( playerid, -1, ""COL_PINK"[HOUSE]"COL_WHITE" You have created a entrance using id %d.", entranceid ); + SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ENTRANCE]"COL_WHITE" You have created a entrance using id %d.", entranceid ); } } return 1; diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_three.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_three.pwn index a00336f..5b1bf9a 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_three.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_three.pwn @@ -507,7 +507,7 @@ CMD:ban( playerid, params [ ] ) CMD:banlog( playerid, params[ ] ) { - new + new iName[ MAX_PLAYER_NAME ]; if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); @@ -522,14 +522,14 @@ CMD:banlog( playerid, params[ ] ) thread OnPlayerBanLog( playerid, const Name[ ] ) { - new + new rows = cache_get_row_count( ); if ( ! rows ) { return SendError( playerid, "This player isn't banned." ); } - static + static ban_ip[ 16 ], ban_reason[ 80 ], ban_by[ 24 ], @@ -643,7 +643,7 @@ CMD:chatban( playerid, params[ ] ) CMD:unchatban( playerid, params[ ] ) { - + new pID; if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); @@ -655,7 +655,7 @@ CMD:unchatban( playerid, params[ ] ) { p_ChatBanned{ pID } = false; mysql_single_query( sprintf( "DELETE FROM `CHAT_BANS` WHERE `ID`=%d", p_AccountID[ pID ] ) ); - SendClientMessageFormatted( pID, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have been chat unbanned by %s.", ReturnPlayerName( pID ) ); + SendClientMessageFormatted( pID, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have been chat unbanned by %s.", ReturnPlayerName( playerid ) ); SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have chat unbanned %s.", ReturnPlayerName( pID ) ); AddAdminLogLineFormatted( "%s(%d) has chat unbanned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID ); SaveToAdminLog( playerid, p_AccountID[ pID ], "chat unban" ); diff --git a/gamemodes/irresistible/cnr/features/gates.pwn b/gamemodes/irresistible/cnr/features/gates.pwn index 835e097..ad8127b 100644 --- a/gamemodes/irresistible/cnr/features/gates.pwn +++ b/gamemodes/irresistible/cnr/features/gates.pwn @@ -322,7 +322,7 @@ hook OnPlayerEditDynObject( playerid, objectid, response, Float: x, Float: y, Fl g_gateData[ gID ] [ E_RX ] = float( floatround( rx ) ); g_gateData[ gID ] [ E_RY ] = float( floatround( ry ) ); g_gateData[ gID ] [ E_RZ ] = float( floatround( rz ) ); - SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GATE]"COL_WHITE" Gate Open Position: "COL_GREY" %f, %f, %f, %f, %f, %f", g_gateData[ gID ] [ E_X ], g_gateData[ gID ] [ E_Y ], g_gateData[ gID ] [ E_Z ], g_gateData[ gID ] [ E_RX ], g_gateData[ gID ] [ E_RY ], g_gateData[ gID ] [ E_RZ ] ); + SendClientMessageFormatted( playerid, -1, ""COL_PINK"[GATE]"COL_WHITE" Gate Close Position: "COL_GREY" %f, %f, %f, %f, %f, %f", g_gateData[ gID ] [ E_X ], g_gateData[ gID ] [ E_Y ], g_gateData[ gID ] [ E_Z ], g_gateData[ gID ] [ E_RX ], g_gateData[ gID ] [ E_RY ], g_gateData[ gID ] [ E_RZ ] ); } case 10: { From 6c94cda69da1317acf7bec854555c641b43b644c Mon Sep 17 00:00:00 2001 From: Dusan Date: Fri, 31 May 2019 13:20:02 +0200 Subject: [PATCH 2/2] Chatban global message --- gamemodes/irresistible/cnr/commands/admin/admin_three.pwn | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gamemodes/irresistible/cnr/commands/admin/admin_three.pwn b/gamemodes/irresistible/cnr/commands/admin/admin_three.pwn index 5b1bf9a..02e5eb3 100644 --- a/gamemodes/irresistible/cnr/commands/admin/admin_three.pwn +++ b/gamemodes/irresistible/cnr/commands/admin/admin_three.pwn @@ -632,8 +632,7 @@ CMD:chatban( playerid, params[ ] ) p_ChatBannedBy[ pID ] = ReturnPlayerName( playerid ); p_ChatBanReason[ pID ] = reason; mysql_single_query( sprintf( "INSERT INTO `CHAT_BANS` (`ID`, `NAME`, `BANNED_BY_ID`, `BANNED_BY`, `REASON`) VALUES (%d, '%s', %d, '%s', '%s')", p_AccountID[ pID ], mysql_escape( ReturnPlayerName( pID ) ), p_AccountID[ playerid ], mysql_escape( ReturnPlayerName( playerid ) ), mysql_escape( reason ) ) ); - SendClientMessageFormatted( pID, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have been chat banned by %s for '%s'.", ReturnPlayerName( playerid ), reason ); - SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have chat banned %s for '%s'.", ReturnPlayerName( pID ), reason ); + SendGlobalMessage( -1, ""COL_PINK"[ADMIN]{FFFFFF} %s has chat banned %s(%d) "COL_GREEN"[REASON: %s]", ReturnPlayerName( playerid ), ReturnPlayerName( pID ), pID, reason ); AddAdminLogLineFormatted( "%s(%d) has chat banned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID ); SaveToAdminLog( playerid, p_AccountID[ pID ], "chat ban" ); } @@ -655,8 +654,7 @@ CMD:unchatban( playerid, params[ ] ) { p_ChatBanned{ pID } = false; mysql_single_query( sprintf( "DELETE FROM `CHAT_BANS` WHERE `ID`=%d", p_AccountID[ pID ] ) ); - SendClientMessageFormatted( pID, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have been chat unbanned by %s.", ReturnPlayerName( playerid ) ); - SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have chat unbanned %s.", ReturnPlayerName( pID ) ); + SendGlobalMessage( -1, ""COL_PINK"[ADMIN]{FFFFFF} %s(%d) has been chat un-banned by %s", ReturnPlayerName( pID ), pID, ReturnPlayerName( playerid ) ); AddAdminLogLineFormatted( "%s(%d) has chat unbanned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID ); SaveToAdminLog( playerid, p_AccountID[ pID ], "chat unban" ); }