02.06.2013, 06:43
Hello!
Here is my /report command...Everything works fine, but for reason I can write MAX. 5 characters, I don't know why
/report:
SendAdminMessage:
Thanks
Here is my /report command...Everything works fine, but for reason I can write MAX. 5 characters, I don't know why
/report:
pawn Код:
CMD:report(playerid, params[])
{
new targetid;
new reason[60];
new string[200];
if(sscanf(params, "us", targetid, reason))return SCM(playerid, COLOR_GREY, "[USAGE]: /report [playerid] [reason]");
if(!IsPlayerConnected(targetid))return SCM(playerid, COLOR_RED, "[ERROR]: This player is not connected.");
SendClientMessage(playerid, COLOR_GREEN, "[SYSTEM]: Your Report have been send to an online Administartor (/admins)! Thank you For Reporting!");
format(string, sizeof(string), "{80FF00}[REPORT]: {FB0435}%s(ID:%d) {00FF00}has Reported {FB0435}%s(ID:%d){00FF00}! {FB0435}|| {00FF00}Reason: {FB0435}%s", GetName(playerid), playerid, GetName(targetid), targetid, reason);
SendAdminMessage(string);
return 1;
}
pawn Код:
stock SendAdminMessage(const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(pInfo[i][Adminlevel] >= 1)
SendClientMessage(i, -1, string);
}
return 1;
}