12.07.2011, 07:25
pawn Код:
if(strcmp(cmd, "/report", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[96];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /report [text]");
format(string, sizeof(string), "Report from [%d]%s: %s",playerid, sendername, (result));
ABroadCast(COLOR_LIGHTYELLOW,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Your report message was sent to online administrators, thank you.");
}
return 1;
}
EDIT: Here RCON cmds
/rcon cmdlist - Shows a list with commands.
/rcon varlist - Shows a list with the current variables.
/rcon exit - Closes the server.
/rcon echo [text] - Shows the [text] in the console of the server (NOT the client-console in-game).
/rcon hostname [name] - change the hostname text (example: /rcon hostname my server).
/rcon gamemodetext [name] - change the gamemode text (example: /rcon gamemodetext my gamemode).
/rcon mapname [name] - change the map name text (example: /rcon mapname San Andreas).
/rcon exec [filename] - Executes the file which contains server cfg (example: /rcon exec blah.cfg).
/rcon kick [ID] - Kick the player with the given ID (example: /rcon kick 2).
/rcon ban [ID] - Ban the player with the given ID (example: /rcon ban 2).
/rcon changemode [mode] - This command will change the current gamemode to the given one (example: if you want to play sftdm: /rcon changemode sftdm).
/rcon gmx - Will load the next gamemode in server.cfg.
/rcon reloadbans - reloads the samp.ban where the banned IP addresses are stored. This will clear all the IP-addresses.
/rcon reloadlog - clears the server_log.txt.
/rcon say - shows a message to the players in the client-console (example: /rcon say blah).
/rcon players - Shows the players that are in the server (with their name, IP & ping).
/rcon banip [IP] - Ban the given IP (example: /rcon banip 127.0.0.1).
/rcon unbanip [IP] - Unban the given IP (example: /rcon unbanip 127.0.0.1).
/rcon gravity - Changes the gravity (example: /rcon gravity 0.00.
/rcon weather [ID] - Changes the weather (example: /rcon weather 1).
/rcon loadfs - Loads the given filterscript (example: /rcon loadfs adminfs).
/rcon unloadfs - Unload the given filterscript (example: /rcon unloadfs adminfs).
/rcon reloadfs - Reloads the given filterscript (example: /rcon reloadfs adminfs).
/rcon rcon_password [PASSWORD] - Change the rcon's password