21.09.2014, 22:45
(
Последний раз редактировалось roderjit; 22.09.2014 в 00:47.
)
Video:
[ame="www.youtube.com/watch?v=yUAeV33cvfM"]ERROR[/ame]
[ame="www.youtube.com/watch?v=yUAeV33cvfM"]ERROR[/ame]
case EDITTOYS:
{
if(response)
{
if(PlayerToyInfo[playerid][listitem][ptModelID] == 0) return ShowPlayerDialog(playerid, 0, DIALOG_STYLE_MSGBOX, ""COL_GENERAL"Menu Accesorios: {FFFFFF}Ediciуn", "No tienes nada en ese slot!", "OK", "");
SendClientMessageEx(playerid, COLOR_WHITE, "TIP: Posiciona bien la cбmara y usa /headmove para una ediciуn mucho mejor.");
slotselection[playerid] = listitem;
ShowEditMenu(playerid);
}
else return ShowPlayerDialog( playerid, TOYS, DIALOG_STYLE_LIST, ""COL_GENERAL"Toy Menu", ""COL_GENERAL"* "COL_WHITE"Poner/Quitar un Toy\n"COL_GENERAL"* "COL_WHITE"Editar un Toy\n"COL_GENERAL"* "COL_WHITE"Eliminar un Toy","OK", "Cancelar" );
ShowEditMenu(playerid);
}
case EDITTOYS2:
{
if(response)
{
switch(listitem)
{
case 0: ShowPlayerDialog(playerid, EDITTOYSBONE, DIALOG_STYLE_LIST, ""COL_GENERAL"Selecciona una Parte", "Columna\nCabeza\nBrazo Izq Sup\nBrazo Der Sup\nMano Izq\nMano Derecha\nMuslo Izq\nMuslo Der\nPie Izq\nPie Der\nRight calf\nLeft calf\nAnteBrazo Izq\nAnteBrazo Der\nClavicula Izq\nClavicula Der\nCuello\nQuijada", "Seleccionar", "Cancelar");
case 1:
{
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], PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX],
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY], PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ]);
EditAttachedObject(playerid, slotselection[playerid]);
Editing[playerid] =1;
return SendClientMessage(playerid, -1, "* Mantйn presionado "COL_GENERAL"~k~~PED_SPRINT~{FFFFFF} para cambiar la posiciуn de la cбmara.");
}
}
}
else
{
new stringg[512];
for(new x;x<MAX_PLAYERTOYS;x++)
{
new name[24];
format(name, sizeof(name), "Nada");
for(new i;i<sizeof(HoldingObjectsAll);i++)
{
if(HoldingObjectsAll[i][holdingmodelid] == PlayerToyInfo[playerid][x][ptModelID])
{
format(name, sizeof(name), "%s", HoldingObjectsAll[i][holdingmodelname]);
}
}
format(stringg, sizeof(stringg), "%s(%d) %s (Parte: %s)\n", stringg, x, name, HoldingBones[PlayerToyInfo[playerid][x][ptBone]]);
}
ShowPlayerDialog(playerid, EDITTOYS, DIALOG_STYLE_LIST, ""COL_GENERAL"Selecciona un Accesorio", stringg, "Seleccionar", "Cancelar");
}
ShowEditMenu(playerid);
}
case EDITTOYSBONE:
{
if(response)
{
PlayerToyInfo[playerid][slotselection[playerid]][ptBone] = listitem+1;
}
ShowEditMenu(playerid);
}
public OnPlayerEditAttachedObject( playerid, response, index, modelid, boneid,Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,Float:fRotX, Float:fRotY, Float:fRotZ,Float:fScaleX, Float:fScaleY, Float:fScaleZ )
{
PlayerToyInfo[playerid][slotselection[playerid]][ptPosX] = fOffsetX;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosY] = fOffsetY;
PlayerToyInfo[playerid][slotselection[playerid]][ptPosZ] = fOffsetZ;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotX] = fRotX;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotY] = fRotY;
PlayerToyInfo[playerid][slotselection[playerid]][ptRotZ] = fRotZ;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = fScaleX;
if(fScaleX < 0.1) PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 0.1;
else if(fScaleX > 1.5) PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX] = 1.5;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = fScaleY;
if(fScaleY < 0.1) PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 0.1;
else if(fScaleY > 1.5) PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY] = 1.5;
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = fScaleZ;
if(fScaleZ < 0.1) PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 0.1;
else if(fScaleZ > 1.5) PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ] = 1.5;
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], PlayerToyInfo[playerid][slotselection[playerid]][ftscaleX],
PlayerToyInfo[playerid][slotselection[playerid]][ftscaleY], PlayerToyInfo[playerid][slotselection[playerid]][ftscaleZ]);
SendClientMessageEx(playerid, -1, "* Finalizaste de editar este objeto. Usa {FF8000}/toys {FFFFFF}si quieres editar otro objeto.");
slotselection[playerid] = -1;
Editing[playerid] = 0;
return 1;
}