10.01.2016, 21:38
Dialog:FurnitureList(playerid, response, listitem, inputtext[])
{
if (response)
{
new id = House_Inside(playerid);
if (id != -1 && House_IsOwner(playerid, id))
{
switch (listitem)
{
case 0:
{
EditDynamicObject(playerid, FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureObject]);
SendServerMessage(playerid, "Estas editando la posicion del \"%s\".", FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName]);
}
case 1:
{
new item = Inventory_Add(playerid, FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName], FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureModel]);
if (item == -1)
return SendErrorMessage(playerid, "No te quedan ranuras para los muebles.");
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s ha recogido su \"%s\".", ReturnName(playerid, 0), FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName]);
SendServerMessage(playerid, "Has recogido tu \"%s\". El objeto esta en tu inventario.", FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName]);
Furniture_Delete(PlayerData[playerid][pEditFurniture]);
CancelEdit(playerid);
PlayerData[playerid][pEditFurniture] = -1;
}
case 2:
{
Furniture_Delete(PlayerData[playerid][pEditFurniture]);
SendServerMessage(playerid, "Has borrado el mueble \"%s\".", FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName]);
CancelEdit(playerid);
PlayerData[playerid][pEditFurniture] = -1;
}
}
}
else {
PlayerData[playerid][pEditFurniture] = -1;
}
}
else {
PlayerData[playerid][pEditFurniture] = -1;
}
return 1;
}
{
if (response)
{
new id = House_Inside(playerid);
if (id != -1 && House_IsOwner(playerid, id))
{
switch (listitem)
{
case 0:
{
EditDynamicObject(playerid, FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureObject]);
SendServerMessage(playerid, "Estas editando la posicion del \"%s\".", FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName]);
}
case 1:
{
new item = Inventory_Add(playerid, FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName], FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureModel]);
if (item == -1)
return SendErrorMessage(playerid, "No te quedan ranuras para los muebles.");
SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, "** %s ha recogido su \"%s\".", ReturnName(playerid, 0), FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName]);
SendServerMessage(playerid, "Has recogido tu \"%s\". El objeto esta en tu inventario.", FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName]);
Furniture_Delete(PlayerData[playerid][pEditFurniture]);
CancelEdit(playerid);
PlayerData[playerid][pEditFurniture] = -1;
}
case 2:
{
Furniture_Delete(PlayerData[playerid][pEditFurniture]);
SendServerMessage(playerid, "Has borrado el mueble \"%s\".", FurnitureData[PlayerData[playerid][pEditFurniture]][furnitureName]);
CancelEdit(playerid);
PlayerData[playerid][pEditFurniture] = -1;
}
}
}
else {
PlayerData[playerid][pEditFurniture] = -1;
}
}
else {
PlayerData[playerid][pEditFurniture] = -1;
}
return 1;
}