Toy Editor
#1

Alright so basically what I am trying to do is make a menu which displays "Bone" and "Edit" with buttons "Select" and "Cancel" So when you click Edit the new toy editor appears. But when you click Bone the toy editor doesn't appear yet. So basically below is some of the unfinished code im working on


Код:
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), "%sOffset X (%f)\n", stringg,(PlayerToyInfo[playerid][slotselection[playerid]][ptPosX]*100));
 	ShowPlayerDialog(playerid, EDITTOYS2, DIALOG_STYLE_LIST, "Toy Menu: Edit", stringg, "Select", "Cancel");
}
So basically this line here >
Код:
format(stringg, sizeof(stringg), "%sOffset X (%f)\n", stringg,(PlayerToyInfo[playerid][slotselection[playerid]][ptPosX]*100));
Needs to stay but when you click it it needs to bring you to the new toy editor.

And i tried this but it didn't work and just gave me errors.

Код:
format(stringg, sizeof(stringg), "%sOffset X (%f)\n", stringg,(EditAttachedObject(playerid, 0)));
this is the simple easy code for the new toy/object editor that i need.
Код:
EditAttachedObject(playerid, 0)
EDIT: BTW I want this as a dialog not command.
Reply


Messages In This Thread
Toy Editor - by Johnny_Robins - 30.05.2012, 21:11
Re: Toy Editor - by Johnny_Robins - 30.05.2012, 22:23
Re: Toy Editor - by Johnny_Robins - 31.05.2012, 20:00
Re: Toy Editor - by MadeMan - 31.05.2012, 20:12
Re: Toy Editor - by Johnny_Robins - 31.05.2012, 20:23
Re: Toy Editor - by MadeMan - 31.05.2012, 20:27
Re: Toy Editor - by Johnny_Robins - 31.05.2012, 20:32
Re: Toy Editor - by Johnny_Robins - 31.05.2012, 20:41
Re: Toy Editor - by MadeMan - 31.05.2012, 20:45
Re: Toy Editor - by Johnny_Robins - 31.05.2012, 20:46

Forum Jump:


Users browsing this thread: 1 Guest(s)