SA-MP Forums Archive
Sick of random noobs... - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Sick of random noobs... (/showthread.php?tid=220034)



Sick of random noobs... - Antonio [G-RP] - 02.02.2011

Alright, well since my server is in development, I don't want random retards connecting to my server all the time.

I tried to make a function under OnPlayerConnect(playerid)... but failed.

--.--.--.-- is where my and my friend's IP's go.

pawn Код:
new allowedip[24];
    GetPlayerIp(playerid, allowedip, strlen(allowedip));
    if(allowedip != "--.--.--.--") || if(allowedip != "--.--.--.--")
    {
        Kick(playerid);
    }



Re: Sick of random noobs... - SWEMike - 02.02.2011

It's easier to just set a password.


Re: Sick of random noobs... - Antonio [G-RP] - 02.02.2011

WOW. I'm really stupid today... honestly didn't even think of that. Thanks.


Re: Sick of random noobs... - SWEMike - 02.02.2011

Haha, no problem, matey. :3


Re: Sick of random noobs... - cessil - 02.02.2011

use strcmp to compare strings