Hey, so i have system with SQL where i save money when player disconnect or change team (not spammable). But sometimes players lose their money when it's going to 0.
Database code what i use:
code
PHP Code:
public void GotDatabase(Handle owner, Handle hndl, char[] error, any data)
{
if(hndl == INVALID_HANDLE)
SetFailState("Database error: %s", error);
statsDatabase = hndl;
}
void UpdateUserDatabase(int client)
{
if (GameRules_GetProp("m_bWarmupPeriod") != 0)
return;
Based on the code you've show, everything looks fine. One thing I do have to say is looking at what 'GetClientMoney' returns would probably be a good place to start with this issue.
Based on the code you've show, everything looks fine. One thing I do have to say is looking at what 'GetClientMoney' returns would probably be a good place to start with this issue.
'GetClientMoney' function:
PHP Code:
stock int GetClientMoney(int client) {
return GetEntProp(client, Prop_Send, "m_iAccount");
}