Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. tock LoadHouse() {
  2.  
  3. for(new i=0;i<MAX_HOUSE;i++) {
  4. new query[128];
  5. format(query, sizeof(query), "SELECT * FROM `house` WHERE `id` = '%d' LIMIT 1", i+1);
  6. mysql_tquery(sqlBase, query, "OnLoadHouse", "i", i); }
  7.  
  8. return 1; }
  9.  
  10. //==============================================================================
  11.  
  12. private OnLoadHouse(houseid) {
  13.  
  14. new rows, fields;
  15. new str[24];
  16. new inte;
  17.  
  18. cache_get_row_count(rows);
  19. cache_get_field_count(fields);
  20.  
  21. cache_get_value_name_int(0, "hBought", hInfo[houseid][hBought]);
  22. cache_get_value_name(0, "hOwner", str, 64); strmid(hInfo[houseid][hOwner], str, 0, strlen(str), 255);
  23. cache_get_value_name_int(0, "hInt", inte);
  24. cache_get_value_name_float(0, "hPosX", hInfo[houseid][hPosX]);
  25. cache_get_value_name_float(0, "hPosY", hInfo[houseid][hPosY]);
  26. cache_get_value_name_float(0, "hPosZ", hInfo[houseid][hPosZ]);
  27. cache_get_value_name_int(0, "hPrice", hInfo[houseid][hPrice]);
  28. cache_get_value_name_int(0, "hLevel", hInfo[houseid][hLevel]);
  29. cache_get_value_name_int(0, "hPosta", hInfo[houseid][hPosta]);
  30. cache_get_value_name_int(0, "hSmece", hInfo[houseid][hSmece]);
  31. cache_get_value_name_int(0, "hNovine", hInfo[houseid][hNovine]);
  32. cache_get_value_name_int(0, "hPice", hInfo[houseid][hPice]);
  33. cache_get_value_name_int(0, "hLocked", hInfo[houseid][hLocked]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement