27.08.2015, 21:38
PHP код:
stock OnPlayerSave(playerid) {
new query[1250], ip[25];
GetPlayerIp(playerid, ip, sizeof(ip));
money[playerid] = GetPlayerMoneyEx(playerid);
format(query, sizeof(query), "UPDATE `accounts` SET `Username` = '%s', `IP` = '%s', `scorelevel` = '%d', `maconha` = '%d', `sementes` = '%d', `BPsize` = '%d', `lastlogin` = '%d', `wanted` = '%d', `moneybag` = '%d', `COPskills` = '%d', `CRIMINALskills` = '%d', `PARAMEDICskills` = '%d', `admin` = '%d', `money` = '%d', `bank` = '%d', `kills` = '%d', `deaths` = '%d' WHERE `Username` = '%s' ",
GetName(playerid),
ip,
scorelevel[playerid],
maconha[playerid],
sementes[playerid],
BPsize[playerid],
lastlogin[playerid],
wanted[playerid],
moneybag[playerid],
COPskills[playerid],
CRIMINALskills[playerid],
PARAMEDICskills[playerid],
admin[playerid],
money[playerid],
bank[playerid],
kills[playerid],
deaths[playerid],
GetName(playerid));
mysql_pquery(ConnectMYSQL, query);
format(query, sizeof(query), "UPDATE `accounts` SET `eagleSPAWN` = '%d', `shotgunSPAWN` = '%d', `spazSPAWN` = '%d', `mp5SPAWN` = '%d', `akSPAWN` = '%d', `m4SPAWN` = '%d', `rifleSPAWN` = '%d', `sniperSPAWN` = '%d', `meleeSPAWN` = '%d' WHERE `Username` = '%s'",
GetName(playerid),
EagleSPAWN[playerid],
shotgunSPAWN[playerid],
spazSPAWN[playerid],
mp5SPAWN[playerid],
akSPAWN[playerid],
m4SPAWN[playerid],
rifleSPAWN[playerid],
sniperSPAWN[playerid],
meleeSPAWN[playerid],
GetName(playerid));
mysql_pquery(ConnectMYSQL, query);
format(query, sizeof(query), "UPDATE `accounts` SET `DP` = '%d', `VIP` = '%d', `fmembro` = '%d', `fcargo` = '%d', `preso` = '%d', `presotime` = '%d', `startVIPdia` = '%d', `startVIPmes` = '%d', `startVIPano` = '%d', `carid` = '%d', `carpos0` = '%f', `carpos1` = '%f', `carpos2` = '%f', `carpos3` = '%f' WHERE Username = '%s'",
DP[playerid],
VIP[playerid],
fmembro[playerid],
fcargo[playerid],
preso[playerid],
presotime[playerid],
startVIPdia[playerid],
startVIPmes[playerid],
startVIPano[playerid],
carid[playerid],
carpos[playerid][0],
carpos[playerid][1],
carpos[playerid][2],
carpos[playerid][3],
GetName(playerid) );
mysql_pquery(ConnectMYSQL, query);
format(query, sizeof(query), "UPDATE `accounts` SET `spawnpoint` = '%d', `housekey` = '%d', `idiom` = '%d', `tutorial` = '%d', `banned` = '%d', `leftBANdia` = '%d', `leftBANmes` = '%d', `leftBANano` = '%d' WHERE Username = '%s'",
spawnpoint[playerid],
housekey[playerid],
idiom[playerid],
tutorial[playerid],
banned[playerid],
leftBANdia[playerid],
leftBANmes[playerid],
leftBANano[playerid],
GetName(playerid) );
mysql_pquery(ConnectMYSQL, query);
}