[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
#2

This is not really a tutorial, you are not explaining anything. You are just giving people code.
Reply
#3

Maybe mention that it is mSelection? And its a copy paste from the example from the mSelection topic, exept you put uppercase L in skin list and used zcmd instead of strcmp.
Nice try, 1/10.
Reply
#4

It would help if you changed the fonts and size of the current text, when writing a tutorial make it clean and readable else people won't be able to read or understand it.

But good luck with making this better
Reply
#5

Nice.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)