Advertisement
FKu

Untitled

FKu
Oct 18th, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1.  
  2. enum attached_object_data
  3. {
  4. ao_model,
  5. ao_bone,
  6. Float:ao_x,
  7. Float:ao_y,
  8. Float:ao_z,
  9. Float:ao_rx,
  10. Float:ao_ry,
  11. Float:ao_rz
  12. }
  13.  
  14. new ao[MAX_PLAYERS][MAX_PLAYER_ATTACHED_OBJECTS][attached_object_data];
  15.  
  16. .
  17. .
  18. .
  19. .
  20. .
  21.  
  22.  
  23.  
  24.  
  25. public OnPlayerSpawn(playerid)
  26. {
  27. for(new i; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
  28. {
  29. SetPlayerAttachedObject(playerid,0, ao[playerid][i][ao_model],ao[playerid][i][ao_bone],ao[playerid][i][ao_x],ao[playerid][i][ao_y],ao[playerid][i][ao_z],ao[playerid][i][ao_rx],ao[playerid][i][ao_ry],ao[playerid][i][ao_rz]);
  30. }
  31. return 1;
  32. }
  33.  
  34. .
  35. .
  36. .
  37. .
  38. .
  39.  
  40.  
  41. public OnPlayerEditAttachedObject(playerid, response, index, modelid, boneid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fScaleX, Float:fScaleY, Float:fScaleZ)
  42. {
  43. if(response)
  44. {
  45. ao[playerid][index][ao_x] = fOffsetX;
  46. ao[playerid][index][ao_y] = fOffsetY;
  47. ao[playerid][index][ao_z] = fOffsetZ;
  48. ao[playerid][index][ao_rx] = fRotX;
  49. ao[playerid][index][ao_ry] = fRotY;
  50. ao[playerid][index][ao_rz] = fRotZ;
  51. ao[playerid][index][ao_sx] = fScaleX;
  52. ao[playerid][index][ao_sy] = fScaleY;
  53. ao[playerid][index][ao_sz] = fScaleZ;
  54. }
  55. return 1;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement