Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ReadPlayerHouseData(){
- new string[200], house[64];
- for(new i, g = GetMaxPlayers(); i != g; i++){
- if(IsPlayerConnected(i)) {
- for(new h, l = MAX_HOUSES; h != l; h++){
- format(house, sizeof(house), "/Houses/%d.pwn", h);
- new File:x = fopen(house, io_read);
- if(x){
- if(HouseInfo[h][hSellable] && PlayerToPoint(PTP_RADIUS, i, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ])) && !pozakuje[i]){
- format(string, sizeof(string), "~b~Dom na sprzedadz!!!~n~~y~Wlasciciel: ~b~~h~%s~n~~y~Poziom: ~b~~h~%d~n~~y~Cena: ~b~~h~%d", HouseInfo[h][hName], HouseInfo[h][hLevel], HouseInfo[h][hSell]);
- TextDrawSetString(Dom1[i], string);
- SetTimerEx("Hide", 5000, false, "d", i);
- TextDrawShowForPlayer(i, Dom1[i]);
- TextDrawShowForPlayer(i, Dom2);
- pozakuje[i] = 1;
- }else if(HouseInfo[h][hSellable] == 0 && PlayerToPoint(PTP_RADIUS, i, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]) && !pozakuje[i]){
- format(string, sizeof(string), "~r~~h~Dom zajety!~n~~y~Wlasciciel: ~b~~h~%s~n~~y~Poziom: ~b~~h~%d", HouseInfo[h][hName], HouseInfo[h][hLevel]);
- TextDrawSetString(Dom1[i], string);
- SetTimerEx("Hide", 2000, false, "d", i);
- TextDrawShowForPlayer(i, Dom1[i]);
- TextDrawShowForPlayer(i, Dom2);
- pozakuje[i] = 1;
- }
- }
- fclose(x);
- }
- }
- }
- return 1;
- }
Add Comment
Please, Sign In to add comment