Is this possible to get player names from Host who aren't online but are having Officer=1 and post it in command /workers without MySQL?
pawn Код:
if(strcmp(cmdtext, "/isofficer"))
{
new idx, tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFFFFF, "[ERROR] Wrong format! /isofficer [name]");
format(string, sizeof string, "%s.(type)", name);
new File:officer_check = fopen(string, io_read)
{
if(file_exists(officer_check))
{
if(PlayerInfo[playerid][pOfficer] == 1)
{
format(string, sizeof string, "Player %s is an officer", name);
SendClientMessage(playerid, 0xFFFFFF, string);
}
else
{
format(string, sizeof string, "Player %s is {FF0000} not {FFFFFF} an officer", name);
SendClientMessage(playerid, 0xFFFFFF, string);
}
}
else return format(string, sizeof string, "[ERROR] Player %s does not exist!"); SendClientMessage(playerid, 0xFFFFFF, string);
}
return 1;
}
And what do i need to change if two people saves in Scriptfiles/saves/user has officer=1 and when i will type command it will show me their names?
You have to check it from the file itself but I think the player has to be connected