Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.16 KB | None | 0 0
  1. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  2. {
  3. new str[256];
  4. switch(dialogid)
  5. {
  6. //... andere Cases/Dialoge
  7.  
  8. case DIALOG_ADMINHAUSC4: // Waring & Error 518
  9. {
  10. CreateHouse(playerid, 4);
  11. format(str, sizeof(str), "SELECT * FROM `haus` WHERE `ID` = '%d'", HausCreate[playerid][chRegID]);
  12. mysql_tquery(handle,str);
  13. new rows;
  14. cache_get_row_count(rows);
  15. for(new i = 0; i != rows; i++)
  16. {
  17. if(!HausInfo[i][hLoggedIn])
  18. {
  19. cache_get_value_name_int(i, "ID", HausInfo[i][h_id]);
  20. cache_get_value_name(i, "besitzer", HausInfo[i][hBesitzer]);
  21. cache_get_value_name_float(i, "coordsX", HausInfo[i][hX]);
  22. cache_get_value_name_float(i, "coordsY", HausInfo[i][hY]);
  23. cache_get_value_name_float(i, "coordsZ", HausInfo[i][hZ]);
  24. cache_get_value_name_float(i, "coordsFA", HausInfo[i][hFA]);
  25. cache_get_value_name_float(i, "coordsX2", HausInfo[i][hX2]);
  26. cache_get_value_name_float(i, "coordsY2", HausInfo[i][hY2]);
  27. cache_get_value_name_float(i, "coordsZ2", HausInfo[i][hZ2]);
  28. cache_get_value_name_float(i, "coordsFA2", HausInfo[i][hFA2]);
  29. cache_get_value_name_int(i, "preis", HausInfo[i][hPreis]);
  30. cache_get_value_name_int(i, "interior", HausInfo[i][hInterior]);
  31. cache_get_value_name_int(i, "free", HausInfo[i][hFree]);
  32. cache_get_value_name_int(i, "vermietet", HausInfo[i][hVermietet]);
  33. cache_get_value_name_int(i, "mietpreis", HausInfo[i][hMietpreis]);
  34. cache_get_value_name(i, "mieter", HausInfo[i][hMieter]);
  35. cache_get_value_name_int(i, "art", HausInfo[i][hArt]);
  36. HausInfo[i][hLoggedIn] = true;
  37. new freehouse;
  38. if(HausInfo[i][hFree] == 0)
  39. {
  40. freehouse = 1272;
  41. if(HausInfo[i][hVermietet] == 0)
  42. {
  43. format(str, sizeof(str), "Besitzer: %s\nMieter: %s",HausInfo[i][hBesitzer], HausInfo[i][hMieter]);
  44. }
  45. else
  46. {
  47. format(str, sizeof(str), "Besitzer: %s\nMietpreis: %d\n/renthouse - Haus mieten",HausInfo[i][hBesitzer], HausInfo[i][hMietpreis]);
  48. }
  49. haus3DText[i] = Create3DTextLabel(str, COLOR_GREEN,HausInfo[i][hX], HausInfo[i][hY], HausInfo[i][hZ], 5.0, 0, 1 );
  50. }
  51. else
  52. {
  53. freehouse = 1273;
  54. if(HausInfo[i][hPreis] == 1)
  55. {
  56. format(str, sizeof(str), "Haus zu Verkaufen\nKaufpreis: %d Coins\n/buyhouse - Haus kaufen",HausInfo[i][hPreis]);
  57. }
  58. else if(HausInfo[i][hPreis] == 2)
  59. {
  60. format(str, sizeof(str), "Haus zu Verkaufen\nKaufpreis: %d SA$\n/buyhouse - Haus kaufen",HausInfo[i][hPreis]);
  61. }
  62. haus3DText[i] = Create3DTextLabel(str, COLOR_RED,HausInfo[i][hX], HausInfo[i][hY], HausInfo[i][hZ], 5.0, 0, 1 );
  63. }
  64. hausPickup[i] = CreatePickup(freehouse, 0, HausInfo[i][hX], HausInfo[i][hY], HausInfo[i][hZ]);
  65. printf("LOAD: Haus[%d] | X[%f] | Y[%f] | Z[%f] | Int[%d]", HausInfo[i][h_id], HausInfo[i][hX], HausInfo[i][hY], HausInfo[i][hZ], HausInfo[i][hInterior]);
  66. }
  67. }
  68. }
  69. } // Warning 579
  70. return 0;
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement