dcmd GetPlayerIp - 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: dcmd GetPlayerIp (
/showthread.php?tid=88373)
dcmd GetPlayerIp -
user226 - 26.07.2009
Hello all !
how to make:
i create one one commands(dcmd) To this command can only use a player with the IP: 10.10.11.12
how to make?
Help me please
Re: dcmd GetPlayerIp -
paytas - 26.07.2009
pawn Код:
new ip[16];
GetPlayerIp(playerid, ip, 16);
if (!strcmp(ip, "10.10.11.12"))
{
DoSomething();
}
Re: dcmd GetPlayerIp -
user226 - 26.07.2009
new ip[16];
GetPlayerIp(playerid, ip, 16);
Код:
if (!strcmp(ip, "10.10.11.12"))
{
DoSomething();
}
else{SendClientMessage(playerid,color,"your ip do not 10.10.11.12");
Will work?
-----
okay,thanks.
another question: how make to GetPlayerIp was three?
if (!strcmp(ip, "10.10.11.12"))
10.10.11.13
10.10.11.14
To be able to just these three IP
Re: dcmd GetPlayerIp -
user226 - 26.07.2009
up
Re: dcmd GetPlayerIp -
MadeMan - 26.07.2009
pawn Код:
new ip[16];
GetPlayerIp(playerid, ip, 16);
if (!strcmp(ip, "10.10.11.12") || !strcmp(ip, "10.10.11.13") || !strcmp(ip, "10.10.11.14"))
{
DoSomething();
}
Re: dcmd GetPlayerIp -
user226 - 26.07.2009
thanks!!!