11.11.2013, 03:22
Anyone can put the command in rcon required
Код:
CMD:makehelper(playerid, params[])
{
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pAdmin] > 6)
{
new playerb, string[128];
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /makehelper [playerid]");
if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
if(!PlayerInfo[playerb][pHelper])
{
PlayerInfo[playerb][pHelper] = 1;
format(string, sizeof(string), "%s has {33AA33}promoted {AA3333}%s to a Community Helper.", RPN(playerid), RPN(playerb));
SendHelperMessage(COLOR_DARKRED, 1, string);
SendAdminMessage(COLOR_DARKRED, 1, string);
SendClientMessage(playerb, COLOR_DARKRED, string);
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
}
return 1;
}

