SetVIP problem
#2

You need to return 1 on the command itself.

pawn Код:
CMD:setVIP(playerid, params[])
{
    new victimname[MAX_PLAYER_NAME], vipname[MAX_PLAYER_NAME], viplvl, id;
    if(IsPlayerAdmin(playerid))
    {
        if (sscanf(params, "ui", id, viplvl)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setvip [id] [viplevel]");
        if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        if (viplvl <= 3 && viplvl >= 0) return SendClientMessage(playerid, COLOR_RED,"System: Valid vip Levels: 1-3!");
        PlayerInfo[id][pVipLevel] = viplvl;
        GetPlayerName(id, victimname, sizeof(victimname));
        GetPlayerName(playerid, vipname, sizeof(vipname));
        new str[128];
        format(str,128,"System: %s [ID %d] has set %s [ID %d] admin level to %i",vipname, playerid, victimname, id, viplvl);
        SendClientMessage(playerid,COLOR_GREEN,str);
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"  You are not allowed to use this command!");
    return 1;
}
Reply


Messages In This Thread
SetVIP problem - by Shockey HD - 27.07.2011, 19:22
Re: SetVIP problem - by Burridge - 27.07.2011, 19:24
Re: SetVIP problem - by Shockey HD - 27.07.2011, 19:25
Re: SetVIP problem - by PrawkC - 27.07.2011, 19:26
Re: SetVIP problem - by Burridge - 27.07.2011, 19:26
Re: SetVIP problem - by Shockey HD - 27.07.2011, 19:37
Re: SetVIP problem - by PrawkC - 27.07.2011, 19:42
Re: SetVIP problem - by Shockey HD - 27.07.2011, 19:46

Forum Jump:


Users browsing this thread: 3 Guest(s)