25.01.2014, 22:12
When a player disconnects it dosent save his stuff why??
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new query[1004];
format(query, sizeof(query), "UPDATE users SET \
new otherp[128];
GetPlayerIp(playerid, otherp, sizeof(otherp));
Money = '%d', \
Bankcash = '%d',\
Cash = '%d',\
Score = '%d',\
Adminlevel = '%d',\
Army = '%d',\
CIA = '%d',\
RegularPlayer = '%d',\
DrugHouseOwner = '%d',\
OttoOwner = '%d',\
TSkill = '%d',\
RobSkill = '%d' ,\
HasPackC4 = '%d',\
HasPackRope = '%d',\
HasPackMoney = '%d', \
SavedWantedLevel = '%d' ,\
SavedJailTime = '%d',\
Coprank = '%d',\
HoursPlayed = '%d',\
MinutesPlayed = '%d',\
SecondsPlayed = '%d',\
IpAdress = '%s'\
WHERE Username = '%s'",
GetPlayerMoney(playerid),
BankCash[playerid],
GetPlayerMoney(playerid),
GetPlayerScore(playerid),
AdminLevel[playerid],
CanUseArmy[playerid],
CanUseCIA[playerid],
IsRegularPlayer[playerid],
DrugHouseOwner[playerid],
OttoOwner[playerid],
TerroristSkill[playerid],
RobSkill[playerid],
HasPackC4[playerid],
HasPackRope[playerid],
HasPackMoney[playerid],
SavedWantedLevel[playerid],
SavedJailTime[playerid],
PlayerName(playerid));
mysql_query(query);
return 1;
}