-
Notifications
You must be signed in to change notification settings - Fork 29
RconCommand
Nexius edited this page Aug 14, 2021
·
8 revisions
Destination:
Incoming/Outgoing
Description:
Called when a command is sent via the in-game "/rcon command".
Parameters (for incoming packet):
Value type | Parameter | Short description |
---|---|---|
PR_UINT8 |
packetId | The ID of the packet |
PR_STRING32 |
command | A string containing the command that was typed, as well as any passed parameters |
Related SA-MP callbacks:
- OnRconCommand (if it's in-game command) or OnRconLoginAttempt (when the player is not logged in as RCON admin and typed '/rcon login')
Example (as incoming packet):
const RCON_COMMAND_SYNC = 201;
IPacket:RCON_COMMAND_SYNC(playerid, BitStream:bs)
{
new rconCommand[PR_RconCommand];
BS_IgnoreBits(bs, 8);
BS_ReadRconCommand(bs, rconCommand);
//Anything you want to see here
return 1;
}
- Refer to BrunoBM16's RPC and Packet lists