Hello i have this script for load the playerdatas i have add a moneybag save with
Код:
else if(rows > 0)
{
if(mysql_fetch_row(line))
{
new data[3][55];
new data2[5];
sscanf(line, "p<|>s[50]s[300]dddds[50]ds[100]", data[0], largestring, data2[0], data2[1], data2[2], data2[3], data[2], data2[4], estring);
stringempty(estring);
stringempty(largestring);
SetPVarInt(playerid, "Kills", data2[0]);
SetPVarInt(playerid, "Logged", 1);
SetPVarInt(playerid, "Deaths", data2[1]);
SetPlayerScore(playerid, data2[2]);
GivePlayerMoney(playerid, data2[3]);
SetPVarInt(playerid, "AdminLevel", data2[4]);
SendClientMessage(playerid, 0x0000D9AA, "Logged in!");
mysql_free_result();
GetPlayerIp(playerid, PIP, 18);
format(Query, sizeof(Query), "UPDATE `playerinfo` SET IP = '%s' WHERE user='%s'", PIP, escpname(playerid));
mysql_query(Query);
}
}
}
}
return 1;
}