16.08.2013, 11:29
I save skins using MySQL. When the player connects, this is what goes on:
1) OnPlayerConnect, send a threaded query for checking if the player exists (OnPlayerCheckAccount)
2) OnPlayerCheckAccount, create dialogs
3) OnDialogResponse, check if the guy's pass is correct (GetPlayerPass)
4) GetPlayerPass, check if it's correct, if it is, send a query to get the data (LoadPlayerData)
5) LoadPlayerData, get data using cache functions and store in enum
What I want to do is display the chosen skin directly in the class selection. I tried setting SetSpawnInfo in LoadPlayerData, OnPlayerRequestClass, OnPlayerConnect, everything. What the problem is - when I enter the password, it shows CJ's skin or 1st skin (while I haven't added CJ's class!) and then when I click the NEXT/PREVIOUS button, it shows the correct skin (but later refuses to change - which is what is required) So, how do I make it show it the first time itself!?
1) OnPlayerConnect, send a threaded query for checking if the player exists (OnPlayerCheckAccount)
2) OnPlayerCheckAccount, create dialogs
3) OnDialogResponse, check if the guy's pass is correct (GetPlayerPass)
4) GetPlayerPass, check if it's correct, if it is, send a query to get the data (LoadPlayerData)
5) LoadPlayerData, get data using cache functions and store in enum
What I want to do is display the chosen skin directly in the class selection. I tried setting SetSpawnInfo in LoadPlayerData, OnPlayerRequestClass, OnPlayerConnect, everything. What the problem is - when I enter the password, it shows CJ's skin or 1st skin (while I haven't added CJ's class!) and then when I click the NEXT/PREVIOUS button, it shows the correct skin (but later refuses to change - which is what is required) So, how do I make it show it the first time itself!?