Players names
#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


Messages In This Thread
Players names - by lukas567 - 08.09.2011, 13:57
Re: Players names - by Pinguinn - 08.09.2011, 14:03
Re: Players names - by lukas567 - 08.09.2011, 14:08
Re: Players names - by Pinguinn - 08.09.2011, 14:24

Forum Jump:


Users browsing this thread: 2 Guest(s)