Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new str[256];
- switch(dialogid)
- {
- //... andere Cases/Dialoge
- case DIALOG_ADMINHAUSC4: // Waring & Error 518
- {
- CreateHouse(playerid, 4);
- format(str, sizeof(str), "SELECT * FROM `haus` WHERE `ID` = '%d'", HausCreate[playerid][chRegID]);
- mysql_tquery(handle,str);
- new rows;
- cache_get_row_count(rows);
- for(new i = 0; i != rows; i++)
- {
- if(!HausInfo[i][hLoggedIn])
- {
- cache_get_value_name_int(i, "ID", HausInfo[i][h_id]);
- cache_get_value_name(i, "besitzer", HausInfo[i][hBesitzer]);
- cache_get_value_name_float(i, "coordsX", HausInfo[i][hX]);
- cache_get_value_name_float(i, "coordsY", HausInfo[i][hY]);
- cache_get_value_name_float(i, "coordsZ", HausInfo[i][hZ]);
- cache_get_value_name_float(i, "coordsFA", HausInfo[i][hFA]);
- cache_get_value_name_float(i, "coordsX2", HausInfo[i][hX2]);
- cache_get_value_name_float(i, "coordsY2", HausInfo[i][hY2]);
- cache_get_value_name_float(i, "coordsZ2", HausInfo[i][hZ2]);
- cache_get_value_name_float(i, "coordsFA2", HausInfo[i][hFA2]);
- cache_get_value_name_int(i, "preis", HausInfo[i][hPreis]);
- cache_get_value_name_int(i, "interior", HausInfo[i][hInterior]);
- cache_get_value_name_int(i, "free", HausInfo[i][hFree]);
- cache_get_value_name_int(i, "vermietet", HausInfo[i][hVermietet]);
- cache_get_value_name_int(i, "mietpreis", HausInfo[i][hMietpreis]);
- cache_get_value_name(i, "mieter", HausInfo[i][hMieter]);
- cache_get_value_name_int(i, "art", HausInfo[i][hArt]);
- HausInfo[i][hLoggedIn] = true;
- new freehouse;
- if(HausInfo[i][hFree] == 0)
- {
- freehouse = 1272;
- if(HausInfo[i][hVermietet] == 0)
- {
- format(str, sizeof(str), "Besitzer: %s\nMieter: %s",HausInfo[i][hBesitzer], HausInfo[i][hMieter]);
- }
- else
- {
- format(str, sizeof(str), "Besitzer: %s\nMietpreis: %d\n/renthouse - Haus mieten",HausInfo[i][hBesitzer], HausInfo[i][hMietpreis]);
- }
- haus3DText[i] = Create3DTextLabel(str, COLOR_GREEN,HausInfo[i][hX], HausInfo[i][hY], HausInfo[i][hZ], 5.0, 0, 1 );
- }
- else
- {
- freehouse = 1273;
- if(HausInfo[i][hPreis] == 1)
- {
- format(str, sizeof(str), "Haus zu Verkaufen\nKaufpreis: %d Coins\n/buyhouse - Haus kaufen",HausInfo[i][hPreis]);
- }
- else if(HausInfo[i][hPreis] == 2)
- {
- format(str, sizeof(str), "Haus zu Verkaufen\nKaufpreis: %d SA$\n/buyhouse - Haus kaufen",HausInfo[i][hPreis]);
- }
- haus3DText[i] = Create3DTextLabel(str, COLOR_RED,HausInfo[i][hX], HausInfo[i][hY], HausInfo[i][hZ], 5.0, 0, 1 );
- }
- hausPickup[i] = CreatePickup(freehouse, 0, HausInfo[i][hX], HausInfo[i][hY], HausInfo[i][hZ]);
- 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]);
- }
- }
- }
- } // Warning 579
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement