26.10.2013, 15:27
pawn Код:
CMD:******(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 3) return SendClientMessage(playerid, COLOR_GREY, "You are not an authorized to use this command.");
// if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
if(!strcmp(params, "all", true))
{
new string[126],string2[126]; // you forgot that
format(string, sizeof(string), "{FF0000}[Admin]{FF6347} %s has checked everybody online for ****** hacks.", NORPN(playerid));
SendClientMessageToAll(COLOR_LIGHTRED, string);
foreach(Player, p)
{
for(new i=0; i<13; i++)
{
GetPlayerWeaponData(p, i, weapons[i][0], weapons[i][1]);
if(weapons[i][0] != PlayerInfo[p][pWeapon][i] && weapons[i][0] != PlayerInfo[playerb][pWeapon][i] && weapons[i][1] != 0)
{
format(string, sizeof(string), "{FF0000}[Admin Warn]{FF6347} %s is hacking a %s. (Global ****** check by %s)", NORPN(p), RWN(weapons[i][0]), NORPN(playerid));
SendAdminMessage(COLOR_DARKRED, 1, string);
}
}
}
return 1;
}
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /****** [playerid/all]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
format(string2, sizeof(string2), "{FF0000}[Admin Warn]{FF6347} %s has checked %s for ****** hacks.", NORPN(playerid), NORPN(playerb));
SendAdminMessage(COLOR_DARKRED, 1, string);
for(new i=0; i<13; i++)
{
GetPlayerWeaponData(playerb, i, weapons[i][0], weapons[i][1]);
if(weapons[i][0] != PlayerInfo[playerb][pWeapon][i])
{
format(string, sizeof(string), "{FF0000}[Admin Warn]{FF6347} %s is hacking a %s. (Specific ****** check by %s)", NORPN(playerb), RWN(weapons[i][0]), NORPN(playerid));
SendAdminMessage(COLOR_DARKRED, 1, string);
}
}
return 1;
}