Help with antihack..
#7

Like this:

PHP код:
static stock CheckMultipleName(const name[])
{
    new 
bool:x,i=GetPlayerPoolSize()+1,n[MAX_PLAYER_NAME];
    for(; --
i!=-1;)
    {
        if(!
GetPlayerName(i,n,MAX_PLAYER_NAME)) continue;
        if(!
strcmp(n,name,true))
        {
            if(
x) return 1;
            
x=true;
        }
    }
    return 
0;
}
//Then OnPlayerConnect or somewhere else:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
if(
CheckMultipleName(name))
{
    return 
Kick(playerid); //Here the name was multiple found

Reply


Messages In This Thread
Help with antihack.. - by itachi - 26.10.2015, 14:32
Re: Help with antihack.. - by Karan007 - 26.10.2015, 15:01
Re: Help with antihack.. - by J0sh... - 26.10.2015, 15:17
Re: Help with antihack.. - by Karan007 - 26.10.2015, 15:20
Re: Help with antihack.. - by J0sh... - 26.10.2015, 15:26
Re: Help with antihack.. - by SecretBoss - 26.10.2015, 15:43
AW: Help with antihack.. - by Kaliber - 26.10.2015, 15:51

Forum Jump:


Users browsing this thread: 1 Guest(s)