Need help changing this command!
#1

Quote:

CMD:ipcheck(playerid, params[])
{
MOD_CHECK;
{
new string[128], giveplayerid;
if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, COLOUR_RED, "USAGE: /ipcheck [playerid]");

if(giveplayerid == INVALID_PLAYER_ID) return 1;
if(IsPlayerConnected(giveplayerid))
{
new playerip[32];
GetPlayerIp(giveplayerid, playerip, sizeof(playerip));
format(string, sizeof(string), "(ID: %d) - (Name: %s) - (IP: %s)", giveplayerid, ReturnName(giveplayerid), playerip);
SendClientMessage(playerid, COLOUR_RED, string);
}
else SendClientMessage(playerid, COLOUR_RED, "Invalid player specified.");
}
return 1;
}

I need the command to check in accounts/{name}.ini but it can only check connected names. I need to get IP's for offline players also, hence accounts/name.ini
Im really having problems doing that Can someone please help?
Thank you!
Reply
#2

What saving system are you using?
Reply
#3

Quote:
Originally Posted by HDFord
Посмотреть сообщение
What saving system are you using?
dini...(?)
Reply
#4

I'm not so sure, but shouldn't IPs be a float?
Reply
#5

Quote:
Originally Posted by HDFord
Посмотреть сообщение
What saving system are you using?
Quote:
Originally Posted by Denying
Посмотреть сообщение
I'm not so sure, but shouldn't IPs be a float?
I think its alright like this, just needs to fetch accounts instead of online players.
Reply
#6

Use this instead:

pawn Код:
CMD:aka(playerid, params[])
{
    if(!IsCnRAdmin(playerid)) return UnknownCMD(playerid);
    new pID;
    if(sscanf(params, "u", pID)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /aka (nick/id) - Enter A Valid Nick / ID");
    if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_RED, "This Player Is Not Connected.");
    if(pID == cellmin) return SendClientMessage(playerid, COLOR_RED, "Multiple Players Found. Please Be More Specific.");
    new file[128], string[200], ip[128];
    format(file, sizeof file, "DM/Config/aka.txt");
    GetPlayerIp(pID, ip, sizeof ip);
    if(pID == playerid) format(string, sizeof string, "Your Nicknames [%s]:  %s", ip, dini_Get(file, ip));
    else format(string, sizeof string, "%s (%d)'s Nicknames [%s]:  %s", PlayerName(pID), pID, ip, dini_Get(file, ip));
    SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    return 1;
}
This is straight from my admin fs.
Reply
#7

Looks like LuxAdmin(?)

I dont want a new command, I just want mine modified to my needs
I thank you for this though!
Reply
#8

Someone?
Reply
#9

Bump this :/
Reply
#10

Please help me I need to add "accounts/{name}.ini" somewhere there, but not sure where.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)