Üdvözletem , lenne egy olyan problémám hogy találtam dropboxon egy módot csak a mentéssel vannak problémáim , akárhogy próbáltam nem menti az adott játékos statisztikáját.
Valaki tudna ebben megoldást adni ?
Kód :
function SavePlayer(playerid) {
if(GetPVarInt(playerid, \"Logged\")) return 1;
new weapons[13][2];
line[0] = EOS;
query[0] = EOS;
for(new i = 0; i < 13; i++) {
GetPlayerWeaponData(playerid, i, weapons[0], weapons[1]);
format(string, sizeof(string), \"%i \", weapons[0]);
strcat(line, string);
format(string, sizeof(string), \"%i \", weapons[1]);
strcat(query, string);
}
strdel(line, strlen(line)-1, strlen(line));
strdel(query, strlen(query)-1, strlen(query));
new spawnplace[256];
GetPVarString(playerid, \"SpawnPlace_Data\", spawnplace, sizeof(spawnplace));
new IGZ[256];
for(new x; x < 100; x++) strcat(IGZ, (IsIntactGZ[playerid]- == true) ? (\" 1\") : (\" 0\"));
format(query, sizeof(query), \"UPDATE `users` SET Money = \'%i\', XP = \'%i\', Kills = \'%i\', Deaths = \'%i\', NameColor = \'%i\', Time = \'%i\', Weapons = \'%s\', Ammos = \'%s\', Admin = \'%i\', Warns = \'%i\', Mute = \'%i\', SpawnPlace = \'%s\', IGZ = \'%s\' WHERE Name = \'%s\';\",
GetPlayerCash(playerid),
GetPlayerXP(playerid),
GetPVarInt(playerid, \"Kills\"),
GetPVarInt(playerid, \"Deaths\"),
GetPlayerColor(playerid),
GetPlayerServerTime(playerid),
line,
query,
GetPVarInt(playerid, \"Admin\"),
GetPVarInt(playerid, \"Warns\"),
GetPVarInt(playerid, \"MuteTime\"),
spawnplace,
IGZ[1],
pName(playerid)
);
mysql_function_query(sql, query, true, \"THREAD_Finish\", \"\");
return 1;
}
Előre is köszönöm!