04.10.2013, 15:49
I have a save skin command which when I do /skin [skinId here] it saves and load after spawn.
and I have another skin command that use mselection.inc but when I do /skin2 it changes skin. but it doesnt set my skin after spawn to a new one.
here is the command.
Do you think I missed something??
Код:
CMD:skin(playerid,params[]) { new skinid; if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, white, "{FFFF00}Usage: /skin <Skin ID>") ; if(IsPlayerConnected(playerid)) { if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, red, ">> Invaild Skin ID. It nust be between <0-299>"); GameTextForPlayer(playerid,"~g~Skin Changed",2000,3); pInfo[playerid][Skin] = skinid; SetPVarInt(playerid,"Useskin", 1); return SetPlayerSkin(playerid, skinid); } else return ShowMessage(playerid, red, 2); }
here is the command.
Код:
CMD:skin2(playerid,params[]) { ShowModelSelectionMenu(playerid, skinlist, "Select Skin"); return 1; }
Код:
public OnPlayerModelSelection(playerid, response, listid, modelid) { if(listid == skinlist) { if(response) { GameTextForPlayer(playerid,"~g~Skin Changed",2000,3); SetPVarInt(playerid,"Useskin", 1); GetPlayerSkin(playerid); SetPlayerSkin(playerid, modelid); } return 1; } return 1; }