[Tutorial] How to make a Model Selection for /Skins - 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)
+---- Forum: Tutorials (
https://sampforum.blast.hk/forumdisplay.php?fid=70)
+---- Thread: [Tutorial] How to make a Model Selection for /Skins (
/showthread.php?tid=500205)
How to make a Model Selection for /Skins -
minijackc - 11.03.2014
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
Re: How to make a Model Selection for /Skins -
JacobEdwards - 11.03.2014
This is not really a tutorial, you are not explaining anything. You are just giving people code.
Re: How to make a Model Selection for /Skins -
RichieĀ© - 11.03.2014
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.
Re: How to make a Model Selection for /Skins -
azzerking - 12.03.2014
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
Re: How to make a Model Selection for /Skins -
Simou - 14.03.2014
Nice.