Merge pull request #10 from dusan01/fixes/admin-commands
Typos in admin commands
This commit is contained in:
commit
f1902bb219
@ -145,6 +145,7 @@ static stock
|
|||||||
{ 5, "/achangename", "Change a players name" },
|
{ 5, "/achangename", "Change a players name" },
|
||||||
{ 5, "/unbanip", "Unbanning a IP address" },
|
{ 5, "/unbanip", "Unbanning a IP address" },
|
||||||
{ 5, "/unban", "Unban a player from the server" },
|
{ 5, "/unban", "Unban a player from the server" },
|
||||||
|
{ 5, "/unforceac", "Unforce a player from using CAC" },
|
||||||
{ 5, "/doublexp", "Enable/disable double XP" },
|
{ 5, "/doublexp", "Enable/disable double XP" },
|
||||||
{ 5, "/toggleviewpm", "Toggle to view private messages" },
|
{ 5, "/toggleviewpm", "Toggle to view private messages" },
|
||||||
{ 5, "/respawnallv", "Respawning all server vehicles" },
|
{ 5, "/respawnallv", "Respawning all server vehicles" },
|
||||||
|
@ -755,7 +755,7 @@ CMD:unforceac( playerid, params[ ] )
|
|||||||
Query[ 70 ];
|
Query[ 70 ];
|
||||||
|
|
||||||
if ( p_AdminLevel[ playerid ] < 5 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
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
|
else
|
||||||
{
|
{
|
||||||
new pID = GetPlayerIDFromName( player );
|
new pID = GetPlayerIDFromName( player );
|
||||||
@ -780,7 +780,7 @@ thread OnPlayerUnforceAC( playerid, player[ ], pID, bool:offline )
|
|||||||
Query[ 70 ], rows = cache_get_row_count( );
|
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 ( !rows ) return SendError( playerid, "The database does not contain the username you are attempting to remove from forced ac." );
|
||||||
|
|
||||||
if ( offline )
|
if ( offline )
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ CMD:createentrance( playerid, params[ ] )
|
|||||||
;
|
;
|
||||||
|
|
||||||
if ( p_AdminLevel[ playerid ] < 6 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
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 if ( !IsPlayerConnected( ownerid ) || IsPlayerNPC( ownerid ) ) return SendError( playerid, "Invalid Player ID." );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -83,7 +83,7 @@ CMD:createentrance( playerid, params[ ] )
|
|||||||
entranceid = CreateEntrance( label, X, Y, Z, toX, toY, toZ, interior, world, customInterior > 0, vipOnly > 0 );
|
entranceid = CreateEntrance( label, X, Y, Z, toX, toY, toZ, interior, world, customInterior > 0, vipOnly > 0 );
|
||||||
|
|
||||||
if ( entranceid == -1 )
|
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" );
|
SaveToAdminLog( playerid, entranceid, "created entrance" );
|
||||||
g_entranceData[ entranceid ] [ E_SAVED ] = true;
|
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 );
|
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 );
|
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;
|
return 1;
|
||||||
|
@ -507,7 +507,7 @@ CMD:ban( playerid, params [ ] )
|
|||||||
|
|
||||||
CMD:banlog( playerid, params[ ] )
|
CMD:banlog( playerid, params[ ] )
|
||||||
{
|
{
|
||||||
new
|
new
|
||||||
iName[ MAX_PLAYER_NAME ];
|
iName[ MAX_PLAYER_NAME ];
|
||||||
|
|
||||||
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
||||||
@ -522,14 +522,14 @@ CMD:banlog( playerid, params[ ] )
|
|||||||
|
|
||||||
thread OnPlayerBanLog( playerid, const Name[ ] )
|
thread OnPlayerBanLog( playerid, const Name[ ] )
|
||||||
{
|
{
|
||||||
new
|
new
|
||||||
rows = cache_get_row_count( );
|
rows = cache_get_row_count( );
|
||||||
|
|
||||||
if ( ! rows ) {
|
if ( ! rows ) {
|
||||||
return SendError( playerid, "This player isn't banned." );
|
return SendError( playerid, "This player isn't banned." );
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
static
|
||||||
ban_ip[ 16 ],
|
ban_ip[ 16 ],
|
||||||
ban_reason[ 80 ],
|
ban_reason[ 80 ],
|
||||||
ban_by[ 24 ],
|
ban_by[ 24 ],
|
||||||
@ -632,8 +632,7 @@ CMD:chatban( playerid, params[ ] )
|
|||||||
p_ChatBannedBy[ pID ] = ReturnPlayerName( playerid );
|
p_ChatBannedBy[ pID ] = ReturnPlayerName( playerid );
|
||||||
p_ChatBanReason[ pID ] = reason;
|
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 ) ) );
|
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 );
|
SendGlobalMessage( -1, ""COL_PINK"[ADMIN]{FFFFFF} %s has chat banned %s(%d) "COL_GREEN"[REASON: %s]", ReturnPlayerName( playerid ), ReturnPlayerName( pID ), pID, reason );
|
||||||
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have chat banned %s for '%s'.", ReturnPlayerName( pID ), reason );
|
|
||||||
AddAdminLogLineFormatted( "%s(%d) has chat banned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
|
AddAdminLogLineFormatted( "%s(%d) has chat banned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
|
||||||
SaveToAdminLog( playerid, p_AccountID[ pID ], "chat ban" );
|
SaveToAdminLog( playerid, p_AccountID[ pID ], "chat ban" );
|
||||||
}
|
}
|
||||||
@ -643,7 +642,7 @@ CMD:chatban( playerid, params[ ] )
|
|||||||
|
|
||||||
CMD:unchatban( playerid, params[ ] )
|
CMD:unchatban( playerid, params[ ] )
|
||||||
{
|
{
|
||||||
|
|
||||||
new pID;
|
new pID;
|
||||||
|
|
||||||
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT );
|
||||||
@ -655,8 +654,7 @@ CMD:unchatban( playerid, params[ ] )
|
|||||||
{
|
{
|
||||||
p_ChatBanned{ pID } = false;
|
p_ChatBanned{ pID } = false;
|
||||||
mysql_single_query( sprintf( "DELETE FROM `CHAT_BANS` WHERE `ID`=%d", p_AccountID[ pID ] ) );
|
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 ) );
|
SendGlobalMessage( -1, ""COL_PINK"[ADMIN]{FFFFFF} %s(%d) has been chat un-banned by %s", ReturnPlayerName( pID ), pID, 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 );
|
AddAdminLogLineFormatted( "%s(%d) has chat unbanned %s(%d)", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), pID );
|
||||||
SaveToAdminLog( playerid, p_AccountID[ pID ], "chat unban" );
|
SaveToAdminLog( playerid, p_AccountID[ pID ], "chat unban" );
|
||||||
}
|
}
|
||||||
|
@ -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_RX ] = float( floatround( rx ) );
|
||||||
g_gateData[ gID ] [ E_RY ] = float( floatround( ry ) );
|
g_gateData[ gID ] [ E_RY ] = float( floatround( ry ) );
|
||||||
g_gateData[ gID ] [ E_RZ ] = float( floatround( rz ) );
|
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:
|
case 10:
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user