OMG! one command disables another!
#3

pawn Код:
CMD:og(playerid, params[])
{
    new
        gangsterlevel, id;
    if(PlayerInfo[playerid][pAdmin] >= 3)
    {
        if(sscanf(params, "ui", id, gangsterlevel)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /set_glevel [id] [gangsterlevel]");
        if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        new
            str[128];
        format(str,128,"System: %s [ID %d] has set %s [ID %d] gangsterlevel to %i", PlayerName(playerid), playerid, PlayerName(id), id, gangsterlevel);
        SendClientMessage(playerid, COLOR_YELLOW, str);
        if(INI_Open(getINI(playerid)))
        {
            INI_WriteInt("GangsterLvl", gangsterlevel);
            new
                pts = INI_ReadInt("RespectPts");
            if(pts <= 90)
            {
                INI_WriteInt("RespectPts", pts + 10);
            }
            else
            {
                INI_WriteInt("RespectPts", 100);
            }
            INI_Save();
            INI_Close();
        }
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"  You are not allowed to use this command!");
}
U forgot a '}' at the end
Reply


Messages In This Thread
OMG! one command disables another! - by samtey - 04.08.2011, 15:49
AW: OMG! one command disables another! - by samtey - 04.08.2011, 16:08
Re: OMG! one command disables another! - by Wesley221 - 04.08.2011, 16:13
AW: OMG! one command disables another! - by samtey - 04.08.2011, 16:40
AW: OMG! one command disables another! - by samtey - 04.08.2011, 19:04

Forum Jump:


Users browsing this thread: 2 Guest(s)