Hi People! How to fix the mysql R41-2 CHARACTER DATA SAVE AND LOAD??
[MYSQL R41-2]
SUCCESFULLY REGISTERED ACCOUNT CODE:
[MYSQL R41-2]
SUCCESFULLY REGISTERED ACCOUNT CODE:
Code:
new escape[128]; mysql_escape_string(query,escape);
format(query,sizeof(query),"INSERT INTO players (IP,Name,Password,Properties,RegDate,LogDate,Admin,JatekosPenz,JatekosSzint,PosX,PosY,PosZ,JatekosInti,JatekosOles,JatekosHalal,JatekosOra,JatekosPerc,JatekosMPerc,JatekosSkin) VALUES ('%s','%s',MD5('%s'),'%s','%s','%s',%d,%d,%d,%f,%f,%f,%d,%d,%d,%d,%d,%d,%d)",
pIP(playerid),
pName(playerid),
password,
properties_string,
GetFormatedDate(),
GetFormatedDate(),
0,
1000,
1,
1753.3008,
-1894.0869,
13.5572,
0,
0,
0,
0,
0,
0,
26);
mysql_tquery(SQL,query);
MSG(playerid,""COL_GREEN"(( User registered sucesfully. ))");
PlayerPlaySound(playerid,1058,0.0,0.0,0.0);
ShowLoginDialog(playerid,PHASE_USERNAME);
Code:
stock LoadPlayer(playerid)
{
cache_get_value_int(0, "ID", pInfo[playerid][pID]);
cache_get_value_name_int(playerid, "Admin", pInfo[playerid][pAdmin]);
cache_get_value_name_int(playerid,"JatekosPenz", pInfo[playerid][pJatekosPenz]);
cache_get_value_name_int(playerid, "JatekosSzint", pInfo[playerid][pJatekosSzint]);
cache_get_value_name_float(playerid, "PosX", pInfo[playerid][PosX]);
cache_get_value_name_float(playerid, "PosY", pInfo[playerid][PosY]);
cache_get_value_name_float(playerid, "PosZ", pInfo[playerid][PosZ]);
cache_get_value_name_int(playerid, "JatekosOra", pInfo[playerid][pJatekosOra]);
cache_get_value_name_int(playerid, "JatekosPerc", pInfo[playerid][pJatekosPerc]);
cache_get_value_name_int(playerid, "JatekosMPerc", pInfo[playerid][pJatekosMPerc]);
cache_get_value_name_int(playerid,"JatekosOles", pInfo[playerid][pJatekosOles]);
cache_get_value_name_int(playerid,"JatekosInti", pInfo[playerid][pJatekosInti]);
cache_get_value_name_int(playerid, "JatekosHalal", pInfo[playerid][pJatekosHalal]);
cache_get_value_name_int(playerid, "JatekosSkin", pInfo[playerid][pJatekosSkin]);
return 1;
}
Code:
stock SavePlayer(playerid)
{
format(query,sizeof(query),"UPDATE players SET LogDate = '%s', Admin = %d, JatekosPenz = %d, JatekosSzint = %d, PosX = %f, PosY = %f, PosZ = %f, JatekosInti = %d, JatekosOles = %d, JatekosHalal = %d, JatekosOra = %d, JatekosPerc = %d, JatekosMPerc = %d, JatekosSkin = %d, WHERE ID = %d",
GetFormatedDate(),
pInfo[playerid][pAdmin],
pInfo[playerid][pJatekosPenz],
pInfo[playerid][pJatekosSzint],
pInfo[playerid][PosX],
pInfo[playerid][PosY],
pInfo[playerid][PosZ],
pInfo[playerid][pJatekosInti],
pInfo[playerid][pJatekosOles],
pInfo[playerid][pJatekosHalal],
pInfo[playerid][pJatekosOra],
pInfo[playerid][pJatekosPerc],
pInfo[playerid][pJatekosMPerc],
pInfo[playerid][pJatekosSkin],
pInfo[playerid][pID]);
mysql_tquery(SQL,query);
// Reset Enums későbbiekben.
ResetPlayerVariables(playerid,1);
return 1;
}