SA-MP Forums Archive
mSelection - 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)
+--- Thread: mSelection (/showthread.php?tid=522694)



mSelection - SPA - 28.06.2014

Hello, I 'm using MSelection to attach objects to player, when i click on object item menu not hide what is the reason? shall i must to add #include <MSelection> to my filterscripts to fix that ?


Re: mSelection - Dignity - 28.06.2014

What type of Model Selection menu are you using? Static lists (ShowModelSelectionMenu) or dynamic lists (ShowModelSelectionMenuEx)?

Also, do you have the public OnPlayerModelSelection(Ex) callback? If you do, make sure to check if it has a if(response) statement in it.


Re: mSelection - SPA - 29.06.2014

Код:
//==============================================================================
public OnPlayerModelSelectionEx(playerid, response, extraid, modelid)
{
	if(extraid==DIALOG_ATTACH_MODEL_SELECTION)
	{
	    if(!response)
     	{   ShowPlayerDialog(playerid,DIALOG_ATTACH_OBJECT_SELECTION,DIALOG_STYLE_LIST,"Player Objects/Attachment: (Select Object Path)","Path:1 :: "COL_GREY"Server Objects Menu\n"COL_WHITE"Path:2 :: "COL_GREY"Custom Object","Next(>>)","Back(<<)");    }
	    if(response)
	    {
		    if(GetPVarInt(playerid, "AttachmentUsed") == 1) EditAttachedObject(playerid, modelid);
		    else
		    {
			    SetPVarInt(playerid, "AttachmentModelSel", modelid);
                new string[256+1];
				new dialog[500];
				for(new x;x<sizeof(AttachmentBones);x++)
    			{
					format(string, sizeof(string), "Bone:%s\n", AttachmentBones[x]);
					strcat(dialog,string);
				}
				ShowPlayerDialog(playerid, DIALOG_ATTACH_BONE_SELECTION, DIALOG_STYLE_LIST, \
				"{FF0000}Attachment Modification - Bone Selection", dialog, "Select", "Cancel");
		    }//else DeletePVar(playerid, "AttachmentIndexSel");
		}
 	}
	return 1;
}
This is my model