mysql - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: mysql (
/showthread.php?tid=552146)
mysql -
BoU3A - 22.12.2014
hello i have mysql system and its save the data fine and the register system is but where i load the stats of player OnPlayerSpawn or OnPlayerConnected or where like SetPlayerSkin and SetPlayerInterior etc?
Re: mysql -
PowerPC603 - 22.12.2014
Loading data is usually done under OnPlayerConnect.
Players usually connect once, but may respawn multiple times during their gaming session.
There is no need to reload all their data everytime they spawn, since the data was already loaded before.
Re: mysql -
BoU3A - 22.12.2014
Quote:
Originally Posted by PowerPC603
Loading data is usually done under OnPlayerConnect.
Players usually connect once, but may respawn multiple times during their gaming session.
There is no need to reload all their data everytime they spawn, since the data was already loaded before.
|
Give me exmaple please i tryed to SetPlayerSkin(playerid,pdata[playerid][Skin]); etc with OnPlayerConnected and didnt work but when i i put it with OnPlayerSpawn it works Sorry for my english sir
Re: mysql -
PowerPC603 - 23.12.2014
Setting a skin under OnPlayerConnect won't work.
The player is still being connected and has to pass class-selection first.
You can use SetPlayerSkin under OnPlayerSpawn, or OnPlayerRequestSpawn, whichever you prefer.