View Single Post
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 08-02-2020 , 02:14   Re: [CSGO] Weapon & Knives (Skins, Name Tags, StatTrak, Wear/Float) [!ws !knife !name
Reply With Quote #1322

Quote:
Originally Posted by kgns View Post
i even encountered players having other random players admin rights, so i assumed somehow SteamIDs of connected players gets mixed up, thus the random players weapon skins and rank. it doesnt seem like a performance issue, because MySQL is built to handle millions of more data, and if it can query a random player's skins and give them to you, why should there be a performance problem querying your own data. no queries work in a timely fashion but i believe SteamIDs of players gets mixed up, as the queries for weapon skins, rankme data and admin details all query with SteamIDs
Clients are getting random skins is because your not resetting player arrays

You should put
Code:
 
				for(int i = 0; i < sizeof(g_WeaponClasses); i++)
				{
					g_iSkins[clientIndex][i] = 0;
					g_iStatTrak[clientIndex][i] = 0;
					g_iStatTrakCount[clientIndex][i] = 0;
					g_NameTag[clientIndex][i] = "";
					g_fFloatValue[clientIndex][i] = 0.0;
					g_iWeaponSeed[clientIndex][i] = -1;
				}
				g_iKnife[clientIndex] = 0;
In player connect or disconnect forwards
__________________
8guawong is offline