how to save this with (y_ini)
#1

how to save playerdata(admin level) with y_ini;

Код:
CMD:setadmin(playerid, params[])
{
    new targetid[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], admlvl, id;
    if(IsPlayerAdmin(playerid))
    {
        if (sscanf(params, "ui", id, admlvl)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setadmin [id] [adminlevel]");
        if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
        if (admlvl > 5 || admlvl < 0) return SendClientMessage(playerid, COLOR_RED,"System: Valid Admin Levels: 1-5!");
        PlayerInfo[id][pAdminLevel] = admlvl;
        GetPlayerName(id, targetid, sizeof(targetid));
        GetPlayerName(playerid, adminname, sizeof(adminname));
        new str[128];
        format(str,128,"System: %s [ID %d] has set %s [ID %d] admin level to %i",adminname, playerid, targetid, id, admlvl);
        SendClientMessage(playerid,COLOR_GREEN,str);
        return 1;
    }
    else return SendClientMessage(playerid,COLOR_RED,"  [ERROR]:You are not (rcon admin)!");
}
Reply


Messages In This Thread
how to save this with (y_ini) - by ahameed4755 - 29.10.2015, 21:16
Re: how to save this with (y_ini) - by ahameed4755 - 29.10.2015, 21:38
Re: how to save this with (y_ini) - by Private200 - 29.10.2015, 22:26
Re: how to save this with (y_ini) - by ahameed4755 - 29.10.2015, 22:40
Re: how to save this with (y_ini) - by Private200 - 29.10.2015, 23:04

Forum Jump:


Users browsing this thread: 1 Guest(s)