|
楼主 |
发表于 2008-2-13 16:50:36
|
显示全部楼层
来自 中国–内蒙古–锡林郭勒盟–锡林浩特市
回复: [Grief.QQ]上来看下
save_user_stats()
{
log_amx("[RegSqlRank] Saving %i Players", g_iMutationcount)
g_dbc = dbi_connect(g_host,g_user,g_pass,g_dbname,g_error,MAX_NAME_LENGTH)
if (g_dbc == SQL_FAILED)
log_amx("[sqlStats] SQL Connection Failed")
else{
for (new i = 0; i < g_iMutationcount; i++)
{
replace_all(g_sPStatsNames,MAX_NAME_LENGTH+1,"'","\'")
dbi_query(g_dbc,"UPDATE `%s` SET date=NOW(),score=%i,kills=%i,teamkills=%i,deaths=%i,hits=%i,shots=%i,headshots=%i,efficiency=%i,accuracy=%i, accuracyHS=%i WHERE Username='%s'", g_sqlstats_table, g_iPStats[S_SCORE], g_iPStats[S_KILLS], g_iPStats[S_TK], g_iPStats[S_DEATHS], g_iPStats[S_HITS], g_iPStats[S_SHOTS], g_iPStats[S_HS], g_iPStats[S_EFF], g_iPStats[S_ACC], g_iPStats[S_ACCHS], g_sPStatsNames)
}
dbi_close(g_dbc)
}
g_iMutationcount = 0
}
这是我下的原码里的SAVE
里边的确没有加入
replace_all(g_sPStatsNames,31,"[","& # 0 9 1 ;")
replace_all(g_sPStatsNames,31,"]","& # 0 9 3 ;")
replace_all(g_sPStatsNames,31,"<","<")
replace_all(g_sPStatsNames,31,">",">")
这四行. |
|