First you will need to use a file-system, that means... INI, XML DJson, whatever...
If you don't want to use a already made system, you can try that way (in this example, I will use INI system):
pawn Код:
stock GetAdminLevel(playerid)
{
new name[64];
GetPlayerName(playerid, name, sizeof name);
format(name, sizeof name, "%s.ini", name);
new File:file = fopen("file.ini", io_read), line[128];
while(fread(file, line))
{
new first = strfind(line, "=", true);
if(strcmp(line, "admin_level", true, first) == 0)
{
new value[32];
strmid(value, line, first + 1, strlen(line));
return strval(value);
}
}
return 0;
}
So now we can use, e.g.:
pawn Код:
if(GetAdminLevel(playerid) < 5)
{
return SendClientMessage(playerid, 0xFFFFFFAA, "You must be at least 5 admin level.");
}
Of course if you want to simplify the whole system, you can still choose to use an include made by someone else (in case you don't understand the example), or try to make some functions like this one above.