Filewriting with getplayerip
#1

is the following thing possible?
If not, could someone explain on how to do it correctly?

pawn Код:
format(LineForFile, 100, "IP Adress %s\r\n", GetPlayerIp(playerid, playerip, sizeof(playerip))); // Construct the line: "IP adress"
    fwrite(PFile, LineForFile); // And save it to the file
Reply
#2

GetPlayerIp doesn't return an IP, it stores ip into the passed string, sot it should be like this:
pawn Код:
new ip[32];
GetPlayerIp(playerid,ip,sizeof(ip));
format(LineForFile, 100, "IP Adress %s\r\n",ip); // Construct the line: "IP adress"
    fwrite(PFile, LineForFile); // And save it to the file
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)