FANDOM


Ovaj callback se poziva kada neko ukuca rcon pass i kada se login deo zavrsi uspesno ili ne.

Parametri Edit

(ip[], password[], success)
ip[] - IP igraca koji pokusava da se loguje.
password[] - Koju sifru je igrac uneo.
success - 1 ako je sifra tacna, 0 ako je netacna.
Return - ovaj callback ne zahteva specifican return

Primer Edit

public OnRconLoginAttempt(ip[], password[], success)
{
    if(!success) //Ako je sifra pogresna
    {
        printf("FAILED RCON LOGIN BY IP %s USING PASSWORD %s",ip, password);
        new pip[16];
        for(new i=0; i<MAX_PLAYERS; i++) //Provera kroz sve igrace
        {
            GetPlayerIp(i, pip, sizeof(pip));
            if(!strcmp(ip, pip, true)) //Ako je igracev IP koji je ukucao pass pravilan
            {
                SendClientMessage(i, 0xFFFFFFFF, "Wrong Password. Cao!"); //Salje poruku :)
                Ban(i); //Igrac je banovan
            }
        }
    }
    return 1;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.