Offline checking with DINI
#1

Hello,
i have this command (/fon)
this is what it looks like:
pawn Код:
COMMAND:fon(playerid)
{
    if(PlayerInfo[playerid][playerteam] == CIV || PlayerInfo[playerid][playerteam] == 0) return SendClientError(playerid, "You cannot use this as civilian.");
    format(iStr, sizeof(iStr), "Online %s members:", PlayerInfo[playerid][PTeamName]);
    SendClientMessage(playerid, COLOR_HELPEROOC, iStr);
    new runs[50], string[50];
    for(new iii = 0;iii < MAX_PLAYERS; iii++)
    {
        if(iAFKp[iii] > 3)
        {
            format(string, sizeof(string)," {ff0000}[AFK] ");
        }
        else
        {
            format(string, sizeof(string),"");
        }
        if(!IsPlayerConnected(iii)) continue;
        if(PlayerInfo[iii][playerteam] == PlayerInfo[playerid][playerteam])
        {
            if(PlayerInfo[iii][playerteam] == SDC) format(runs, sizeof(runs), "[Runs: %d]", PlayerInfo[iii][totalruns]); else myStrcpy(runs, " ");
            format(iStr, sizeof(iStr),"* %s [%d] [Rank: %s] [Tier: %d] [Payment: Ђ%s] %s%s %",RPName(iii),iii,PlayerInfo[iii][rankname],PlayerInfo[iii][ranklvl], number_format(PlayerInfo[iii][fpay]), string, runs);
            SendClientMessage(playerid,COLOR_WHITE,iStr);
        }
    }
    return 1;
}
This checks if someone is in a playerteam, but only if he is online.
I want to make a command called /foff, which checks the playerteam for ONLY the offline player.
I use dini.
Someone can help me please?
Reply
#2

nobody an idea?
Reply
#3

Dont think that is real on DINI.
Reply
#4

Quote:
Originally Posted by BloodyRP
Посмотреть сообщение
Dont think that is real on DINI.
what
Reply
#5

Quote:
Originally Posted by justjamie
Посмотреть сообщение
what
I think that it is not real to do offline players check with DINI. U need to use mysql for that.
Reply
#6

Is not possible excepct if you know all members name.
Reply
#7

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Is not possible excepct if you know all members name.
with mysql its possible, right?
Reply
#8

Quote:
Originally Posted by justjamie
Посмотреть сообщение
with mysql its possible, right?
Yes it is. I'm not using MYSQL but I have already seen this.
Reply
#9

Quote:
Originally Posted by Dayrion
Посмотреть сообщение
Yes it is. I'm not using MYSQL but I have already seen this.
so why didn't they make one for dini
Reply
#10

Quote:
Originally Posted by justjamie
Посмотреть сообщение
so why didn't they make one for dini
Because dini doesn't support queries. You can't 'ask' dini to return you anything, you can only open a file and read what's in it. MySQL on the other hand allows you to query the database upon which it will search through your data until it finds what it's looking for.

Edit: If you really want what you're looking for with files, you have to keep specific files containing team info and look in those files. That's not what ini files are meant for though, so you'd have to pick up how to use the file functions.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)