Command Help
#1

Hi, im using zcmd and i want to make this even on offline players:
PHP код:
CMD:ip(playeridparams[])
{
    if(
pInfo[playerid][pAdminLevel] >= 3)
    {
        new 
targetid,playerip[16],string[128];
        if(
sscanf(params"u"targetidplayerip)) return SendClientMessage(playerid,-1,""chat" /ip [playerid]");
        if(!
IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
        
GetPlayerIp(targetidplayeripsizeof(playerip));
        
format(stringsizeof(string), ""chat" IP of %s %s"PlayerName(targetid), playerip);
        
SendClientMessage(playerid, -1string);
    }
    else {
        
SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
    }
    return 
1;

Reply
#2

You'll need to use MySQL or Y_INI to do that. If you're using MySQL, I can help you.
Reply
#3

Quote:
Originally Posted by SKAzini
Посмотреть сообщение
You'll need to use MySQL or Y_INI to do that. If you're using MySQL, I can help you.
i already got it
Reply
#4

Save the player's IP on disconnect, then load it on /ip:

Код:
SELECT IP FROM accounts WHERE Name = '%s'
Get the result and put it in a 16 cell big string and you'll have the player's IP.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)