mSelection
#1

So, i want to use mselecton for skin's
Код:
COMMAND:oriided(playerid, params[])
{
	new skinid;
	if(PlayerLoggedIn[playerid] == true)
	{
		if(!sscanf(params, "i", skinid))
		{
  	if(skinid >= 1 && skinid <= 299)
			{
				if(IsPlayerInRangeOfPoint(playerid,3.0,207.8758,-100.6210,1005.2578))
				{
					if(100 < KasutajaInfo[playerid][Raha])
					{
                        SendClientMessage(playerid, COLOR_GREY, "Sa ostsid uued riided endale.Maksumus 100 SAKi!");
						SetPlayerSkin(playerid, skinid);
						GiveIGMoney(playerid, -100);
					}
					else SendClientMessage(playerid, COLOR_WHITE, " Sul ei ole piisavalt raha(100 SAK'i)");
				}
				else SendClientMessage(playerid, COLOR_WHITE, " Sa ei ole riidepoes");
			}
			else SendClientMessage(playerid, COLOR_WHITE, " Skin ei saa olla alla 1 ja suurem kui 299");
		}
		else SendClientMessage(playerid, COLOR_WHITE, "KASUTUS: /oriided [Skinid]");
	}
	else SendClientMessage(playerid, COLOR_WHITE, "VIGA: Sa ei ole veel sisse loginud");
	return 1;
}
What i have to do? to make the skinlist mselection?

I really hope you understand me
Reply
#2

Up:
pawn Код:
new skins = mS_INVALID_LISTID;
2. Make a text file called "skins". Insert into it these information:
Код:
ModelID RotX RotY RotZ Zoom
They are TextDraw font 5 settings, Learn more at: https://sampwiki.blast.hk/wiki/TextDrawSetPreviewModel
After all this, Load your skins file:
pawn Код:
public OnGameModeInit()
{
    skins = LoadModelSelectionMenu("skins.txt");
    return 1;
}
Then , make a cmd o/r anything to show it to the player:
pawn Код:
CMD:test(playerid, params[])
{
   #pragma unused params
    ShowModelSelectionMenu(playerid, skins, "Select Skin");
    return 1;
}
Use this public function to response the player menu call (when he clicks at a model):
pawn Код:
public OnPlayerModelSelection(playerid, response, listid, modelid)
Reply
#3

Yes, but if i want to use mselecton at this command (oriided) then what i have to change there?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)