Merge pull request #20 from meCloudy/viewpbchat

Viewpbchat
This commit is contained in:
Lorenc Pekaj 2019-06-02 11:40:03 +10:00 committed by GitHub
commit 681db77c29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 0 deletions

View File

@ -164,6 +164,7 @@ static stock
{ 5, "/seteventhost", "Setting event host to player" }, { 5, "/seteventhost", "Setting event host to player" },
{ 5, "/weather", "Settings world weather" }, { 5, "/weather", "Settings world weather" },
{ 5, "/viewpolicechat", "Viewing the police radio/chat" }, { 5, "/viewpolicechat", "Viewing the police radio/chat" },
{ 5, "/viewpbchat", "Viewing all paintball lobbies chats" },
/* ** Level 6 Commands ** */ /* ** Level 6 Commands ** */
{ 6, "/reloadeditor", "Reloads object editer script" }, { 6, "/reloadeditor", "Reloads object editer script" },

View File

@ -50,6 +50,18 @@ CMD:viewpolicechat( playerid, params[ ] )
return 1; return 1;
} }
CMD:viewpbchat( playerid, params[ ] )
{
if ( p_AdminLevel[ playerid ] < 5 && !IsPlayerUnderCover( playerid ) ) return SendError( playerid, ADMIN_COMMAND_REJECT );
p_TogglePBChat{ playerid } = !p_TogglePBChat{ playerid };
SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have %s viewing paint-ball chat.", p_TogglePBChat{ playerid } == true ? ("toggled") : ("un-toggled") );
if ( !IsPlayerUnderCover( playerid ) ) {
AddAdminLogLineFormatted( "%s(%d) has %s viewing paintball chat", ReturnPlayerName( playerid ), playerid, p_TogglePBChat{ playerid } == true ? ("toggled") : ("un-toggled") );
}
return 1;
}
CMD:check( playerid, params[ ] ) CMD:check( playerid, params[ ] )
{ {
new new

View File

@ -264,6 +264,9 @@ stock JailPlayer( playerid, seconds, admin = 0 )
p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID; p_DetainedLabel [ playerid ] = Text3D: INVALID_3DTEXT_ID;
p_DetainedBy [ playerid ] = INVALID_PLAYER_ID; p_DetainedBy [ playerid ] = INVALID_PLAYER_ID;
#if defined __cloudy_event_system
RemovePlayerFromEvent ( playerid, true );
#endif
CancelEdit ( playerid ); CancelEdit ( playerid );
RemovePlayerStolensFromHands( playerid ); RemovePlayerStolensFromHands( playerid );
StopPlayerUsingSlotMachine ( playerid ); StopPlayerUsingSlotMachine ( playerid );

View File

@ -417,6 +417,10 @@ CMD:p( playerid, params[ ] )
else else
{ {
SendClientMessageToPaintball( id, -1, ""COL_GREY"<Paintball Chat> %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, msg ); SendClientMessageToPaintball( id, -1, ""COL_GREY"<Paintball Chat> %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, msg );
foreach ( new i : Player ) if ( ( p_AdminLevel[ i ] >= 5 || IsPlayerUnderCover( i ) ) && p_TogglePBChat{ i } == true ) {
SendClientMessageFormatted( i, -1, ""COL_GREY"<Paintball Chat Lobby %d > %s(%d):"COL_WHITE" %s", id, ReturnPlayerName( playerid ), playerid, msg );
}
} }
return 1; return 1;
} }

View File

@ -38,6 +38,7 @@ new
bool: p_Kidnapped [ MAX_PLAYERS char ], bool: p_Kidnapped [ MAX_PLAYERS char ],
bool: p_ToggledViewPM [ MAX_PLAYERS char ], bool: p_ToggledViewPM [ MAX_PLAYERS char ],
bool: p_ToggleCopChat [ MAX_PLAYERS char ], bool: p_ToggleCopChat [ MAX_PLAYERS char ],
bool: p_TogglePBChat [ MAX_PLAYERS char ],
bool: p_pausedToLoad [ MAX_PLAYERS char ], bool: p_pausedToLoad [ MAX_PLAYERS char ],
bool: p_CantUseReport [ MAX_PLAYERS char ], bool: p_CantUseReport [ MAX_PLAYERS char ],
p_pausedToLoadTimer [ MAX_PLAYERS ], p_pausedToLoadTimer [ MAX_PLAYERS ],