Not save the statistic..
#1

Hey!

Having trouble so that when we step out from the server does not save the data on the server player.

I'm sorry, I do not know much English, I used ****** translator

Code:
Код:
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[i][0], weapons[i][1]);
		format(string, sizeof(string), "%i ", weapons[i][0]);
		strcat(line, string);
		format(string, sizeof(string), "%i ", weapons[i][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][x] == 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;
}
Reply


Messages In This Thread
Not save the statistic.. - by Ytoavee - 17.04.2015, 17:54
Re: Not save the statistic.. - by Azula - 17.04.2015, 17:58
Re: Not save the statistic.. - by Ytoavee - 18.04.2015, 04:11

Forum Jump:


Users browsing this thread: 3 Guest(s)