dcmd GetPlayerIp
#1

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
Reply
#2

pawn Код:
new ip[16];
GetPlayerIp(playerid, ip, 16);

if (!strcmp(ip, "10.10.11.12"))
{
  DoSomething();
}
Reply
#3

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
Reply
#4

up
Reply
#5

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();
}
Reply
#6

thanks!!!
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)