Nem teszteltem + cseréld a saját adataidra
#include <a_samp>
new bool:rejt[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, \"/admins\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_YELLOW,\"------------------------------\");
SendClientMessage(playerid, COLOR_RED, \"Online Adminok:\");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[pAdmin] >=1)
{
if(rejt[playerid] == 1)
{
new level = PlayerInfo[pAdmin];
GetPlayerName(i, sendername, sizeof(sendername));
format(string, 256, \"%s - Szint: %d\", sendername, level);
SendClientMessage(playerid, COLOR_ORANGE, string);
}
else return 0;
}
}
}
SendClientMessage(playerid, COLOR_YELLOW,\"------------------------------\");
}
return 1;
}
if(strcmp(cmdtext, \"/rejt\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[pAdmin] >=1)
{
rejt[playerid] == 0;
}
else return SendClientMessage(playerid, COLOR, \"Nem vagy admin!\");
}
}
if(strcmp(cmdtext, \"/nemrejt\", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[pAdmin] >=1)
{
rejt[playerid] == 1;
}
else return SendClientMessage(playerid, COLOR, \"Nem vagy admin!\");
}
}
return 0;
}