Toy Editor doesn't save after edit - 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: Toy Editor doesn't save after edit (
/showthread.php?tid=461640)
Toy Editor doesn't save after edit -
lider1241 - 02.09.2013
I found a code for 0.3e editor, but when i done edit a attachedobject i see it in the position i edited but others don't
on the first time it was with coordinates dialog then i changed it with arrows.
Код:
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\n", stringg,(PlayerToyInfo[playerid][slotselection[playerid]][ptPosX]*100));
ShowPlayerDialog(playerid, EDITTOYS2, DIALOG_STYLE_LIST, "Toy Menu: Edit", stringg, "Select", "Cancel");
}
Arrows 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)
{
{
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) EditAttachedObject(playerid, i);
}
SendClientMessageEx(playerid, COLOR_WHITE, "HINT: Hold {A42AD1}LSHIFT {F2F299}to move your camera, press escape to cancel.");
return 1;
}