Help with getip
#1

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

https://sampwiki.blast.hk/wiki/GetPlayerIp

The Wiki contains examples of how to use each function.
Reply
#3

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

Thanks for helping you two
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)