Guest User

Untitled

a guest
May 24th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. public ReadPlayerHouseData(){
  2.  
  3. new string[200], house[64];
  4.  
  5. for(new i, g = GetMaxPlayers(); i != g; i++){
  6. if(IsPlayerConnected(i)) {
  7. for(new h, l = MAX_HOUSES; h != l; h++){
  8.  
  9. format(house, sizeof(house), "/Houses/%d.pwn", h);
  10.  
  11. new File:x = fopen(house, io_read);
  12.  
  13. if(x){
  14. if(HouseInfo[h][hSellable] && PlayerToPoint(PTP_RADIUS, i, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ])) && !pozakuje[i]){
  15. 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]);
  16. TextDrawSetString(Dom1[i], string);
  17. SetTimerEx("Hide", 5000, false, "d", i);
  18. TextDrawShowForPlayer(i, Dom1[i]);
  19. TextDrawShowForPlayer(i, Dom2);
  20. pozakuje[i] = 1;
  21.  
  22. }else if(HouseInfo[h][hSellable] == 0 && PlayerToPoint(PTP_RADIUS, i, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]) && !pozakuje[i]){
  23. 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]);
  24. TextDrawSetString(Dom1[i], string);
  25. SetTimerEx("Hide", 2000, false, "d", i);
  26. TextDrawShowForPlayer(i, Dom1[i]);
  27. TextDrawShowForPlayer(i, Dom2);
  28. pozakuje[i] = 1;
  29.  
  30. }
  31. }
  32.  
  33. fclose(x);
  34. }
  35. }
  36. }
  37.  
  38. return 1;
  39. }
Add Comment
Please, Sign In to add comment