SA-MP Forums Archive
[HELP] Save Skin and Use Skin not working. - 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: [HELP] Save Skin and Use Skin not working. (/showthread.php?tid=469829)



[HELP] Save Skin and Use Skin not working. - lottoboy - 14.10.2013

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:

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;
}

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.");
}