[Tutorial] How to make a Model Selection for /Skins
#1

Hello, this is my first tutorial on how to make a model viewer for sa-mp i really wanted to release this when i learn't it! please do rep if it helped in any way shape or form.

Requirement's
ZCMD (If not use some other Command program)
Knowledge of basic scripting.
----------------------------------------------


Step 1:Add this after you're Defines.
Code:
new skinList = mS_INVALID_LISTID;//This Mean's its ignoring the Invalid Skins
Step 2: Add this to you're Public OnGameModeInit
Code:
public OnGameModeInit()
{
    skinList = LoadModelSelectionMenu("skins.txt");
	return 1;
}
Step 3:Create This if you dont already have it in you're Script.
Code:
public OnPlayerModelSelection(playerid, response, listid, modelid)
{
    if(listid == skinList)
    {
        if(response)
        {
            SendClientMessage(playerid, 0xFF0000FF, "Skin Changed");
            SetPlayerSkin(playerid, modelid);
        }
        else SendClientMessage(playerid, 0xFF0000FF, "Canceled skin selection");
        return 1;
    }
return 1;
}
Last Step: Add the Command.
Code:
COMMAND:skin(playerid, params[]) // or CMD:mycommand(playerid, params[])
	{
      ShowModelSelectionMenu(playerid, skinList, "Select Skin");
       return 1;
	   	}
Hope this Helped.
P.S I've attached a txt you need to put into you're "Scriptfiles" for the script to know the skin id's
Reply


Messages In This Thread
How to make a Model Selection for /Skins - by minijackc - 11.03.2014, 23:24
Re: How to make a Model Selection for /Skins - by JacobEdwards - 11.03.2014, 23:26
Re: How to make a Model Selection for /Skins - by Richie© - 11.03.2014, 23:50
Re: How to make a Model Selection for /Skins - by azzerking - 12.03.2014, 01:21
Re: How to make a Model Selection for /Skins - by Simou - 14.03.2014, 13:01

Forum Jump:


Users browsing this thread: 1 Guest(s)