Ce n'est pas dans t'es conditions, mais c'est plus simple, (ou pas).
Et je ne suis peut être pas débutant, mais bon, juste pour vous montrer une autre solution ^^
#define COLOR_GREEN 0x9EC73DAA
new InfosAdmin[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/infosadmins", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "Tu reçois maintenant un message quand un admin se connecte !");
InfosAdmin[playerid] = 1;
return 1;
}
return 0;
}
public OnRconLoginAttempt(ip[], password[], success)
{
if(sucess)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(InfosAdmin[i] == 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Un admin s'est connecté !");
}
}
}
}
}