IP - 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: IP (
/showthread.php?tid=451227)
IP -
deimantas1 - 16.07.2013
Hello, I want create that my name: Deimis_Extar nothing can't connect. I try create with IP checking, but always me kick. I check my IP with command, and me wrote this IP.
Код:
if(strcmp(ZaidejoVardas(playerid),"Deimis_Extar",true))
{
if(strcmp(ZaidejoIP(playerid),"127.0.0.1",true)) return 1;
if(!strcmp(ZaidejoIP(playerid),"127.0.0.1", true))
{
SendClientMessage(playerid,GELTONA,"Nesutampa");
SetTimerEx("KickPlayer",500,false,"d",playerid);
}
}
What's wrong?
Re: IP -
ReVo_ - 16.07.2013
Because if you are a dynamic IP it changes every time.
Re: IP -
DreDasLT - 16.07.2013
Sveikas.
PHP код:
if(!strcmp(ZaidejoVardas(playerid),"Deimis_Extar",true))
{
if(strcmp(ZaidejoIP(playerid),"127.0.0.1", true))
{
SendClientMessage(playerid,GELTONA,"Nesutampa");
SetTimerEx("KickPlayer",500,false,"d",playerid);
}
}
Re: IP -
DreDasLT - 16.07.2013
Quote:
Originally Posted by ReVo_
Because if you are a dynamic IP it changes every time.
|
Localhost never changes.
Re: IP -
ReVo_ - 16.07.2013
Quote:
Originally Posted by DreDasLT
Localhost never changes.
|
He never said he uses this script always in a localhost server. (Just why he used 127.0.0.1 in his first post doesn't mean he dont try the code in a hosted server)
If you use this script in a hosted server, this will never work. Maybe in a local test server will work.
Re: IP -
deimantas1 - 17.07.2013
My IP is static.
DreDas - thanks, working.