add rcon message helper function
This commit is contained in:
parent
90ff5fb71a
commit
605f4a28a6
@ -57,6 +57,20 @@ stock SendClientMessageFormatted( playerid, colour, format[ ], va_args<> )
|
||||
}
|
||||
}
|
||||
|
||||
// purpose: send client message to all rcon admins
|
||||
stock SendClientMessageToRCON( colour, format[ ], va_args<> )
|
||||
{
|
||||
static
|
||||
out[ 144 ];
|
||||
|
||||
va_format( out, sizeof( out ), format, va_start<2> );
|
||||
|
||||
foreach ( new i : Player ) if ( IsPlayerAdmin( i ) ) {
|
||||
SendClientMessage( i, colour, out );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
// purpose: trim a string
|
||||
stock trimString( strSrc[ ] )
|
||||
{
|
||||
|
@ -103,8 +103,6 @@ new bool: False = false;
|
||||
|
||||
/* Beast Functions */
|
||||
|
||||
#define SendClientMessageToRCON(%1,%2,%3) \
|
||||
do{foreach(new fI : Player){if (IsPlayerAdmin(fI))format(szNormalString,sizeof(szNormalString),(%2),%3),SendClientMessage(fI,(%1),szNormalString);}}while(False)
|
||||
#define SendClientMessageToCops(%1,%2,%3) \
|
||||
do{foreach(new fI : Player){if (p_Class[fI]==CLASS_POLICE)format(szNormalString,sizeof(szNormalString),(%2),%3),SendClientMessage(fI,(%1),szNormalString);}}while(False)
|
||||
#define SendClientMessageToFireman(%1,%2,%3) \
|
||||
|
Loading…
Reference in New Issue
Block a user