When somebody use /report and if is too long his skin will be changed (only if the message is long)
Code:
CMD:report(playerid, params[])
{
new string2[256],message[256],admins=0;
if(sscanf(params, "s[256]", message)) return SCM(playerid, COLOR_GREY, SYNTAX_MESSAGE"/report [text]");
{
if( strlen( message ) > 128 )
return SCM( playerid, -1, "Nu poti trimite un report mai lung de 128 de caractere." );
if(PlayerData[playerid][pRMuted] <= 0)
{
if(PlayerData[playerid][pDr] <= 0)
{
foreach(Player, i)
{
if(PlayerData[i][pAdmin] >= 1)
{
admins++;
}
}
if(admins == 0) return SendClientMessage(playerid, COLOR_FRED, "{CCCCFF}[Server]: {FFFFFF}Nu sunt admini online.");
format(string2, sizeof(string2), "{CCCCFF}[Report]: {FFFFFF}`%s` reportul fost trimis adminilor.", message);
SendClientMessage(playerid, 0xFFFFFFFF, string2);
format(string2, sizeof(string2), ""HP44"[Report] %s [%d]: "HP22"%s.",PlayerData[playerid][pNormalName],playerid, message);
submitToHelpersAndAdmins(string2,COLOR_FRED);
PlayerData[playerid][pDr] = 60;
PlayerData[playerid][pReported] = 1;
format(PlayerData[playerid][pReportMessage], 256,"%s", string2);
}
else
{
SCM(playerid,-1,"{CCCCFF}[Server]: {FFFFFF}Poti da un report o data la un minut.");
}
}
else SCM(playerid,-1,"{CCCCFF}[Server]: {FFFFFF}ai restrictie la comanda /report.");
}
return 1;
}