[Help] Reading data Y_INI Admins System - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Reading data Y_INI Admins System (
/showthread.php?tid=533199)
[Help] Reading data Y_INI Admins System -
Shura - 23.08.2014
Hi, I need to know how many administrators have my server, the variable is:
Код:
INI_Int ("AdminNivel" Info [playerid] [PAdmin]);
Need to know all types of Administrators, the ranges are from level 1 to level 6.
Need to know all types even if they are offline, please.
I give reputation.
Re : [Help] Reading data Y_INI Admins System -
Xenforox - 23.08.2014
like a cmd /admins?
Re: [Help] Reading data Y_INI Admins System -
Thogy - 23.08.2014
pawn Код:
if (strcmp("/admins", cmdtext, true, 7) == 0)
{
new count = 0;
new AllString[1000];
new String[80];
for ( new i;i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i) == 0 && Info[i][PAdmin] > 0)
{
format(String, sizeof(String), "Administrator %s (Level %i) \n\n", PlayerName(i), Info[i][PAdmin]);
strcat(AllString, String);
count ++;
}
else if(IsPlayerAdmin(i) == 1 && Info[i][PAdmin] > 0)
{
format(String, sizeof(String), "Administrator %s (Level %i + RCON) \n\n", PlayerName(i), Info[i][PAdmin]);
strcat(AllString, String);
count ++;
}
}
}
if(count == 0)
{
strcat(AllString, "{FF0000}No administrator online!");
}
ShowPlayerDialog(playerid, 5555, DIALOG_STYLE_MSGBOX, "Online administrators", AllString, "OK", "");
return 1;
}
Re: [Help] Reading data Y_INI Admins System -
Ada32 - 23.08.2014
^no, just..
1. get a user system
2. consider using a database
Respuesta: Re: [Help] Reading data Y_INI Admins System -
Shura - 24.08.2014
Quote:
Originally Posted by Ada32
^no, just..
1. get a user system
2. consider using a database
|
----------------------------------------------------------------
I think Y_INI read files without database is possible, you do not?