[HELP]saveskin and useskin not working!
#1

Everytime I do /saveskin it says skin saved but doesnt work. Everytime I do /useskin it gives me CJ Skin that i dont want. When I do /useskin it should give me the skin I have selected not a cj skin. here's my code:

saveskin:


Quote:

dcmd_saveskin(playerid,params[]) {

new string[128], SkinID = strval(params);

SkinID = GetPlayerSkin(playerid);
dUserSetINT(PlayerName2(playerid)).("FavSkin",Skin ID);
format(string, sizeof(string), "You have successfully saved this skin (ID %d)",SkinID);
SendClientMessage(playerid,yellow,string);
SendClientMessage(playerid,yellow,"Type: /useskin to use this skin, you will also spawn as this skin");
dUserSetINT(PlayerName2(playerid)).("UseSkin",1);
return 1;
}

useskin:

Quote:

dcmd_useskin(playerid,params[]) {
#pragma unused params
if(PlayerInfo[playerid][LoggedIn] == 1) {
dUserSetINT(PlayerName2(playerid)).("UseSkin",1);
SetPlayerSkin(playerid,dUserINT(PlayerName2(player id)).("FavSkin"));
return 1;
} else return SendClientMessage(playerid,red,"Unknown command. Type /cmds to see a list of available commands.");
}

Reply
#2

it might be saving the wrong data in your FavSkin when the player disconnects try to save your skin again
Check the file... disconnect yourself and then again check the file if it sets it to 0 then theres something else colliding your "FavSkin" In file saving
Reply
#3

check even below your onplayerspawn ..
whether you have mentioned something like setplayerskin (xxxxx)...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)