SA-MP Forums Archive
Login Bug - Nickname - 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: Login Bug - Nickname (/showthread.php?tid=452406)



Login Bug - Nickname - Anak - 21.07.2013

Hello i have a login system i which player having same nick but different format can join i mean

if a player : Anak (is registered)
and a player : ANAK can register also.. i want to make that Anak and ANAK will be a same account .. difficult to tell..


Re: Login Bug - Nickname - Misiur - 21.07.2013

Login system using mysql, sqlite, or y_ini? For SQL based storage use _ci (case-insensitive) collation for nick field. For other systems do it pawn-side with some unification of case (strtolower or something)


Re: Login Bug - Nickname - Anak - 21.07.2013

y_ini.. what to do to make it case sensitive ?


Re: Login Bug - Nickname - Misiur - 21.07.2013

Insensitive.
Convert to lowercase, for example using strtolower
pawn Код:
stock strtolower(str[]) {
    for(new c = 0; str[c] != EOS; ++c) {
        str[c] = tolower(str[c]);
    }
}