Advertisement
Guest User

Untitled

a guest
Aug 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. // >>>>>> MI PROBLEMA ES EL SIGUIENTE, ESTE DIALOG MUESTRA LOS AUTOS QUE TIENE EL JUGADOR PARA VENDER, EL NOMBRE DEL MISMO, LA MATRÍCULA Y PRECIO..
  2. // >...SACANDO LA INFORMACIÓN DEL "'ITERATOR TOTALAUTOS_'" LUEGO HAGO UN BUCLE CON LOS 4 SLOTS QUE PUEDEN USAR LOS JUGADORES PARA SUS AUTOS, OSEASE..
  3. //>..LOS AUTOS QUE ESTE MISMO PUEDE TENER. COMPARA SI LA ID DEL AUTO EN USERLLAVES ES LA MISMA QUE AUTOSQL Y MUESTRA, ESTO FUNCIONA. EL PROBLEMA..
  4. //>..ES QUE DEBERÍA DE MOSTRAR LOS 4 SLOTS Y DAR LA INFORMACIÓN, SI ESTÁ DISPONIBLE O SI TIENE AUTO LA INFORMACIÓN DEL MISMO, PERO NO LO HACE!
  5. // > LO QUE ES MOSTRAR 1 SOLO SLOT AL AZAR EN OCASIONES EN VEZ DE LOS 4.
  6.  
  7. Dialog:dialogVenderAuto(playerid, response, listitem, inputtext[])
  8. {
  9. if(response)
  10. {
  11. new StrDialog[279];
  12. foreach(new Autos_ : TotalAutos_)
  13. {
  14. for(new Slot_ = 0; Slot_ < 4; Slot_++)
  15. {
  16. new Auto_ = JugadoresDatos[playerid][userLlaves][Slot_];
  17. if(Auto_ == AutosDatos[ Autos_ ][autoSQL])
  18. {
  19. if(Auto_ == -1)
  20. {
  21. format(StrDialog, sizeof(StrDialog), "\n%d.\tDisponible", Slot_);
  22. }
  23. else
  24. {
  25. format(StrDialog, sizeof(StrDialog), "%d. Vehículo: %s | Matrícula: %s | Precio: %d\n", Slot_, NombreModel_Auto(AutosDatos[ Autos_ ][autoID]), AutosDatos[ Autos_ ][autoMatricula], AutosDatos[ Autos_ ][autoPrecio]);
  26. }
  27. }
  28. }
  29. Dialog_Show(playerid, dialogVenderAuto_2, DIALOG_STYLE_LIST, "Lista de Autos", StrDialog, ">", "-");
  30. }
  31. }
  32. return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement