Problem for save IP -
jcvag44800 - 13.04.2012
Hi guys.
I have a problem for save the IP of player.
This is my script:
Create:
pawn Код:
dini_IntSet(file, "LastIP", PlayerInfo[playerid][pLastIP] = 0);
When disconnect:
pawn Код:
new IP[17];
PlayerInfo[playerid][pLastIP] = GetPlayerIp(playerid, IP, sizeof(IP));
dini_Set(file, "LastIP",PlayerInfo[playerid][pLastIP]);
And user file... LastIP = 15....
How i can resolve my problem ?
Cordially.
Re: Problem for save IP -
Snir_sofer - 13.04.2012
Create:
PlayerInfo[playerid][pLastIP] = 0;
dini_Set(file,"LastIP",PlayerInfo[playerid][pLastIP]);
Disconnect:
new IP[17];
GetPlayerIp(playerid, IP, sizeof(IP));
format(PlayerInfo[playerid][pLastIP],120,"%s",IP);
dini_Set(file, "LastIP",PlayerInfo[playerid][pLastIP]);
Re: Problem for save IP -
Laronic - 13.04.2012
new playerIP[16];
GetPlayerIP(playerid, playerIP, sizeof(playerIP));
dini_Set(file, "LastIP", playerIP);
Re: Problem for save IP -
ViniBorn - 13.04.2012
IP is a string ...
pawn Код:
//Enum
pLastIP[16],
// Load
format(PlayerInfo[playerid][pLastIP],16,"%s",dini_Get(file, "LastIP"));
// Save
new IP[16];
GetPlayerIp(playerid, IP, sizeof(IP);
format(PlayerInfo[playerid][pLastIP],16,"%s",IP);
dini_Set(file, "LastIP",PlayerInfo[playerid][pLastIP]);
Re: Problem for save IP -
Snir_sofer - 13.04.2012
PHP код:
Create:
PlayerInfo[playerid][pLastIP] = 0;
dini_Set(file,"LastIP",PlayerInfo[playerid][pLastIP]);
Disconnect:
new IP[17];
GetPlayerIp(playerid, IP, sizeof(IP));
format(PlayerInfo[playerid][pLastIP],120,"%s",IP);
dini_Set(file, "LastIP",PlayerInfo[playerid][pLastIP]);
Re : Problem for save IP -
jcvag44800 - 13.04.2012
Thanks all !
Re : Problem for save IP -
jcvag44800 - 14.04.2012
When i'm connected, the IP is 255.255.255.255... How I can resolve this ?
Re : Problem for save IP -
jcvag44800 - 14.04.2012
Help plz !
EDIT: https://sampforum.blast.hk/showthread.php?tid=331420&langid=2
Sorry