20.02.2014, 13:26
I have problem with a function.I wanna in my command /ismuted to show "AdminAction: [BG]MrTinder is muted.Reason: Спам" but at reason it shows my name.
This is the function:
this is the command:
P.S; I sorry for the strange language ;d
Regards,
S. Ignatov
This is the function:
pawn Код:
public GetMuteReason(playerid)
{
new reason[32];
if(UserStats[playerid][pMuted] == 1) { reason = "Спам"; }
else if(UserStats[playerid][pMuted] == 2) { reason = "Псуване/Обиждане"; }
else if(UserStats[playerid][pMuted] == 3) { reason = "Спам/Псуване/Обиждане"; }
else if(UserStats[playerid][pMuted] == 4) { reason = "Оплакване във форума"; }
return 1;
}
pawn Код:
CMD:ismuted(playerid, params[])
{
new targetID, string[256];
if(UserStats[playerid][Admin] < 1) return SendClientMessage(playerid, COLOR_GREEN, NOACCESS);
if(sscanf(params, "u", targetID)) return SendClientMessage(playerid, COLOR_GREEN, "Използвай /ismuted [playerid]");
if(UserStats[targetID][pMuted] == 0) return SendClientMessage(playerid, COLOR_GREEN, "Този играч не е заглушен");
else
{
format(string, sizeof(string), "AdminAction: %s(ID %d) is muted.Reason: %s", GetName(targetID), targetID, GetMuteReason(targetID));
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
return 1;
}
Regards,
S. Ignatov