Offline checking with DINI -
justjamie - 11.05.2016
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?
Re: Offline checking with DINI -
justjamie - 11.05.2016
nobody an idea?
Re: Offline checking with DINI -
BloodyRP - 11.05.2016
Dont think that is real on DINI.
Re: Offline checking with DINI -
justjamie - 11.05.2016
Quote:
Originally Posted by BloodyRP
Dont think that is real on DINI.
|
what
Re: Offline checking with DINI -
BloodyRP - 11.05.2016
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.
Re: Offline checking with DINI -
Dayrion - 11.05.2016
Is not possible excepct if you know all members name.
Re: Offline checking with DINI -
justjamie - 11.05.2016
Quote:
Originally Posted by Dayrion
Is not possible excepct if you know all members name.
|
with mysql its possible, right?
Re: Offline checking with DINI -
Dayrion - 11.05.2016
Quote:
Originally Posted by justjamie
with mysql its possible, right?
|
Yes it is. I'm not using MYSQL but I have already seen this.
Re: Offline checking with DINI -
justjamie - 11.05.2016
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
Re: Offline checking with DINI -
Hiddos - 11.05.2016
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.