CMD:report(playerid, params)
{
new string[128],
reportmessage[100];
if(strlen(reportmessage)>=100)return SCM(pid, COLRED, "[Server]{F0F0F0}: Max report length is 100.");
else
{
format(string, sizeof(string), "[Report %s {%d}]: %s", GetName(playerid), playerid, reportmessage);
foreach (new i : Player)
{
if(PlayerInfo[i] [pAdmin] >=1)
{
SCM(i, COLPURPLE, string);
SCM(pid, COLPURPLE, "Your message has been sent to online admins!");
return 1;
}
}
}
return 1;
}
pawn Код:
|
CMD:am(playerid, params)
{
new string[128];
if(sacanf(params, "s[128]", string) return SCM(playerid, COLRED, "[Usage]{F0F0F0}: /am [message]");
format(string, sizeof(string), "[Message from %s (%d)]: %s", GetName(playerid), playerid, string);
foreach(new i : Player)
{
if(PlayerInfo[i] [pAdmin] >=1) SCM(i, COLPURPLE, string);
}
SCM(playerid, COLPURPLE, "Your message has been sent to online admins!");
return 1;
}
CMD:amsg(playerid, params)
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new player1, string[128];
if(sacanf(params, "us[128]", player1, string) return SCM(playerid, COLRED, "[Usage]{F0F0F0}: /amsg [Player ID] [message]");
if(!IsPlayerConnected(player1)) return SCM(playerid, COLRED, "[Server]{F0F0F0}: This player is not connected!");
format(string, sizeof(string), "[Message from Admin %s (%d)]: %s", GetName(playerid), playerid, string);
SCM(player1, COLPURPLE, string);
SCM(playerid, COLPURPLE, "Your message has been sent to online admins!");
}
else SCM(playerid, COLPURPLE, "You are not authorized to use this command!");
return 1;
}