CMD:ip(playerid, params[])
{
if(pInfo[playerid][pAdminLevel] >= 3)
{
new targetid,playerip[16],string[128];
if(sscanf(params, "u", targetid, playerip)) return SendClientMessage(playerid,-1,""chat" /ip [playerid]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid,-1,""chat" Player is not online");
GetPlayerIp(targetid, playerip, sizeof(playerip));
format(string, sizeof(string), ""chat" IP of %s %s", PlayerName(targetid), playerip);
SendClientMessage(playerid, -1, string);
}
else {
SendClientMessage(playerid,-1,""chat""COL_LIGHTBLUE" You do not have the right admin permissions for this command!");
}
return 1;
}
You'll need to use MySQL or Y_INI to do that. If you're using MySQL, I can help you.
|
SELECT IP FROM accounts WHERE Name = '%s'