Command /report change the skin -
TheWay - 23.05.2016
When somebody use /report and if is too long his skin will be changed (only if the message is long)
Код:
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;
}
Re: Command /report change the skin -
justjamie - 23.05.2016
Hello.
If your skin keeps changing to skin id "60", then this is probably the cause.
PHP код:
PlayerData[playerid][pDr] = 60;
just delete it and you're good
Re: Command /report change the skin -
TheWay - 23.05.2016
It is a random skin, not 60.
Re: Command /report change the skin -
MBilal - 23.05.2016
You want if id report is too long his skin should be changed ? or what?
Re: Command /report change the skin -
TheWay - 23.05.2016
The skin is changed when somebody send a long report, I want to remove that thing but I don't know why.
Re: Command /report change the skin -
MBilal - 23.05.2016
Well i want to see the Function or timer which u are using to reset PlayerData[playerid][pDr] = 60;
to 0 .
Show me that function.
Re: Command /report change the skin -
GTLS - 23.05.2016
Problem is
Код:
if(sscanf(params, "s[256]", message)) return SCM(playerid, COLOR_GREY, SYNTAX_MESSAGE"/report [text]");
and
Код:
if( strlen( message ) > 128 )
in Code 1 you store message in size of 256 chars but in second code you show if size of message is more then 128 chars, it gives error.. i think you should change either sizes.. check if it works
Re: Command /report change the skin -
Stinged - 23.05.2016
Why do you use sscanf when you only want to use the params as a string?
Params is already a string.