05.10.2013, 22:54
it seems that if I do /report, it wont show if ID 1 is admin, and is the same thing for /a chat and /admins..idk what the fuck ive done wrong, im a noob.
pawn Код:
CMD:a(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
new string[128],
amessage[100];
if(sscanf(params, "s[100]", amessage))
{
SendClientMessage(playerid, -1, "USAGE: /a [Text]");
return 1;
}
else
{
format(string, sizeof(string), "[Admin Chat] %s: %s", GetName(playerid), amessage);
foreach (new i : Player)
{
if(PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i, COLYELLOW, string);
return 1;
}
return 1;
}
}
}
return 1;
}
pawn Код:
CMD:admins(playerid, params[])
{
SCM(pid, COLYELLOW, "Admins Online:");
foreach(new i : Player)
{
if(PlayerInfo[i][pAdmin] >=1)
{
new name[100];
format(name, sizeof(name), "Admin %s {%d}",GetName(i), (i));
SCM(pid, COLWHITE, name);
return 1;
}
}
return 1;
}
CMD:report(playerid, params[])
{
new string[128];
// reportmessage[100];
if(strlen(params)>=100)return SCM(pid, COLRED, "[Server]{F0F0F0}: Max report length is 100.");
else
{
format(string, sizeof(string), "[Report] %s {%d}: %s", GetName(playerid), playerid, params);
SCM(pid, COLPURPLE, "Your message has been sent to online admins!");
foreach (new i : Player)
{
if(PlayerInfo[i][pAdmin] >=1)
{
SCM(i, COLPURPLE, string);
return 1;
}
}
}
return 1;
}