Help with getip - 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: Help with getip (
/showthread.php?tid=290861)
Help with getip -
nilanjay - 17.10.2011
I need to make a getip cmd but I am confused how can I make that? I am using dini, so anyone can help me?
Re: Help with getip -
Kush - 17.10.2011
https://sampwiki.blast.hk/wiki/GetPlayerIp
The Wiki contains examples of how to use each function.
Re: Help with getip -
Sinner - 17.10.2011
Quote:
Originally Posted by nilanjay
I need to make a getip cmd but I am confused how can I make that? I am using dini, so anyone can help me?
|
I don't know how you call your values you write to the dini files, so here's the command for someone who is already in-game
for dcmd:
pawn Код:
dcmd_getip(playerid, params) {
new pid = strval(params);
if(pid<0 || pid>MAX_PLAYERS || !IsPlayerConnected(pid))
return SendClientMessage(playerid, 0xFF0000, "USAGE: /GetIp [playerid]");
new pip[32];
GetPlayerip(pid, pip, sizeof(pip));
new str[128];
format(str, sizeof(str), "This player's IP is: %s", pip);
SendClientMessage(playerid, 0x00FF00, str);
return 1;
}
Re: Help with getip -
nilanjay - 17.10.2011
Thanks for helping you two