case DIALOG_INTRODUCIRID_COCHE:
{
if(response == 1)
{
totalcarros++;
InformacionV[totalcarros][modelid] = strval(inputtext);
GetPlayerPos(playerid, InformacionV[totalcarros][x], InformacionV[totalcarros][y], InformacionV[totalcarros][z]);
GetPlayerFacingAngle(playerid, InformacionV[totalcarros][r]);
InformacionV[totalcarros][vehexist] = true;
InformacionV[totalcarros][vehid] = CreateVehicle(InformacionV[totalcarros][modelid], InformacionV[totalcarros][x], InformacionV[totalcarros][y], InformacionV[totalcarros][z], InformacionV[totalcarros][r], 1, 1, -1);
}
}
CMD:menu(playerid, params[])
{
if(EstaCreandoCoche != true)
{
ShowPlayerDialog(playerid, DIALOG_CREAR_ARCHIVO, DIALOG_STYLE_LIST, "Menu - Nuevo archivo", "Crear nuevo archivo", "Seleccionar", "Cancelar");
}
else
{
ShowPlayerDialog(playerid, DIALOG_MENU_ARCHIVO, DIALOG_STYLE_LIST, "Menu - Vehiculos", "Crear nuevo coche\nActualizar lugar coche\nBorrar coche\nGuardar coche", "Seleccionar", "Cancelar");
}
return 1;
}
case DIALOG_MENU_ARCHIVO:
{
if(response == 1)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, DIALOG_INTRODUCIRID_COCHE, DIALOG_STYLE_INPUT, "Menu - Introducir ID", "Introduce la ID del modelo del vehнculo que deseas crear", "Crear", "Cancelar"); // Here
}
case 1:
{
ShowPlayerDialog(playerid, DIALOG_ACTUALIZAR_POS, DIALOG_STYLE_MSGBOX, "Menu - Actualizar posicion de vehiculo", "їSeguro que deseas cambiar la posicion del coche aqui?", "Aceptar", "Cancelar");
}
case 2:
{
ShowPlayerDialog(playerid, DIALOG_BORRAR_COCHE, DIALOG_STYLE_MSGBOX, "Menu - Borrar coche", "їSeguro que desea borrar el coche?", "Si", "No");
}
case 3:
{
ShowPlayerDialog(playerid, DIALOG_GUARDAR_COCHE, DIALOG_STYLE_MSGBOX, "Menu - Guardar coche", "їSeguro que deseas guardar el coche?", "Si", "No");
}
}
}
}
if(dialogid == DIALOG_INTRODUCIRID_COCHE) { if(response) { totalcarros++; InformacionV[totalcarros][modelid] = strval(inputtext); GetPlayerPos(playerid, InformacionV[totalcarros][x], InformacionV[totalcarros][y], InformacionV[totalcarros][z]); GetPlayerFacingAngle(playerid, InformacionV[totalcarros][r]); InformacionV[totalcarros][vehexist] = true; InformacionV[totalcarros][vehid] = CreateVehicle(InformacionV[totalcarros][modelid], InformacionV[totalcarros][x], InformacionV[totalcarros][y], InformacionV[totalcarros][z], InformacionV[totalcarros][r], 1, 1, -1); } return 1; } |