Skin error?
#1

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
Код:
skin = 164
and when I leave the game, it saves my skin from
pawn Код:
pInfo[playerid][Skin]
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?
Reply
#2

bummppp
Reply
#3

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.
Reply
#4

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).
Reply
#5

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)