Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward LoadHouses();
- public LoadHouses()
- {
- new queryhouse[300], stringhouse[200], idxh = 1;
- format(queryhouse, sizeof(queryhouse), "SELECT * FROM `house`");
- mysql_query(queryhouse);
- mysql_store_result();
- while(mysql_fetch_row(queryhouse, "|"))
- {
- sscanf(queryhouse, "p<|>dds[24]s[24]s[100]dfffddfffdd", //Dobrze tutaj jest
- PrivHouse[idxh][dUID], //UID Domu
- PrivHouse[idxh][dPickup], //id pickupu
- PrivHouse[idxh][dOwner], //Wlasciciel domu
- PrivHouse[idxh][dRoomer], //Lokator Domu
- PrivHouse[idxh][dNameHouse], //Nazwa domu
- PrivHouse[idxh][dHouseOpen], //1 - ZAMKNIETY 0 - OTWARTY
- PrivHouse[idxh][dOutX], //Pozycja wejscia
- PrivHouse[idxh][dOutY], //Pozycja wejscia
- PrivHouse[idxh][dOutZ], //Pozycja wejscia
- PrivHouse[idxh][dOutInt], //Interior wejscia
- PrivHouse[idxh][dOutVW], //VW wejscia
- PrivHouse[idxh][dInX], //poz wyjscia
- PrivHouse[idxh][dInY], //poz wyjscia
- PrivHouse[idxh][dInZ], //poz wyjscia
- PrivHouse[idxh][dInInt], //poz interior
- PrivHouse[idxh][dInVW]); //poz virtualword
- PrivHouse[idxh][PickupID] = CreatePickup(PrivHouse[idxh][dPickup], 0, PrivHouse[idxh][dOutX], PrivHouse[idxh][dOutY], PrivHouse[idxh][dOutZ], PrivHouse[idxh][dOutVW]);
- format(stringhouse, sizeof(stringhouse), "[Prywatny Dom]\n %s \nWlasciciel: %s\nLokator: %s\n|UID: %d|", PrivHouse[idxh][dNameHouse], PrivHouse[idxh][dOwner], PrivHouse[idxh][dRoomer], PrivHouse[idxh][dUID]);
- Create3DTextLabel(stringhouse, COLOR_PINK, PrivHouse[idxh][dOutX], PrivHouse[idxh][dOutY], PrivHouse[idxh][dOutZ], 5.0, PrivHouse[idxh][dOutVW], 0);
- idxh++;
- }
- mysql_free_result();
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement