12.08.2016, 11:58
Quote:
Код:
CMD:getadminlevel(playerid, params[]) { if (isnull(params)) return SendClientMessage(playerid, -1, "Usage: /getadminlevel [player name]"); new path[35]; format(path, sizeof (path), "users/%s.ini", params); // Change path to whatever your user path is if (!fexist(path)) return SendClientMessage(playerid, -1, "Player is not registered."); new File: file = fopen(path, io_read); if (!file) return SendClientMessage(playerid, -1, "An error occured. Try again."); new string[64]; while (fread(file, string)) { string[strlen(string) - 1 EOS]; if (!strcmp(string, "Admin = ", true, 8)) { format(string, sizeof (string), "%s's admin level: %i", params, string[8]); SendClientMessage(playerid, -1, string) break; } } fclose(file); return 1; } |