12.08.2010, 04:14
pawn Код:
stock GetAdminLevel(playerid)
{
new name[64];
GetPlayerName(playerid, name, sizeof name);
format(name, sizeof name, "ladmin/users/%s.sav", name);
new File:file = fopen("file.sav", io_read), line[128];
while(fread(file, line))
{
new first = strfind(line, "=", true);
if(strcmp(line, "level", true, first) == 0)
{
new value[32];
strmid(value, line, first + 1, strlen(line));
return strval(value);
}
}
return 0;
}