Advertisement
Guest User

Untitled

a guest
Jan 19th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. /*upd37 - start*/
  2. @__LoadPlayerAttachData(playerid);
  3. @__LoadPlayerAttachData(playerid)
  4. {
  5. if(!cache_num_rows())
  6. {
  7. format(global_string, sizeof global_string, "INSERT INTO `user_attach_coords` (`UserID`) VALUES (%d)", p_info[playerid][id]);
  8. mysql_tquery(sql_connection, global_string);
  9.  
  10. return 1;
  11. }
  12.  
  13. new
  14. field[7],
  15. slotString[60];
  16.  
  17. new
  18. modelid,
  19. bone,
  20. Float:fOffsetX,
  21. Float:fOffsetY,
  22. Float:fOffsetZ,
  23. Float:fRotX,
  24. Float:fRotY,
  25. Float:fRotZ;
  26.  
  27. for(new index; index < MAX_PLAYER_ATTACHED_OBJECTS; index++)
  28. {
  29. format(field, sizeof field, "Slot%d", index);
  30. cache_get_field_content(0, field, slotString, sql_connection, sizeof slotString);
  31.  
  32. sscanf(slotString, "p<,>ddffffff", modelid, bone, fOffsetX, fOffsetY, fOffsetZ, fRotX, fRotY, fRotZ);
  33.  
  34. gPlayerAttachedObjectModel[playerid][index] = modelid;
  35. gPlayerAttachedObjectBone[playerid][index] = bone;
  36.  
  37. gPlayerEditObjectTD[playerid][index][0] =
  38. gPlayerAttachedObjectPos[playerid][index][0] = fOffsetX;
  39.  
  40. gPlayerEditObjectTD[playerid][index][1] =
  41. gPlayerAttachedObjectPos[playerid][index][1] = fOffsetY;
  42.  
  43. gPlayerEditObjectTD[playerid][index][2] =
  44. gPlayerAttachedObjectPos[playerid][index][2] = fOffsetZ;
  45.  
  46. gPlayerEditObjectTD[playerid][index][3] =
  47. gPlayerAttachedObjectPos[playerid][index][3] = fRotX;
  48.  
  49. gPlayerEditObjectTD[playerid][index][4] =
  50. gPlayerAttachedObjectPos[playerid][index][4] = fRotY;
  51.  
  52. gPlayerEditObjectTD[playerid][index][5] =
  53. gPlayerAttachedObjectPos[playerid][index][5] = fRotZ;
  54.  
  55. slotString[0] = '\0';
  56. }
  57.  
  58. return 1;
  59. }
  60. /*upd37 - end*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement