1 Question - 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: 1 Question (
/showthread.php?tid=64536)
1 Question -
Mrkrabz - 05.02.2009
i wont bring my old topic back, since its on page 10, but i wanted a anti name, This is what i have so far. this is on onplayerconnect
pawn Код:
new ip[16], pname[MAX_PLAYER_NAME];
GetPlayerIp(playerid, ip, sizeof(ip));
GetPlayerName(playerid, pname, sizeof(pname));
new pos = strfind(ip, ".", true);
strdel(ip, pos, strlen(ip));
if(strcmp("82.37.hashed.out", ip, true) == 0 && strcmp(pname, "[LOS]Mrkrabz", true) == 0) Kick(playerid);
if(strcmp("82.37.hashed.out", ip, true) == 0 && strcmp(pname, "[LOS]Cammy", true) == 0) Kick(playerid);
No errors no warnings, But still it does not work?
Re: 1 Question -
SilentMouse - 05.02.2009
Quote:
Originally Posted by scorp1543
i wont bring my old topic back, since its on page 10, but i wanted a anti name, This is what i have so far. this is on onplayerconnect
pawn Код:
new ip[16], pname[MAX_PLAYER_NAME]; GetPlayerIp(playerid, ip, sizeof(ip)); GetPlayerName(playerid, pname, sizeof(pname));
new pos = strfind(ip, ".", true); strdel(ip, pos, strlen(ip));
if(strcmp("82.37.hashed.out", ip, true) == 0 && strcmp(pname, "[LOS]Mrkrabz", true) == 0) Kick(playerid); if(strcmp("82.37.hashed.out", ip, true) == 0 && strcmp(pname, "[LOS]Cammy", true) == 0) Kick(playerid);
No errors no warnings, But still it does not work?
|
Erm, .hashed.out?
Re: 1 Question -
Mrkrabz - 05.02.2009
What do you think. I aint showing my ip. or that other guys ip. something wrong with that?
Re: 1 Question -
Nero_3D - 05.02.2009
just use some random numbers between -1 and 256
and how we can see you are deleting everything after the first point
so why are you trying to compare one number with a full ip ?