05.04.2012, 19:09
hello Scripters.
i didn't script for a long time and i'm not a very good at scripting that's why i need help
i would like to add the IP of the players last connection in their account file
for now I've tried something but it didn't work
this is what i have in the file
Team=1
Password=XXXXXXXXXXXXXXXXXX
AdminLevel=5
Cash=15800
VIP=0
Skin=285
IP=15 (by the way my ip don't have the number 15 )
and this is the script
i didn't script for a long time and i'm not a very good at scripting that's why i need help
i would like to add the IP of the players last connection in their account file
for now I've tried something but it didn't work
this is what i have in the file
Team=1
Password=XXXXXXXXXXXXXXXXXX
AdminLevel=5
Cash=15800
VIP=0
Skin=285
IP=15 (by the way my ip don't have the number 15 )
and this is the script
Код:
public OnPlayerDisconnect(playerid, reason) { new file[128], ip[16]; format(file, 128, USER_FILE, GetPName(playerid)); if(fexist(file)) { if(logedin[playerid] == 0) { dini_IntSet(file, "Cash", GetPlayerMoney(playerid)); dini_IntSet(file, "IP", GetPlayerIp(playerid, ip, sizeof(ip))); } } return 1; }