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
#2

Fast plz
Reply
#3

The player stats will get saved when the player will disconnect since you're not dealing with an offline stats changing at this command.
Reply
#4

no its not saving..

i made my self admin level 3

but when i reconnect it gets to 0 ..
Reply
#5

Show me your OnPlayerDisconnect lines (where your account saves)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)