command wont set in pinfo
#1

I have a save skin command which when I do /skin [skinId here] it saves and load after spawn.

Код:
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);

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

Код:
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;
}
Do you think I missed something??
Reply


Messages In This Thread
command wont set in pinfo - by kbalor - 04.10.2013, 15:49
Re: command wont set in pinfo - by Konstantinos - 04.10.2013, 15:52
Re: command wont set in pinfo - by kbalor - 04.10.2013, 16:06

Forum Jump:


Users browsing this thread: 1 Guest(s)