01.05.2014, 18:59
So, i've created mysql sys, but i have a problem. It happens sometime and i don't know why. When i use rcon gmx command all user data sets to 0 without any reason that i'm aware. Please help me.
Updating Syst:
Updating Syst:
Код:
public OnPlayerDisconnect(playerid, reason) { UpdateIgraca(playerid); return 1; }
Код:
stock UpdateIgraca(playerid) { new Query[2000]; format(Query, sizeof(Query), "UPDATE `igraci` SET `Novac` = '%d', `Registrovan` = '%d', `Level` = '%d', `Iskustvo` = '%d', `PDPoeni` = '%d', `Admin` = '%d', `Godine` = '%d', `Spol` = '%d', `Drzava` = '%d', `Skin` = '%d', `Posao` = '%d', `PosaoUgovor` = '%d', `Banovan` = '%d' WHERE `Ime` = '%s'", PI[playerid][Novac], PI[playerid][Registrovan], PI[playerid][Level], PI[playerid][Exp], PI[playerid][PayDayPoeni], PI[playerid][Admin], PI[playerid][Godine], PI[playerid][Spol], PI[playerid][Drzava], PI[playerid][Skin], PI[playerid][Posao], PI[playerid][PosaoUgovor], PI[playerid][Banovan], ImeIgraca(playerid)); mysql_query(Query); return 1; }