Players names
#1

Hello!

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?

Thanks!
Reply
#2

Try this, you have to replace a few things
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;
}
Reply
#3

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?

Saves are:
Danny_Dickson.ini
Holy_Shit.ini

And they aren't online
Reply
#4

You have to check it from the file itself but I think the player has to be connected
(Not sure)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)