SA-MP Forums Archive
MySql Skin saving (its been a week) - 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 Skin saving (its been a week) (/showthread.php?tid=628816)



MySql Skin saving (its been a week) - sscarface - 15.02.2017

FIXED!


Re: MySql Skin saving (its been a week) - AndreiWow - 15.02.2017

cache_get_value_int(0, "Skin", PlayerInfo[playerid][Skin]); - Just an example how it should look...


Re: MySql Skin saving (its been a week) - Vince - 15.02.2017

Why do you create these absolutely humongous arrays?
Do you get the "code size" warning on compilation? Because that is a severe red flag. Using more memory than is assigned will eventually lead to memory corruption which in turn will lead to all sorts of glitches.


Re: MySql Skin saving (its been a week) - sscarface - 15.02.2017

@Andrei
Thanks.

@vince
I actually created this script before a year and i m scripting it again so. Have to fix it and no it doesn't show any warning or error. Thanks to you for letting me.

But both of your post really didn't help me.


Re: MySql Skin saving (its been a week) - Dokins - 15.02.2017

Quote:

It doesn't load players skin but it does save player skin into database.

Generally, skins don't set unless the player is spawned, try setting them OnPlayerSpawn.

Also I don't see where you are doing TogglePlayerSpectating(playerid, 1);

pawn Код:
public OnPlayerConnect(playerid)
{
    TogglePlayerSpectating(playerid, 1);



Re: MySql Skin saving (its been a week) - sscarface - 16.02.2017

Quote:
Originally Posted by Dokins
Посмотреть сообщение
Generally, skins don't set unless the player is spawned, try setting them OnPlayerSpawn.

Also I don't see where you are doing TogglePlayerSpectating(playerid, 1);

pawn Код:
public OnPlayerConnect(playerid)
{
    TogglePlayerSpectating(playerid, 1);
I do save player data including skin under PlayerDisconnect. Isn't same thing if i do save player skin after spawned or under PlayerDisconnect? Does it matter?