30.05.2012, 21:11
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
So basically this line here >
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.
this is the simple easy code for the new toy/object editor that i need.
EDIT: BTW I want this as a dialog not command.
Код:
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"); }
Код:
format(stringg, sizeof(stringg), "%sOffset X (%f)\n", stringg,(PlayerToyInfo[playerid][slotselection[playerid]][ptPosX]*100));
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)));
Код:
EditAttachedObject(playerid, 0)