Hello, I'm trying to create a plugin where a player on reconnect would get his frags,deaths,assists,mvps, and score back from MySQL but setting the ent prop wont work.
PHP Code:
SQL_FetchRow(hndl);
frags = SQL_FetchInt(hndl,1);
deaths = SQL_FetchInt(hndl,2);
mvp = SQL_FetchInt(hndl,3);
score = SQL_FetchInt(hndl,4);
assists = SQL_FetchInt(hndl,5);
PrintToChatAll("=========");
PrintToChatAll("Frags: %d Deaths: %d MVP: %d Score: %d Assists %d", frags, deaths, mvp, score, assists);
if (frags != 0){
PrintToChatAll("frags");
SetEntProp(client, Prop_Data, "m_iFrags", frags);
}
if(deaths != 0){
PrintToChatAll("deaths");
SetEntProp(client, Prop_Data, "m_iDeaths", deaths);
}
if(mvp != 0){
PrintToChatAll("mvp");
CS_SetMVPCount(client, mvp);
}
if(score != 0){
PrintToChatAll("score");
CS_SetClientContributionScore(client, score);
}
if(assists != 0){
PrintToChatAll("assists");
CS_SetClientAssists(client, assists);
}
It prints out to me "Frags: 232 Deaths: 232 MVP: 232 Score: 232 Assists 232" and it prints out all of the PrintToChatAll(" assists/score/mvp/kills/deaths ") so its not 0. But when I try to set it, it wont set it.