[GameMode] Los Santos Cops and Robbers[Unfinished and not gonna work on it anymore]
#8

You should really learn when to use braces (and whitespace, for that matter). For example, this ban command is completely unconditional:
pawn Код:
CMD:ban(playerid, params[])
{
    new id, reason[50], string[128], banned[MAX_PLAYER_NAME];
    if(pInfo[playerid][Adminlevel] >= 3)
    if(sscanf(params, "us[50]", id, reason))return SendClientMessage(playerid, -1, "USAGE: /ban [playerid] [reason(optional)]");
    GetPlayerName(id, banned, sizeof(banned));
    format(string, sizeof(string), "AdmCmd: %s has been banned by %s. reason: %s", banned, GetName(playerid), reason);
    SendClientMessageToAll(COLOR_RED, string);
    BanEx(id, reason);
    return 1;
}
If the player isn't an admin, it will format the string with an empty name, but it'll ban the player nonetheless.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)