-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathomp_object.inc
1537 lines (1411 loc) · 71.5 KB
/
omp_object.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#if defined _INC_omp_object
#endinput
#endif
#define _INC_omp_object
/**
* <library name="omp_object" summary="open.mp object functions.">
* <license>
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*
* The original code is copyright (c) 2023, open.mp team and contributors.
* </license>
* <summary pawndoc="true">
* This library uses the enhanced <em>pawndoc.xsl</em> from
* <a href="https://github.com/pawn-lang/pawndoc">pawn-lang/pawndoc</a>.
* This XSL has features such as library and markdown support, and will not
* render this message when used.
* </summary>
* </library>
*/
/// <p/>
#pragma tabsize 4
/**
* <library>omp_object</library>
*/
#if defined MAX_OBJECTS
#if MAX_OBJECTS < 1 || MAX_OBJECTS > 2000
#error MAX_OBJECTS must be >= 1 and <= 2000
#endif
const __MAX_OBJECTS = MAX_OBJECTS;
#define __MAX_OBJECTS
#else
const MAX_OBJECTS = 2000;
#define MAX_OBJECTS 2000
#endif
/**
* <library>omp_object</library>
*/
#if defined MAX_OBJECT_MATERIAL_SLOTS
#if MAX_OBJECT_MATERIAL_SLOTS < 1 || MAX_OBJECT_MATERIAL_SLOTS > 16
#error MAX_OBJECT_MATERIAL_SLOTS must be >= 1 and <= 16
#endif
const __MAX_OBJECT_MATERIAL_SLOTS = MAX_OBJECT_MATERIAL_SLOTS;
#define __MAX_OBJECT_MATERIAL_SLOTS
#else
const MAX_OBJECT_MATERIAL_SLOTS = 16;
#define MAX_OBJECT_MATERIAL_SLOTS 16
#endif
/**
* <library>omp_object</library>
*/
const INVALID_OBJECT_ID = 0xFFFF;
#define INVALID_OBJECT_ID 65535
/// <p/>
/**
* <library>omp_object</library>
*/
#define SELECT_OBJECT: __TAG(SELECT_OBJECT):
enum SELECT_OBJECT:__SELECT_OBJECT
{
UNKNOWN_SELECT_OBJECT = -1,
SELECT_OBJECT_GLOBAL_OBJECT = 1,
SELECT_OBJECT_PLAYER_OBJECT
}
static stock SELECT_OBJECT:_@SELECT_OBJECT() { return __SELECT_OBJECT; }
#define UNKNOWN_SELECT_OBJECT (SELECT_OBJECT:-1)
#define SELECT_OBJECT_GLOBAL_OBJECT (SELECT_OBJECT:1)
#define SELECT_OBJECT_PLAYER_OBJECT (SELECT_OBJECT:2)
/// <p/>
/**
* <library>omp_object</library>
*/
#define OBJECT_MATERIAL_SIZE: __TAG(OBJECT_MATERIAL_SIZE):
enum OBJECT_MATERIAL_SIZE:__OBJECT_MATERIAL_SIZE (+= 10)
{
UNKNOWN_OBJECT_MATERIAL_SIZE = -1,
OBJECT_MATERIAL_SIZE_32x32 = 10,
OBJECT_MATERIAL_SIZE_64x32,
OBJECT_MATERIAL_SIZE_64x64,
OBJECT_MATERIAL_SIZE_128x32,
OBJECT_MATERIAL_SIZE_128x64,
OBJECT_MATERIAL_SIZE_128x128,
OBJECT_MATERIAL_SIZE_256x32,
OBJECT_MATERIAL_SIZE_256x64,
OBJECT_MATERIAL_SIZE_256x128,
OBJECT_MATERIAL_SIZE_256x256,
OBJECT_MATERIAL_SIZE_512x64,
OBJECT_MATERIAL_SIZE_512x128,
OBJECT_MATERIAL_SIZE_512x256,
OBJECT_MATERIAL_SIZE_512x512
}
static stock OBJECT_MATERIAL_SIZE:_@OBJECT_MATERIAL_SIZE() { return __OBJECT_MATERIAL_SIZE; }
#define UNKNOWN_OBJECT_MATERIAL_SIZE (OBJECT_MATERIAL_SIZE:-1)
#define OBJECT_MATERIAL_SIZE_32x32 (OBJECT_MATERIAL_SIZE:10)
#define OBJECT_MATERIAL_SIZE_64x32 (OBJECT_MATERIAL_SIZE:20)
#define OBJECT_MATERIAL_SIZE_64x64 (OBJECT_MATERIAL_SIZE:30)
#define OBJECT_MATERIAL_SIZE_128x32 (OBJECT_MATERIAL_SIZE:40)
#define OBJECT_MATERIAL_SIZE_128x64 (OBJECT_MATERIAL_SIZE:50)
#define OBJECT_MATERIAL_SIZE_128x128 (OBJECT_MATERIAL_SIZE:60)
#define OBJECT_MATERIAL_SIZE_256x32 (OBJECT_MATERIAL_SIZE:70)
#define OBJECT_MATERIAL_SIZE_256x64 (OBJECT_MATERIAL_SIZE:80)
#define OBJECT_MATERIAL_SIZE_256x128 (OBJECT_MATERIAL_SIZE:90)
#define OBJECT_MATERIAL_SIZE_256x256 (OBJECT_MATERIAL_SIZE:100)
#define OBJECT_MATERIAL_SIZE_512x64 (OBJECT_MATERIAL_SIZE:110)
#define OBJECT_MATERIAL_SIZE_512x128 (OBJECT_MATERIAL_SIZE:120)
#define OBJECT_MATERIAL_SIZE_512x256 (OBJECT_MATERIAL_SIZE:130)
#define OBJECT_MATERIAL_SIZE_512x512 (OBJECT_MATERIAL_SIZE:140)
/// <p/>
/**
* <library>omp_object</library>
*/
#define OBJECT_MATERIAL_TEXT_ALIGN: __TAG(OBJECT_MATERIAL_TEXT_ALIGN):
enum OBJECT_MATERIAL_TEXT_ALIGN:__OBJECT_MATERIAL_TEXT_ALIGN
{
// First so we don't have trailing commas.
#if __namemax > 31
UNKNOWN_OBJECT_MATERIAL_TEXT_ALIGN = -1,
OBJECT_MATERIAL_TEXT_ALIGN_CENTRE = 1,
OBJECT_MATERIAL_TEXT_ALIGN_CENTER = 1,
OBJECT_MATERIAL_TEXT_ALIGN_RIGHT = 2,
#endif
OBJECT_MATERIAL_TEXT_ALIGN_LEFT = 0,
OBJECT_MATERIAL_TEXT_ALIGN_CENT = 1,
OBJECT_MATERIAL_TEXT_ALIGN_RIGT = 2
}
static stock OBJECT_MATERIAL_TEXT_ALIGN:_@OBJECT_MATERIAL_TEXT_ALIGN() { return __OBJECT_MATERIAL_TEXT_ALIGN; }
#if __namemax > 31
#define UNKNOWN_OBJECT_MATERIAL_TEXT_ALIGN (OBJECT_MATERIAL_TEXT_ALIGN:-1)
#define OBJECT_MATERIAL_TEXT_ALIGN_CENTRE (OBJECT_MATERIAL_TEXT_ALIGN:1)
#define OBJECT_MATERIAL_TEXT_ALIGN_CENTER (OBJECT_MATERIAL_TEXT_ALIGN:1)
#define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT (OBJECT_MATERIAL_TEXT_ALIGN:2)
#endif
#define OBJECT_MATERIAL_TEXT_ALIGN_LEFT (OBJECT_MATERIAL_TEXT_ALIGN:0)
#define OBJECT_MATERIAL_TEXT_ALIGN_CENT (OBJECT_MATERIAL_TEXT_ALIGN:1)
#define OBJECT_MATERIAL_TEXT_ALIGN_RIGT (OBJECT_MATERIAL_TEXT_ALIGN:2)
/// <p/>
/**
* <library>omp_object</library>
*/
#define EDIT_RESPONSE: __TAG(EDIT_RESPONSE):
enum EDIT_RESPONSE:__EDIT_RESPONSE
{
UNKNOWN_EDIT_RESPONSE = -1,
EDIT_RESPONSE_CANCEL,
EDIT_RESPONSE_FINAL,
EDIT_RESPONSE_UPDATE
}
static stock EDIT_RESPONSE:_@EDIT_RESPONSE() { return __EDIT_RESPONSE; }
#define UNKNOWN_EDIT_RESPONSE (EDIT_RESPONSE:-1)
#define EDIT_RESPONSE_CANCEL (EDIT_RESPONSE:0)
#define EDIT_RESPONSE_FINAL (EDIT_RESPONSE:1)
#define EDIT_RESPONSE_UPDATE (EDIT_RESPONSE:2)
/*
888b 88 88
8888b 88 ,d ""
88 `8b 88 88
88 `8b 88 ,adPPYYba, MM88MMM 88 8b d8 ,adPPYba, ,adPPYba,
88 `8b 88 "" `Y8 88 88 `8b d8' a8P_____88 I8[ ""
88 `8b 88 ,adPPPPP88 88 88 `8b d8' 8PP""""""" `"Y8ba,
88 `8888 88, ,88 88, 88 `8b,d8' "8b, ,aa aa ]8I
88 `888 `"8bbdP"Y8 "Y888 88 "8" `"Ybbd8"' `"YbbdP"'
*/
/**
* <library>omp_object</library>
* <summary>Allows camera collisions with newly created objects to be disabled by default.</summary>
* <param name="disable"><b><c>1</c></b> to disable camera collisions for newly created objects and
* <b><c>0</c></b> to enable them (enabled by default)</param>
* <seealso name="SetObjectNoCameraCol" />
* <seealso name="SetPlayerObjectNoCameraCol" />
* <remarks>This function only affects the camera collision of objects created AFTER its use - it does
* not toggle existing objects' camera collisions.</remarks>
* <remarks>This only works outside the map boundaries (past <b><c>-3000</c></b>/<b><c>3000</c></b>
* units on the x and/or y axis).</remarks>
*/
#if __namemax > 31
native bool:SetObjectsDefaultCameraCollision(bool:disable);
#endif
#if !defined LEGACY_SCRIPTING_API
#if __namemax > 31
#pragma deprecated Use `SetObjectsDefaultCameraCollision`. To silence this warning define `LEGACY_SCRIPTING_API` or define `SAMP_COMPAT` for general SA-MP API compatibility.
#endif
#endif
native bool:SetObjectsDefaultCameraCol(bool:disable);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native GetObjectType(playerid, objectid);
/*
native # Global();
native Global(
native ====================(
native
*/
/**
* <library>omp_object</library>
* <summary>Creates an object at specified coordinates in the game world.</summary>
* <param name="modelid">The model to create</param>
* <param name="x">The x coordinate to create the object at</param>
* <param name="y">The y coordinate to create the object at</param>
* <param name="z">The z coordinate to create the object at</param>
* <param name="rotationX">The x rotation of the object</param>
* <param name="rotationY">The y rotation of the object</param>
* <param name="rotationZ">The z rotation of the object</param>
* <param name="drawDistance">The distance that San Andreas renders objects at. <b><c>0.0</c></b> will
* cause objects to render at their default distances. <b>Usable since 0.3b, limited to <c>300</c> prior
* to 0.3x</b> (optional=<b><c>0.0</c></b>)</param>
* <seealso name="DestroyObject" />
* <seealso name="IsValidObject" />
* <seealso name="CreatePlayerObject" />
* <seealso name="MoveObject" />
* <seealso name="SetObjectPos" />
* <seealso name="SetObjectRot" />
* <seealso name="GetObjectPos" />
* <seealso name="GetObjectRot" />
* <seealso name="AttachObjectToPlayer" />
* <seealso name="SetObjectMaterialText" />
* <seealso name="SetObjectMaterial" />
* <remarks>
* Objects that emit light (lampposts, police lights, bollard lights, neons etc.) that have a greater
* rotation than <b><c>16.26</c></b> degrees (or <b><c>-16.26</c></b>) on either the x or y axis will
* stop shining. This effect also applies to light objects attached to other objects, players and vehicles.
* If a light object is attached to a car and the car is rotated over <b><c>16.26</c></b> degrees
* (like in a rollover), the object will also stop emitting light. This is a GTA:SA issue and is not
* caused by a bug in open.mp.
* </remarks>
* <remarks>In case the light is attached to another object, one fix for this is to set <b>SyncRotation</b>
* to false in <a href="#AttachObjectToObject">AttachObjectToObject</a>. This will ensure the light
* stays at <b><c>0</c></b> rotation. This would only really work for objects that consist ONLY of
* light, so wouldn't work for the police light for example. </remarks>
* <remarks>There is a limit of <a href="https://open.mp/docs/scripting/resources/limits"><b><c>1000</c></b> objects
* (<b><c>MAX_OBJECTS</c></b>)</a>. To circumvent this limit, you can use a
* <a href="https://github.com/samp-incognito/samp-streamer-plugin/tree/open.mp">streamer</a></remarks>
* <returns>The ID of the object that was created, or <b><c>INVALID_OBJECT_ID</c></b> if the object
* limit (<b><c>MAX_OBJECTS</c></b>) was reached.</returns>
*/
native CreateObject(modelid, Float:x, Float:y, Float:z, Float:rotationX, Float:rotationY, Float:rotationZ, Float:drawDistance = 0.0);
/**
* <library>omp_object</library>
* <summary>Attach an object to a vehicle.</summary>
* <param name="objectid">The ID of the object to attach to the vehicle. Note that this is an object
* ID, not a model ID. The object must be CreateObject created first</param>
* <param name="vehicleid">The ID of the vehicle to attach the object to</param>
* <param name="offsetX">The x axis offset from the vehicle to attach the object to</param>
* <param name="offsetY">The y axis offset from the vehicle to attach the object to</param>
* <param name="offsetZ">The z axis offset from the vehicle to attach the object to</param>
* <param name="rotationX">The x rotation offset for the object</param>
* <param name="rotationY">The y rotation offset for the object</param>
* <param name="rotationZ">The z rotation offset for the object</param>
* <seealso name="AttachObjectToPlayer" />
* <seealso name="AttachObjectToObject" />
* <seealso name="AttachPlayerObjectToVehicle" />
* <seealso name="CreateObject" />
* <remarks>The object must be created first.</remarks>
* <remarks>When the vehicle is destroyed or respawned, the attached objects won't be destroyed with
* it; they will remain stationary at the position the vehicle disappeared and be reattached to the
* next vehicle to claim the vehicle ID that the objects were attached to.</remarks>
*/
native bool:AttachObjectToVehicle(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotationX, Float:rotationY, Float:rotationZ);
/**
* <library>omp_object</library>
* <summary>You can use this function to attach objects to other objects. The objects will folow the
* main object.</summary>
* <param name="objectid">The object to attach to another object</param>
* <param name="attachtoid">The object to attach the object to</param>
* <param name="offsetX">The distance between the main object and the object in the x direction</param>
* <param name="offsetY">The distance between the main object and the object in the y direction</param>
* <param name="offsetZ">The distance between the main object and the object in the z direction</param>
* <param name="rotationX">The x rotation between the object and the main object</param>
* <param name="rotationY">The y rotation between the object and the main object</param>
* <param name="rotationZ">The z rotation between the object and the main object</param>
* <param name="syncRotation">If set to <b><c>0</c></b>, objectid's rotation will not change with <paramref
* name="attachtoid" />'s (optional=<b><c>1</c></b>)</param>
* <seealso name="AttachObjectToPlayer" />
* <seealso name="AttachObjectToVehicle" />
* <seealso name="CreateObject" />
* <remarks>
* <ul>
* <li>Both objects need to be created before attempting to attach them.</li>
* it will not be supported by streamers.</li>
* </ul>
* </remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. This means the first object (<paramref name="objectid"
* />) does not exist. There are no internal checks to verify that the second object (<paramref name="attachtoid"
* />) exists.
* </returns>
*/
native bool:AttachObjectToObject(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotationX, Float:rotationY, Float:rotationZ, bool:syncRotation = true);
/**
* <library>omp_object</library>
* <summary>Attach an object to a player.</summary>
* <param name="objectid">The ID of the object to attach to the player</param>
* <param name="playerid">The ID of the player to attach the object to</param>
* <param name="offsetX">The distance between the player and the object in the x direction</param>
* <param name="offsetY">The distance between the player and the object in the y direction</param>
* <param name="offsetZ">The distance between the player and the object in the z direction</param>
* <param name="rotationX">The x rotation between the object and the player</param>
* <param name="rotationY">The y rotation between the object and the player</param>
* <param name="rotationZ">The z rotation between the object and the player</param>
* <seealso name="AttachObjectToVehicle" />
* <seealso name="AttachObjectToObject" />
* <seealso name="AttachPlayerObjectToPlayer" />
* <seealso name="SetPlayerAttachedObject" />
* <seealso name="CreateObject" />
* <returns>This function always returns <b><c>0</c></b>.</returns>
*/
native bool:AttachObjectToPlayer(objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotationX, Float:rotationY, Float:rotationZ);
/**
* <library>omp_object</library>
* <summary>Change the position of an object.</summary>
* <param name="objectid">The ID of the object to set the position of. Returned by <a href="#CreateObject">CreateObject</a></param>
* <param name="x">The x coordinate to position the object at</param>
* <param name="y">The y coordinate to position the object at</param>
* <param name="z">The z coordinate to position the object at</param>
* <seealso name="GetObjectPos" />
* <seealso name="SetObjectRot" />
* <seealso name="GetPlayerObjectPos" />
* <seealso name="CreateObject" />
* <returns>This function always returns <b><c>1</c></b>, even if the object specified does not exist.</returns>
*/
native bool:SetObjectPos(objectid, Float:x, Float:y, Float:z);
/**
* <library>omp_object</library>
* <summary>Get the position of an object.</summary>
* <param name="objectid">The ID of the object to get the position of.</param>
* <param name="x">A variable in which to store the x coordinate, passed by reference</param>
* <param name="y">A variable in which to store the y coordinate, passed by reference</param>
* <param name="z">A variable in which to store the z coordinate, passed by reference</param>
* <seealso name="SetObjectPos" />
* <seealso name="GetObjectRot" />
* <seealso name="SetPlayerObjectPos" />
* <seealso name="CreateObject" />
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The specified object does not exist.
* </returns>
*/
native bool:GetObjectPos(objectid, &Float:x, &Float:y, &Float:z);
/**
* <library>omp_object</library>
* <summary>Set the rotation of an object on the three axes (x, y and z).</summary>
* <param name="objectid">The ID of the object to set the rotation of</param>
* <param name="rotationX">The x rotation</param>
* <param name="rotationY">The y rotation</param>
* <param name="rotationZ">The z rotation</param>
* <seealso name="GetObjectRot" />
* <seealso name="GetObjectPos" />
* <seealso name="CreateObject" />
* <seealso name="SetPlayerObjectRot" />
* <returns>This function always returns <b><c>1</c></b>, even if the object doesn't exist.</returns>
*/
native bool:SetObjectRot(objectid, Float:rotationX, Float:rotationY, Float:rotationZ);
/**
* <library>omp_object</library>
* <summary>Use this function to get the objects current rotation. The rotation is saved by reference
* in three rotationX/rotationY/rotationZ variables.</summary>
* <param name="objectid">The objectid of the object you want to get the rotation from</param>
* <param name="rotationX">The variable to store the x rotation, passed by reference</param>
* <param name="rotationY">The variable to store the y rotation, passed by reference</param>
* <param name="rotationZ">The variable to store the z rotation, passed by reference</param>
* <seealso name="SetObjectRot" />
* <seealso name="SetObjectPos" />
* <seealso name="SetPlayerObjectRot" />
* <seealso name="CreateObject" />
* <returns>The object's rotation is stored in the referenced variables, not in the return value.</returns>
*/
native bool:GetObjectRot(objectid, &Float:rotationX, &Float:rotationY, &Float:rotationZ);
/**
* <library>omp_object</library>
* <summary>Get the model ID of an object.</summary>
* <param name="objectid">The ID of the object to get the model of</param>
* <seealso name="GetPlayerObjectModel" />
* <seealso name="CreateObject" />
* <returns>The model ID of the object. <b><c>-1</c></b> if <paramref name="objectid" /> does not exist.</returns>
*/
native GetObjectModel(objectid);
/**
* <library>omp_object</library>
* <summary>Disable collisions between players' cameras and the specified object.</summary>
* <param name="objectid">The ID of the object to disable camera collisions on</param>
* <seealso name="SetObjectsDefaultCameraCol" />
* <seealso name="SetPlayerObjectNoCameraCol" />
* <remarks>This only works outside the map boundaries (past <b><c>-3000</c></b>/<b><c>3000</c></b>
* units on the x and/or y axis).</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The object specified does not exist.
* </returns>
*/
native bool:SetObjectNoCameraCollision(objectid) = SetObjectNoCameraCol;
/**
* <library>omp_object</library>
* <summary>Disable collisions between players' cameras and the specified object.</summary>
* <param name="objectid">The ID of the object to disable camera collisions on</param>
* <seealso name="SetObjectsDefaultCameraCol" />
* <seealso name="SetPlayerObjectNoCameraCol" />
* <remarks>This only works outside the map boundaries (past <b><c>-3000</c></b>/<b><c>3000</c></b>
* units on the x and/or y axis).</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The object specified does not exist.
* </returns>
*/
native bool:SetObjectNoCameraCol(objectid);
/**
* <library>omp_object</library>
* <summary>Checks if an object with the ID provided exists.</summary>
* <param name="objectid">The ID of the object to check the existence of</param>
* <seealso name="IsValidPlayerObject" />
* <seealso name="CreateObject" />
* <seealso name="DestroyObject" />
* <remarks>This is to check if an object exists, not if a model is valid.</remarks>
* <returns><b><c>1</c></b> if the object exists, <b><c>0</c></b> if not.</returns>
*/
native bool:IsValidObject(objectid);
/**
* <library>omp_object</library>
* <summary>Destroys (removes) an object that was created using <a href="#CreateObject">CreateObject</a>.</summary>
* <param name="objectid">The ID of the object to destroy. Returned by <a href="#CreateObject">CreateObject</a></param>
* <seealso name="CreateObject" />
* <seealso name="IsValidObject" />
* <seealso name="DestroyPlayerObject" />
*/
native bool:DestroyObject(objectid);
/**
* <library>omp_object</library>
* <summary>Move an object to a new position with a set speed. Players/vehicles will 'surf' the object
* as it moves.</summary>
* <param name="objectid">The ID of the object to move</param>
* <param name="targetX">The x coordinate to move the object to</param>
* <param name="targetY">The y coordinate to move the object to</param>
* <param name="targetZ">The z coordinate to move the object to</param>
* <param name="speed">The speed at which to move the object (units per second)</param>
* <param name="rotationX">The FINAL x rotation (optional=<b><c>-1000.0</c></b>)</param>
* <param name="rotationY">The FINAL y rotation (optional=<b><c>-1000.0</c></b>)</param>
* <param name="rotationZ">The FINAL z rotation (optional=<b><c>-1000.0</c></b>)</param>
* <seealso name="OnObjectMoved" />
* <seealso name="IsObjectMoving" />
* <seealso name="StopObject" />
* <seealso name="MovePlayerObject" />
* <seealso name="SetObjectPos" />
* <seealso name="SetObjectRot" />
* <seealso name="CreateObject" />
* <remarks>This function can be used to make objects rotate smoothly. In order to achieve this however,
* the object must also be <b>moved</b>. The specified rotation is the rotation the object will have
* after the movement. Hence the object will not rotate when no movement is applied.</remarks>
* <remarks>To fully understand the above note, you can (but not limited to) increase the z position
* by <b><c>(+0.001</c></b>) and then (<b><c>-0.001</c></b>) after moving it again, as not changing
* the x, y or z will not rotate the object. </remarks>
* <returns>The time it will take for the object to move in milliseconds.</returns>
*/
native bool:MoveObject(objectid, Float:targetX, Float:targetY, Float:targetZ, Float:speed, Float:rotationX = -1000.0, Float:rotationY = -1000.0, Float:rotationZ = -1000.0);
/**
* <library>omp_object</library>
* <summary>Replace the texture of an object with the texture from another model in the game.</summary>
* <param name="objectid">The ID of the object to change the texture of</param>
* <param name="materialIndex">The material index on the object to change (<b><c>0</c></b> to <b><c>15</c></b>)</param>
* <param name="modelid">The modelid on which the replacement texture is located. Use <b><c>0</c></b>
* for alpha. Use <b><c>-1</c></b> to change the material colour without altering the texture</param>
* <param name="textureLibrary">The name of the txd file which contains the replacement texture (use
* <b><c>"none"</c></b> if not required)</param>
* <param name="textureName">The name of the texture to use as the replacement (use <b><c>"none"</c></b>
* if not required)</param>
* <param name="materialColour">The object colour to set, as an integer or hex in <b>ARGB</b> colour
* format. Using <b><c>0</c></b> keeps the existing material colour (optional=<b><c>0</c></b>)</param>
* <seealso name="SetPlayerObjectMaterial" />
* <seealso name="SetObjectMaterialText" />
* <remarks>Vertex lightning of the object will disappear if material colour is changed.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute.
* </returns>
*/
native bool:SetObjectMaterial(objectid, materialIndex, modelid, const textureLibrary[], const textureName[], materialColour = 0);
/**
* <library>omp_object</library>
* <summary>Replace the texture of an object with text.</summary>
* <param name="objectid">The ID of the object to replace the texture of with text</param>
* <param name="text">The text to show on the object. (MAX <b>2048</b> characters). May be optionally formatted</param>
* <param name="materialIndex">The object's material index to replace with text (optional=<b><c>0</c></b>)</param>
* <param name="materialSize">The size of the material (optional=<b><c>OBJECT_MATERIAL_SIZE_256x128</c></b>)</param>
* <param name="fontFace">The font to use (optional=<b><c>"Arial"</c></b>)</param>
* <param name="fontSize">The size of the text (MAX <b>255</b>) (optional=<b><c>24</c></b>)</param>
* <param name="bold">Bold text. Set to <b><c>1</c></b> for bold, <b><c>0</c></b> for not (optional=<b><c>1</c></b>)</param>
* <param name="fontColour">The colour of the text, in <b>ARGB</b> format (optional=<b><c>-1</c></b>)</param>
* <param name="backgroundColour">The background colour, in <b>ARGB</b> format (optional=<b><c>0</c></b>)</param>
* <param name="textAlignment">The alignment of the text (optional=<b><c>OBJECT_MATERIAL_TEXT_ALIGN_LEFT</c></b>)</param>
* <seealso name="SetPlayerObjectMaterialText" />
* <seealso name="SetObjectMaterial" />
* <remarks>Color embedding can be used for multiple colours in the text.</remarks>
* <remarks>
* <b>Alignment:</b><br />
* <ul>
* <li><b><c>OBJECT_MATERIAL_TEXT_ALIGN_LEFT</c></b> 0</li>
* <li><b><c>OBJECT_MATERIAL_TEXT_ALIGN_CENTER</c></b> 1</li>
* <li><b><c>OBJECT_MATERIAL_TEXT_ALIGN_RIGHT</c></b> 2</li>
* </ul>
* </remarks>
* <remarks>
* <b>Sizes:</b><br />
* <ul>
* <li><b><c>OBJECT_MATERIAL_SIZE_32x32</c></b> 10</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_64x32</c></b> 20</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_64x64</c></b> 30</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_128x32</c></b> 40</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_128x64</c></b> 50</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_128x128</c></b> 60</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_256x32</c></b> 70</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_256x64</c></b> 80</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_256x128</c></b> 90</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_256x256</c></b> 100</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_512x64</c></b> 110</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_512x128</c></b> 120</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_512x256</c></b> 130</li>
* <li><b><c>OBJECT_MATERIAL_SIZE_512x512</c></b> 140</li>
* </ul>
* </remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute.
* </returns>
*/
native bool:SetObjectMaterialText(objectid, const text[], materialIndex = 0, OBJECT_MATERIAL_SIZE:materialSize = OBJECT_MATERIAL_SIZE_256x128, const fontFace[] = "Arial", fontSize = 24, bool:bold = true, fontColour = 0xFFFFFFFF, backgroundColour = 0, OBJECT_MATERIAL_TEXT_ALIGN:textAlignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT, OPEN_MP_TAGS:...);
/**
* <library>omp_object</library>
* <summary>Stop a moving object after <a href="#MoveObject">MoveObject</a> has been used.</summary>
* <param name="objectid">The ID of the object to stop moving</param>
* <seealso name="MoveObject" />
* <seealso name="IsObjectMoving" />
* <seealso name="OnObjectMoved" />
* <seealso name="StopPlayerObject" />
*/
native bool:StopObject(objectid);
/**
* <library>omp_object</library>
* <summary>Checks if the given objectid is moving.</summary>
* <param name="objectid">The objectid you want to check if is moving</param>
* <seealso name="MoveObject" />
* <seealso name="StopObject" />
* <seealso name="OnObjectMoved" />
* <seealso name="IsPlayerObjectMoving" />
* <returns><b><c>1</c></b> if the object is moving, <b><c>0</c></b> if not.</returns>
*/
native bool:IsObjectMoving(objectid);
/**
* <library>omp_object</library>
* <summary>Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical
* User Interface).</summary>
* <param name="playerid">The ID of the player that should edit the object</param>
* <param name="objectid">The ID of the object to be edited by the player</param>
* <seealso name="EditPlayerObject" />
* <seealso name="EditAttachedObject" />
* <seealso name="SelectObject" />
* <seealso name="CancelEdit" />
* <remarks>You can move the camera while editing by pressing and holding the <b>spacebar</b> (or <b>W</b>
* in vehicle) and moving your mouse.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully. Success is reported when a non-existent object
* is specified, but nothing will happen.<br />
* <b><c>0</c></b>: The function failed to execute. The player is not connected.
* </returns>
*/
native bool:BeginObjectEditing(playerid, objectid);
/**
* <library>omp_object</library>
* <summary>Allows a player to edit an object (position and rotation) using their mouse on a GUI (Graphical
* User Interface).</summary>
* <param name="playerid">The ID of the player that should edit the object</param>
* <param name="objectid">The ID of the object to be edited by the player</param>
* <seealso name="EditPlayerObject" />
* <seealso name="EditAttachedObject" />
* <seealso name="SelectObject" />
* <seealso name="CancelEdit" />
* <remarks>You can move the camera while editing by pressing and holding the <b>spacebar</b> (or <b>W</b>
* in vehicle) and moving your mouse.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully. Success is reported when a non-existent object
* is specified, but nothing will happen.<br />
* <b><c>0</c></b>: The function failed to execute. The player is not connected.
* </returns>
*/
native bool:EditObject(playerid, objectid) = BeginObjectEditing;
/**
* <library>omp_object</library>
* <summary>Display the cursor and allow the player to select an object. <a href="#OnPlayerSelectObject">OnPlayerSelectObject</a>
* is called when the player selects an object.</summary>
* <param name="playerid">The ID of the player that should be able to select the object</param>
* <seealso name="EditObject" />
* <seealso name="EditPlayerObject" />
* <seealso name="EditAttachedObject" />
* <seealso name="CancelEdit" />
* <seealso name="OnPlayerSelectObject" />
*/
native bool:BeginObjectSelecting(playerid);
/**
* <library>omp_object</library>
* <summary>Display the cursor and allow the player to select an object. <a href="#OnPlayerSelectObject">OnPlayerSelectObject</a>
* is called when the player selects an object.</summary>
* <param name="playerid">The ID of the player that should be able to select the object</param>
* <seealso name="EditObject" />
* <seealso name="EditPlayerObject" />
* <seealso name="EditAttachedObject" />
* <seealso name="CancelEdit" />
* <seealso name="OnPlayerSelectObject" />
*/
native bool:SelectObject(playerid) = BeginObjectSelecting;
/**
* <library>omp_object</library>
* <summary>Cancel object edition mode for a player.</summary>
* <param name="playerid">The ID of the player to cancel edition for</param>
* <seealso name="SelectObject" />
* <seealso name="EditObject" />
* <seealso name="EditPlayerObject" />
* <seealso name="EditAttachedObject" />
*/
native bool:EndObjectEditing(playerid);
/**
* <library>omp_object</library>
* <summary>Cancel object edition mode for a player.</summary>
* <param name="playerid">The ID of the player to cancel edition for</param>
* <seealso name="SelectObject" />
* <seealso name="EditObject" />
* <seealso name="EditPlayerObject" />
* <seealso name="EditAttachedObject" />
*/
native bool:CancelEdit(playerid) = EndObjectEditing;
/**
* <library>omp_object</library>
* <summary></summary>
*/
native Float:GetObjectDrawDistance(objectid);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:SetObjectMoveSpeed(objectid, Float:speed);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native Float:GetObjectMoveSpeed(objectid);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:GetObjectMovingTargetPos(objectid, &Float:targetX, &Float:targetY, &Float:targetZ);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:GetObjectTarget(objectid, &Float:targetX = 0.0, &Float:targetY = 0.0, &Float:targetZ = 0.0) = GetObjectMovingTargetPos;
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:GetObjectMovingTargetRot(objectid, &Float:rotationX, &Float:rotationY, &Float:rotationZ);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:GetObjectAttachedData(objectid, &parentVehicle = 0, &parentObject = 0, &parentPlayer = 0);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:GetObjectAttachedOffset(objectid, &Float:offsetX = 0.0, &Float:offsetY = 0.0, &Float:offsetZ = 0.0, &Float:rotationX = 0.0, &Float:rotationY = 0.0, &Float:rotationZ = 0.0);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:GetObjectSyncRotation(objectid);
/**
* <library>omp_object</library>
* <remarks>This is NOT a boolean return.</remarks>
* <summary>Get the type of material slot usage. 0 - None, 1 - Material, 2 - Text.</summary>
*/
native IsObjectMaterialSlotUsed(objectid, materialIndex);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:GetObjectMaterial(objectid, materialIndex, &modelid, textureLibrary[], textureLibrarySize = sizeof (textureLibrary), textureName[], textureNameSize = sizeof (textureName), &materialColour = 0);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:GetObjectMaterialText(objectid, materialIndex, text[], textSize = sizeof (text), &OBJECT_MATERIAL_SIZE:materialSize, fontFace[], fontFaceSize = sizeof (fontFace), &fontSize = 0, &bool:bold = true, &fontColour = 0xFFFFFFFF, &backgroundColour = 0, &OBJECT_MATERIAL_TEXT_ALIGN:textAlignment = OBJECT_MATERIAL_TEXT_ALIGN_LEFT);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:IsObjectNoCameraCol(objectid);
/**
* <library>omp_object</library>
* <summary></summary>
*/
stock bool:HasObjectCameraCollision(objectid)
{
return !IsObjectNoCameraCol(objectid);
}
/*
native # Per-Player();
native Per-Player(
native ====================(
native
*/
/**
* <library>omp_object</library>
* <summary>Creates an object which will be visible to only one player.</summary>
* <param name="playerid">The ID of the player to create the object for</param>
* <param name="modelid">The model to create</param>
* <param name="x">The x coordinate to create the object at</param>
* <param name="y">The y coordinate to create the object at</param>
* <param name="z">The z coordinate to create the object at</param>
* <param name="rotationX">The x rotation of the object</param>
* <param name="rotationY">The y rotation of the object</param>
* <param name="rotationZ">The z rotation of the object</param>
* <param name="drawDistance">The distance from which objects will appear to players. <b><c>0.0</c></b>
* will cause an object to render at its default distance. Leaving this parameter out will cause objects
* to be rendered at their default distance.</param>
* <seealso name="CreateObject" />
* <seealso name="IsValidPlayerObject" />
* <seealso name="DestroyPlayerObject" />
* <seealso name="MovePlayerObject" />
* <seealso name="StopPlayerObject" />
* <seealso name="SetPlayerObjectPos" />
* <seealso name="SetPlayerObjectRot" />
* <seealso name="GetPlayerObjectPos" />
* <seealso name="GetPlayerObjectRot" />
* <seealso name="AttachPlayerObjectToPlayer" />
* <seealso name="AttachObjectToPlayer" />
* <returns>The ID of the object that was created, or <b><c>INVALID_OBJECT_ID</c></b> if the object
* limit (<b><c>MAX_OBJECTS</c></b>) was reached.</returns>
*/
native CreatePlayerObject(playerid, modelid, Float:x, Float:y, Float:z, Float:rotationX, Float:rotationY, Float:rotationZ, Float:drawDistance = 0.0);
/**
* <library>omp_object</library>
* <summary>Attach a player object to a vehicle.</summary>
* <param name="playerid">The ID of the player the object was created for</param>
* <param name="objectid">The ID of the object to attach to the vehicle</param>
* <param name="vehicleid">The ID of the vehicle to attach the object to</param>
* <param name="offsetX">The x position offset for attachment</param>
* <param name="offsetY">The y position offset for attachment</param>
* <param name="offsetZ">The z position offset for attachment</param>
* <param name="rotationX">The x rotation offset for attachment</param>
* <param name="rotationY">The y rotation offset for attachment</param>
* <param name="rotationZ">The z rotation offset for attachment</param>
* <seealso name="CreatePlayerObject" />
* <seealso name="AttachPlayerObjectToPlayer" />
* <seealso name="AttachObjectToVehicle" />
* <remarks>You need to create the object before attempting to attach it to a vehicle.</remarks>
*/
native bool:AttachPlayerObjectToVehicle(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotationX, Float:rotationY, Float:rotationZ);
/**
* <library>omp_object</library>
* <summary></summary>
*/
native bool:AttachPlayerObjectToObject(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotationX, Float:rotationY, Float:rotationZ, bool:syncRotation = true);
/**
* <library>omp_object</library>
* <summary>The same as AttachObjectToPlayer but for objects which were created for player.</summary>
* <param name="playerid">The ID of the player which is linked with the object</param>
* <param name="objectid">The objectid you want to attach to the player</param>
* <param name="parentid">The ID of the player you want to attach to the object</param>
* <param name="offsetX">The distance between the player and the object in the x direction</param>
* <param name="offsetY">The distance between the player and the object in the y direction</param>
* <param name="offsetZ">The distance between the player and the object in the z direction</param>
* <param name="rotationX">The x rotation</param>
* <param name="rotationY">The y rotation</param>
* <param name="rotationZ">The z rotation</param>
* <seealso name="SetPlayerAttachedObject" />
* <seealso name="AttachPlayerObjectToVehicle" />
* <seealso name="AttachObjectToPlayer" />
* <seealso name="CreatePlayerObject" />
*/
native bool:AttachPlayerObjectToPlayer(playerid, objectid, parentid, Float:offsetX, Float:offsetY, Float:offsetZ, Float:rotationX, Float:rotationY, Float:rotationZ);
/**
* <library>omp_object</library>
* <summary>Sets the position of a player-object to the specified coordinates.</summary>
* <param name="playerid">The ID of the player whose player-object to set the position of</param>
* <param name="objectid">The ID of the player-object to set the position of. Returned by
* <a href="#CreatePlayerObject">CreatePlayerObject</a></param>
* <param name="x">The x coordinate to put the object at</param>
* <param name="y">The y coordinate to put the object at</param>
* <param name="z">The z coordinate to put the object at</param>
* <seealso name="GetPlayerObjectPos" />
* <seealso name="SetPlayerObjectRot" />
* <seealso name="SetObjectPos" />
* <seealso name="CreatePlayerObject" />
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. Player and/or object do not exist.
* </returns>
*/
native bool:SetPlayerObjectPos(playerid, objectid, Float:x, Float:y, Float:z);
/**
* <library>omp_object</library>
* <summary>Get the position of a player object (<a href="#CreatePlayerObject">CreatePlayerObject</a>).</summary>
* <param name="playerid">The ID of the player whose player object to get the position of</param>
* <param name="objectid">The object's ID of which you want the current location</param>
* <param name="x">A float variable in which to store the x coordinate, passed by reference</param>
* <param name="y">A float variable in which to store the y coordinate, passed by reference</param>
* <param name="z">A float variable in which to store the z coordinate, passed by reference</param>
* <seealso name="" />
* <seealso name="SetPlayerObjectPos" />
* <seealso name="GetPlayerObjectRot" />
* <seealso name="GetObjectPos" />
* <seealso name="CreatePlayerObject" />
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The player and/or the object don't exist.<br
* />
* The object's position is stored in the specified variables.
* </returns>
*/
native bool:GetPlayerObjectPos(playerid, objectid, &Float:x, &Float:y, &Float:z);
/**
* <library>omp_object</library>
* <summary>Set the rotation of an object on the x, y and z axis.</summary>
* <param name="playerid">The ID of the player whose player-object to rotate</param>
* <param name="objectid">The ID of the player-object to rotate</param>
* <param name="rotationX">The x rotation to set</param>
* <param name="rotationY">The y rotation to set</param>
* <param name="rotationZ">The z rotation to set</param>
* <seealso name="GetPlayerObjectRot" />
* <seealso name="SetPlayerObjectPos" />
* <seealso name="SetObjectRot" />
* <seealso name="CreatePlayerObject" />
* <remarks>To smoothly rotate an object, see <a href="#MovePlayerObject">MovePlayerObject</a>.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute.
* </returns>
*/
native bool:SetPlayerObjectRot(playerid, objectid, Float:rotationX, Float:rotationY, Float:rotationZ);
/**
* <library>omp_object</library>
* <summary>Use this function to get the object's current rotation. The rotation is saved by reference
* in three rotationX/rotationY/rotationZ variables.</summary>
* <param name="playerid">The player you associated this object to</param>
* <param name="objectid">The objectid of the object you want to get the rotation from</param>
* <param name="rotationX">The variable to store the x rotation, passed by reference</param>
* <param name="rotationY">The variable to store the y rotation, passed by reference</param>
* <param name="rotationZ">The variable to store the z rotation, passed by reference</param>
* <seealso name="SetPlayerObjectRot" />
* <seealso name="GetPlayerObjectPos" />
* <seealso name="GetObjectRot" />
* <seealso name="CreatePlayerObject" />
* <returns>The object's rotation is stored in the specified variables.</returns>
*/
native bool:GetPlayerObjectRot(playerid, objectid, &Float:rotationX, &Float:rotationY, &Float:rotationZ);
/**
* <library>omp_object</library>
* <summary>Retrieve the model ID of a player-object.</summary>
* <param name="playerid">The ID of the player whose player-object to get the model of</param>
* <param name="objectid">The ID of the player-object of which to retrieve the model ID</param>
* <seealso name="GetObjectModel" />
* <seealso name="CreatePlayerObject" />
* <returns>The model ID of the player object. If the player or object don't exist, it will return
* <b><c>-1</c></b> or <b><c>0</c></b> if the player or object does not exist.</returns>
*/
native GetPlayerObjectModel(playerid, objectid);
/**
* <library>omp_object</library>
* <summary>Toggles a player object camera collision.</summary>
* <param name="playerid">The playerid the object belongs to</param>
* <param name="objectid">The ID of the object you want to toggle</param>
* <seealso name="SetObjectNoCameraCol" />
* <seealso name="SetObjectsDefaultCameraCol" />
* <remarks>This only works outside the map boundaries (past <b><c>-3000</c></b>/<b><c>3000</c></b>
* units on the x and/or y axis).</remarks>
* <returns><b><c>1</c></b> regardless of if the object exists or not.</returns>
*/
#if __namemax > 31
native bool:SetPlayerObjectNoCameraCollision(playerid, objectid);
#endif
#if !defined LEGACY_SCRIPTING_API
#if __namemax > 31
#pragma deprecated Use `SetPlayerObjectNoCameraCollision`. To silence this warning define `LEGACY_SCRIPTING_API` or define `SAMP_COMPAT` for general SA-MP API compatibility.
#endif
#endif
native bool:SetPlayerObjectNoCameraCol(playerid, objectid);
/**
* <library>omp_object</library>
* <summary>Checks if the given object ID is valid for the given player.</summary>
* <param name="playerid">The ID of the player whose player-object to validate</param>
* <param name="objectid">The ID of the object to validate</param>
* <seealso name="IsValidObject" />
* <seealso name="CreatePlayerObject" />
* <seealso name="DestroyPlayerObject" />
* <returns><b><c>1</c></b> if the object exists, <b><c>0</c></b> if not.</returns>
*/
native bool:IsValidPlayerObject(playerid, objectid);
/**
* <library>omp_object</library>
* <summary>Destroy a player-object created using <a href="#CreatePlayerObject">CreatePlayerObject</a>.</summary>
* <param name="playerid">The ID of the player whose player-object to destroy</param>
* <param name="objectid">The ID of the player-object to destroy. Returned by <a href="#CreatePlayerObject">CreatePlayerObject</a></param>
* <seealso name="CreatePlayerObject" />
* <seealso name="IsValidPlayerObject" />
* <seealso name="DestroyObject" />
*/
native bool:DestroyPlayerObject(playerid, objectid);
/**
* <library>omp_object</library>
* <summary>Move a player object with a set speed. Also supports rotation. Players/vehicles will surf
* moving objects.</summary>
* <param name="playerid">The ID of the player whose player-object to move</param>
* <param name="objectid">The ID of the object to move</param>
* <param name="targetX">The x coordinate to move the object to</param>
* <param name="targetY">The y coordinate to move the object to</param>
* <param name="targetZ">The z coordinate to move the object to</param>
* <param name="speed">The speed at which to move the object</param>
* <param name="rotationX">The final x rotation (optional=<b><c>-1000.0</c></b>)</param>
* <param name="rotationY">The final y rotation (optional=<b><c>-1000.0</c></b>)</param>
* <param name="rotationZ">The final z rotation (optional=<b><c>-1000.0</c></b>)</param>
* <seealso name="OnPlayerObjectMoved" />
* <seealso name="IsPlayerObjectMoving" />
* <seealso name="StopPlayerObject" />