20.11.2016, 13:58
So, basically. I have a system that counts player registeration.
It shows "Total Registered Accounts 0"
When I remove the GetPlayerName thingy, it shows correct number of registered accounts. code is
So, how can I fix this.
Код:
new DBResult:Answer; Answer = BUD::RunQuery("SELECT COUNT(*) FROM `users`",true); db_get_field(Answer,0,string,sizeof(string)); new name[MAX_PLAYER_NAME], string[256]; GetPlayerName(playerid, name, sizeof(name)); iUID = strval(string); format(string, sizeof(string), "[NGF]%s Has successfully registered. Total Registered Accounts %d.", name, iUID); SendClientMessageToAll(0xC4C4C4FF, string);
When I remove the GetPlayerName thingy, it shows correct number of registered accounts. code is
Код:
new DBResult:Answer; Answer = BUD::RunQuery("SELECT COUNT(*) FROM `users`",true); db_get_field(Answer,0,string,sizeof(string)); iUID = strval(string); format(string, sizeof(string), "Total players %d.", iUID); SendClientMessageToAll(0xC4C4C4FF, string);