Need help with a Command in 0Admin [+Rep]
#3

Ok thanks a lot i'm gonna try it tonight
And for Vips it should be like that?
Sorry i am not so good yet with account saving and editing
Код:
CMD:offsetviplevel(PARAMS)
{
    LoginCheck(playerid);
    LevelCheck(playerid, 5);
    
    new Account[50], Level;
    if(sscanf(params, "s[50]i", Account, Level)) return SendUsage(playerid, "/offsetviplevel [name] [level]", "Will change a player's level position!");
    else 
    {
        new DBResult:Result, Query[129];
        format(Query, 129, "SELECT `VIP` FROM `Accounts` WHERE `Name` = '%s'", Account);
        Result = DB::Query(_DB, Query);
        
        if(Result)
        {
            if(DB::Valid(Result))
            {
                format(Query, 129, "UPDATE `Accounts` SET `VIP` = '%d' WHERE `Name` = '%s'", Level, Account);
                DB::Query(_DB, Query);
                FormatMSG(playerid, Color:GREY,"You promoved "ORAN"%s"GREY" as "ORAN"%s"GREY" of the server", Account, LevelName(Level));
            }
            else
            {
                DB::Free(Result);
                SendError(playerid, "Account not found in the Database!");
                return 1;
            }
        }
        
    }
    return 1;
}
Reply


Messages In This Thread
Need help with a Command in 0Admin [+Rep] - by TimKen - 04.04.2012, 18:59
Re: Need help with a Command in 0Admin [+Rep] - by aRoach - 04.04.2012, 19:07
Re: Need help with a Command in 0Admin [+Rep] - by TimKen - 04.04.2012, 19:14
Re: Need help with a Command in 0Admin [+Rep] - by aRoach - 04.04.2012, 19:14
Re: Need help with a Command in 0Admin [+Rep] - by TimKen - 04.04.2012, 19:16

Forum Jump:


Users browsing this thread: 1 Guest(s)