14.07.2014, 04:44
I have no idea what is happening. Sometimes it works, it sets my skin, other times, it doesnt.
I made another command, to check pSkin and the skin i'm using atm.
This is the weird part. When i log in, my skin doesnt load, so i get cj skin. Then i use /myskin2, to see my current skin and the skin set in PlayerInfo[playerid][pSkin]. It tells me that my current skin is "824193135" and doesnt return any value to PlayerInfo[playerid][pSkin]. So i use /myskin, and nothing more, and the code sets my skin to what it should be (skin number 2, in my case), then i use /myskin2 once again, and it tells me my current skin is 2, and pSkin is also 2. There is a bug with PlayerInfo[playerid][pSkin], i just cant find where.
I made another command, to check pSkin and the skin i'm using atm.
pawn Код:
CMD:myskin2(playerid,params[])
{
new string[40];
format(string,20,"1- %d 2- %d",GetPlayerSkin(playerid),PlayerInfo[playerid][pSkin]);
SendClientMessage(playerid,COLOR_WHITE,string);
return 1;
}
CMD:myskin(playerid,params[])
{
SetPlayerSkin(playerid,PlayerInfo[playerid][pSkin]);
return 1;
}