Skin error? -
Nathan_Taylor - 05.03.2013
First off, my gamemode code:
http://pastebin.com/RbmZnu0r
Okay, so, I just added the registration/login part. Now, when I login, (already registered user) I get put in the right spot, however, when I do spawn, my skin is the default CJ skin. In my INI file, I have
and when I leave the game, it saves my skin from
as 164. Also, this part of my code, from line 648-650 I have this code as a test
pawn Код:
new test[128];
format(test, sizeof(test), "Your Skin is: %i", pInfo[playerid][Skin]);
SendClientMessage(playerid, COLOR_LIMEGREEN, test);
Which simply displays the Skin value which should have been applied on lines 636-638 as follows
pawn Код:
SetSpawnInfo(playerid, 0, pInfo[playerid][Skin], pInfo[playerid][LastX], pInfo[playerid][LastY], pInfo[playerid][LastZ], pInfo[playerid][LastA], 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
GivePlayerMoney(playerid, pInfo[playerid][Money]);
So apparently, on line 648, pInfo[playerid][Skin] is equal to 164 (from .ini)
Yet, on line 636, pInfo[playerid][Skin] is equal to 0 (from narnia?)
Anyone see why this is happening?
Re: Skin error? -
Nathan_Taylor - 05.03.2013
bummppp
Re: Skin error? -
Calabresi - 05.03.2013
Are you sure that the script writes skin as 164 on the ini? Because I did not see any GetPlayerSkin to store what skin is in use by player.
Re: Skin error? -
Nathan_Taylor - 05.03.2013
I see what you are saying, which is something I forgot to add, but that isn't what is causing that problem. Adding that would be in the player disconnect to save their skin incase it changed during their online seession. In my .INI file, it says my skin is 164, also, when I login, it sends me the message "Your skin is: 164" which is what pInfo[playerid][Skin] is set to (from the ini file line).
Re: Skin error? -
Calabresi - 05.03.2013
Very interesting because no problems should be seen in this case. If your SendClientMessage says that your skin is 164, try putting SetSpawnInfo after SendClientMessage line.