SAMP Gitlab CI Test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
4.0 KiB

5 years ago
  1. /* SA-MP Object Functions
  2. *
  3. * (c) Copyright 2005-2015, SA-MP Team
  4. *
  5. */
  6. #if defined _objects_included
  7. #endinput
  8. #endif
  9. #define _objects_included
  10. #pragma library objects
  11. // Objects
  12. native CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
  13. native AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
  14. native AttachObjectToObject(objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1);
  15. native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ);
  16. native SetObjectPos(objectid, Float:X, Float:Y, Float:Z);
  17. native GetObjectPos(objectid, &Float:X, &Float:Y, &Float:Z);
  18. native SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ);
  19. native GetObjectRot(objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
  20. native GetObjectModel(objectid);
  21. native SetObjectNoCameraCol(objectid);
  22. native IsValidObject(objectid);
  23. native DestroyObject(objectid);
  24. native MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);
  25. native StopObject(objectid);
  26. native IsObjectMoving(objectid);
  27. native EditObject(playerid, objectid);
  28. native EditPlayerObject(playerid, objectid);
  29. native SelectObject(playerid);
  30. native CancelEdit(playerid);
  31. native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
  32. native AttachPlayerObjectToVehicle(playerid, objectid, vehicleid, Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ, Float:fRotX, Float:fRotY, Float:RotZ);
  33. native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z);
  34. native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z);
  35. native SetPlayerObjectRot(playerid, objectid, Float:RotX, Float:RotY, Float:RotZ);
  36. native GetPlayerObjectRot(playerid, objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
  37. native GetPlayerObjectModel(playerid, objectid);
  38. native SetPlayerObjectNoCameraCol(playerid, objectid);
  39. native IsValidPlayerObject(playerid, objectid);
  40. native DestroyPlayerObject(playerid, objectid);
  41. native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0);
  42. native StopPlayerObject(playerid, objectid);
  43. native IsPlayerObjectMoving(playerid, objectid);
  44. native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
  45. #define OBJECT_MATERIAL_SIZE_32x32 10
  46. #define OBJECT_MATERIAL_SIZE_64x32 20
  47. #define OBJECT_MATERIAL_SIZE_64x64 30
  48. #define OBJECT_MATERIAL_SIZE_128x32 40
  49. #define OBJECT_MATERIAL_SIZE_128x64 50
  50. #define OBJECT_MATERIAL_SIZE_128x128 60
  51. #define OBJECT_MATERIAL_SIZE_256x32 70
  52. #define OBJECT_MATERIAL_SIZE_256x64 80
  53. #define OBJECT_MATERIAL_SIZE_256x128 90
  54. #define OBJECT_MATERIAL_SIZE_256x256 100
  55. #define OBJECT_MATERIAL_SIZE_512x64 110
  56. #define OBJECT_MATERIAL_SIZE_512x128 120
  57. #define OBJECT_MATERIAL_SIZE_512x256 130
  58. #define OBJECT_MATERIAL_SIZE_512x512 140
  59. #define OBJECT_MATERIAL_TEXT_ALIGN_LEFT 0
  60. #define OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
  61. #define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2
  62. native SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0);
  63. native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0);
  64. native SetObjectMaterialText(objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
  65. native SetPlayerObjectMaterialText(playerid, objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
  66. native SetObjectsDefaultCameraCol(disable);