Help with saving attachments position.
#1

So, I have updated from old coords placing attachments and have been interested in using the 0.3e toy editor, so I followed the wiki for it, and it all works fine, but, it edits the first slot of my attachment system and dosn't save the position, here is the code for a showeditmenu:

Код:
stock ShowEditMenu(playerid)
{
    if(IsPlayerAttachedObjectSlotUsed(playerid, slotselection[playerid]))
	{
 		RemovePlayerAttachedObject(playerid, slotselection[playerid]);
	}
	SetPlayerAttachedObject(playerid, slotselection[playerid], PlayerToyInfo[playerid][slotselection[playerid]][ptModelID],
	PlayerToyInfo[playerid][slotselection[playerid]][ptBone], PlayerToyInfo[playerid][slotselection[playerid]][ptPosX],
	PlayerToyInfo[playerid][slotselection[playerid]][ptPosY], PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ],
	PlayerToyInfo[playerid][slotselection[playerid]][ptRotX], PlayerToyInfo[playerid][slotselection[playerid]][ptRotY],
	PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ], 1, 1, 1);

    new stringg[512];
    format(stringg, sizeof(stringg), "%sBone (%s)\n", stringg, HoldingBones[PlayerToyInfo[playerid][slotselection[playerid]][ptBone]]);
	format(stringg, sizeof(stringg), "Edit Offset (%f)\n", stringg,(PlayerToyInfo[playerid][slotselection[playerid]][ptPosX]*100));
 	ShowPlayerDialog(playerid, EDITTOYS2, DIALOG_STYLE_LIST, "Toy Menu: Edit", stringg, "Select", "Cancel");
}
and the edittoys2 code.

Код:
	if((dialogid == EDITTOYS2))
	{
	    if(response)
	    {
		    if(listitem == 0)
		    {
		        ShowPlayerDialog(playerid, EDITTOYSBONE, DIALOG_STYLE_LIST, "Select a Bone", "Spine\nHead\nLeft upper arm\nRight upper arm\nLeft hand\nRight hand\nLeft thigh\nRight thigh\nLeft foot\nRight foot\nRight calf\nLeft calf\nLeft forearm\nRight forearm\nLeft clavicle\nRight clavicle\nNeck\nJaw", "Select", "Cancel");
		    }
		    else if(listitem == 1)
		    {
		        EditAttachedObject(playerid, 0);
			}
			else if(listitem == 2)
		    {
		        EditAttachedObject(playerid, 0);
			}
			else if(listitem == 3)
		    {
		        EditAttachedObject(playerid, 0);
			}
			else if(listitem == 4)
		    {
                EditAttachedObject(playerid, 0);
			else if(listitem == 5)
		    {
		        EditAttachedObject(playerid, 0);
			}
			else if(listitem == 6)
		    {
		        EditAttachedObject(playerid, 0);
			}
		}
Please help, thank you.
Reply


Messages In This Thread
Help with saving attachments position. - by Kestro - 14.12.2012, 16:11
Re: Help with saving attachments position. - by park4bmx - 14.12.2012, 16:28
Re: Help with saving attachments position. - by Kestro - 14.12.2012, 16:36
Re: Help with saving attachments position. - by park4bmx - 14.12.2012, 17:22
Re: Help with saving attachments position. - by Kestro - 14.12.2012, 17:30
Re: Help with saving attachments position. - by park4bmx - 14.12.2012, 18:20

Forum Jump:


Users browsing this thread: 1 Guest(s)