29.10.2015, 21:16
(
Последний раз редактировалось ahameed4755; 29.10.2015 в 22:05.
)
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)!"); }