[HELP]Writing IP to File
#1

Can anyone help me with writing a players IP to a File? I'm using it for my reg system for auto login, I've tried and it doesn't work.

This is my function I made for onplayerdiscconect
public SaveStats(playerid)
{
new filename[128];
format(filename, sizeof(filename), "Accounts/" ACCOUNT_PREFIX "%s.ini", PlayerName(playerid));
dini_IntSet(filename, "Cash", GetPlayerCash(playerid));
}

Can anyone make it so Dini creates a line with the IP on it? since my error says argument dis match or something like that.

(Also I know Dini is shit )
Reply
#2

help anyone?
Reply
#3

pawn Код:
new tmpIP[16];
GetPlayerIp(playerid, tmpIP, 16);
dini_Set(filename, "IP", tmpIP);
Reply
#4

Thanks mate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)