pawn Код:
Save_pData(playerid)
{
if (pData[playerid][IsLoggedIn] == false) return 0;
if(IsPlayerConnected(playerid))
{
GetPlayerPos(playerid, pData[playerid][X_Pos], pData[playerid][Y_Pos], pData[playerid][Z_Pos]);
GetPlayerFacingAngle(playerid, pData[playerid][A_Pos]);
new query[1024];
format(query, sizeof(query), "UPDATE `playerdata` SET");
format(query, sizeof(query), "%s `money` = %d,", query, pData[playerid][Money]);
format(query, sizeof(query), "%s `adminlevel` = %d,", query, pData[playerid][Level]);
format(query, sizeof(query), "%s `viplevel` = %d,", query, pData[playerid][VIPLevel]);
format(query, sizeof(query), "%s `kills` = %d,", query, pData[playerid][Kills]);
format(query, sizeof(query), "%s `deaths` = %d,", query, pData[playerid][Deaths]);
format(query, sizeof(query), "%s `score` = %d,", query, pData[playerid][Score]);
format(query, sizeof(query), "%s `interior` = %d,", query, pData[playerid][Interior]);
format(query, sizeof(query), "%s `x` = %f,", query, pData[playerid][X_Pos]);
format(query, sizeof(query), "%s `y` = %f,", query, pData[playerid][Y_Pos]);
format(query, sizeof(query), "%s `z` = %f,", query, pData[playerid][Z_Pos]);
format(query, sizeof(query), "%s `a` = %f", query, pData[playerid][A_Pos]);
format(query, sizeof(query), "%s WHERE `id` = %d", query, pData[playerid][ID]);
mysql_format(Koneksi, query, sizeof(query), "%s", query);
mysql_tquery(Koneksi, query);
}
return 1;
}
i tried to /savestats but not stored to mysql data..