-
Notifications
You must be signed in to change notification settings - Fork 0
/
a_players.inc
2428 lines (2238 loc) · 158 KB
/
a_players.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
/* SA-MP Player Functions
*
* (c) Copyright 2005-2015, SA-MP Team
*
*/
#if defined _players_included
#endinput
#endif
#define _players_included
#pragma library players
#define SPECIAL_ACTION_NONE 0
#define SPECIAL_ACTION_DUCK 1
#define SPECIAL_ACTION_USEJETPACK 2
#define SPECIAL_ACTION_ENTER_VEHICLE 3
#define SPECIAL_ACTION_EXIT_VEHICLE 4
#define SPECIAL_ACTION_DANCE1 5
#define SPECIAL_ACTION_DANCE2 6
#define SPECIAL_ACTION_DANCE3 7
#define SPECIAL_ACTION_DANCE4 8
#define SPECIAL_ACTION_HANDSUP 10
#define SPECIAL_ACTION_USECELLPHONE 11
#define SPECIAL_ACTION_SITTING 12
#define SPECIAL_ACTION_STOPUSECELLPHONE 13
#define SPECIAL_ACTION_DRINK_BEER 20
#define SPECIAL_ACTION_SMOKE_CIGGY 21
#define SPECIAL_ACTION_DRINK_WINE 22
#define SPECIAL_ACTION_DRINK_SPRUNK 23
#define SPECIAL_ACTION_PISSING 68
#define SPECIAL_ACTION_CUFFED 24
#define SPECIAL_ACTION_CARRY 25
#define FIGHT_STYLE_NORMAL 4
#define FIGHT_STYLE_BOXING 5
#define FIGHT_STYLE_KUNGFU 6
#define FIGHT_STYLE_KNEEHEAD 7
#define FIGHT_STYLE_GRABKICK 15
#define FIGHT_STYLE_ELBOW 16
#define WEAPONSKILL_PISTOL 0
#define WEAPONSKILL_PISTOL_SILENCED 1
#define WEAPONSKILL_DESERT_EAGLE 2
#define WEAPONSKILL_SHOTGUN 3
#define WEAPONSKILL_SAWNOFF_SHOTGUN 4
#define WEAPONSKILL_SPAS12_SHOTGUN 5
#define WEAPONSKILL_MICRO_UZI 6
#define WEAPONSKILL_MP5 7
#define WEAPONSKILL_AK47 8
#define WEAPONSKILL_M4 9
#define WEAPONSKILL_SNIPERRIFLE 10
#define WEAPONSTATE_UNKNOWN -1
#define WEAPONSTATE_NO_BULLETS 0
#define WEAPONSTATE_LAST_BULLET 1
#define WEAPONSTATE_MORE_BULLETS 2
#define WEAPONSTATE_RELOADING 3
// Player
/// <summary>This function can be used to change the spawn information of a specific player. It allows you to automatically set someone's spawn weapons, their team, skin and spawn position, normally used in case of minigames or automatic-spawn systems. This function is more crash-safe then using <a href="#SetPlayerSkin">SetPlayerSkin</a> in <a href="#OnPlayerSpawn">OnPlayerSpawn</a> and/or <a href="#OnPlayerRequestClass">OnPlayerRequestClass</a>, even though this has been fixed in 0.2.</summary>
/// <param name="playerid">The PlayerID of who you want to set the spawn information</param>
/// <param name="team">The Team-ID of the chosen player</param>
/// <param name="skin">The skin which the player will spawn with</param>
/// <param name="x">The X-coordinate of the player's spawn position</param>
/// <param name="y">The Y-coordinate of the player's spawn position</param>
/// <param name="z">The Z-coordinate of the player's spawn position</param>
/// <param name="rotation">The direction in which the player needs to be facing after spawning</param>
/// <param name="weapon1">The first spawn-<a href="http://wiki.sa-mp.com/wiki/Weapons">weapon</a> for the player</param>
/// <param name="weapon1_ammo">The amount of ammunition for the primary spawnweapon</param>
/// <param name="weapon2">The second spawn-<a href="http://wiki.sa-mp.com/wiki/Weapons">weapon</a> for the player</param>
/// <param name="weapon2_ammo">The amount of ammunition for the second spawnweapon</param>
/// <param name="weapon3">The third spawn-<a href="http://wiki.sa-mp.com/wiki/Weapons">weapon</a> for the player</param>
/// <param name="weapon3_ammo">The amount of ammunition for the third spawnweapon</param>
/// <seealso name="SetPlayerSkin"/>
/// <seealso name="SetPlayerTeam"/>
/// <seealso name="SpawnPlayer"/>
native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
/// <summary>(Re)Spawns a player.</summary>
/// <param name="playerid">The ID of the player to spawn</param>
/// <seealso name="SetSpawnInfo"/>
/// <seealso name="AddPlayerClass"/>
/// <seealso name="OnPlayerSpawn"/>
/// <remarks>Kills the player if they are in a vehicle and then they spawn with a bottle in their hand.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player is not connected.
/// </returns>
native SpawnPlayer(playerid);
// Player info
/// <summary>Set a player's position.</summary>
/// <param name="playerid">The ID of the player to set the position of</param>
/// <param name="x">The X coordinate to position the player at</param>
/// <param name="y">The Y coordinate to position the player at</param>
/// <param name="z">The Z coordinate to position the player at</param>
/// <seealso name="SetPlayerPosFindZ"/>
/// <seealso name="SetPlayerFacingAngle"/>
/// <seealso name="GetPlayerPos"/>
/// <seealso name="SetVehiclePos"/>
/// <seealso name="GetVehiclePos"/>
/// <remarks>Using this function on a player in a vehicle will instantly remove them from the vehicle. Useful for quickly ejecting players.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player specified does not exist.
/// </returns>
native SetPlayerPos(playerid, Float:x, Float:y, Float:z);
/// <summary>This sets the players position then adjusts the players z-coordinate to the nearest solid ground under the position.</summary>
/// <param name="playerid">The ID of the player to set the position of</param>
/// <param name="x">The X coordinate to position the player at</param>
/// <param name="y">The X coordinate to position the player at</param>
/// <param name="z">The Z coordinate to position the player at</param>
/// <seealso name="SetPlayerPos"/>
/// <seealso name="OnPlayerClickMap"/>
/// <remarks>This function does not work if the new coordinates are far away from where the player currently is. The Z height will be <b><c>0</c></b>, which will likely put them underground. It is highly recommended that the <a href="http://forum.sa-mp.com/showthread.php?t=275492">MapAndreas plugin</a> be used instead.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player specified does not exist.
/// </returns>
native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z);
/// <summary>Get the position of a player, represented by X, Y and Z coordinates.</summary>
/// <param name="playerid">The ID of the player to get the position of</param>
/// <param name="x">A float variable in which to store the X coordinate in, passed by reference</param>
/// <param name="y">A float variable in which to store the Y coordinate in, passed by reference</param>
/// <param name="z">A float variable in which to store the Z coordinate in, passed by reference</param>
/// <seealso name="SetPlayerPos"/>
/// <seealso name="GetVehiclePos"/>
/// <seealso name="IsPlayerInRangeOfPoint"/>
/// <seealso name="GetPlayerDistanceFromPoint"/>
/// <remarks>This function is known to return unreliable values when used in <a href="#OnPlayerDisconnect">OnPlayerDisconnect</a> and <a href="#OnPlayerRequestClass">OnPlayerRequestClass</a>. This is because the player is not spawned.</remarks>
/// <returns><b><c>true</c></b> on success, <b><c>false</c></b> on failure (i.e. player not connected).</returns>
native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z);
/// <summary>Set a player's facing angle (Z rotation).</summary>
/// <param name="playerid">The ID of the player to set the facing angle of</param>
/// <param name="ang">The angle the player should face</param>
/// <seealso name="GetPlayerFacingAngle"/>
/// <seealso name="SetPlayerPos"/>
/// <remarks>Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do <b>360 - angle</b>.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. The player specified does not exist.
/// </returns>
native SetPlayerFacingAngle(playerid,Float:ang);
/// <summary>Gets the angle a player is facing.</summary>
/// <param name="playerid">The player you want to get the angle of</param>
/// <param name="ang">The Float to store the angle in, passed by reference</param>
/// <seealso name="GetVehicleZAngle"/>
/// <seealso name="SetPlayerFacingAngle"/>
/// <remarks>Angles are reversed in GTA:SA; 90 degrees would be East in the real world, but in GTA:SA 90 degrees is in fact West. North and South are still 0/360 and 180. To convert this, simply do <b>360 - angle</b>.</remarks>
/// <remarks>Angles returned when inside a vehicle is rarely correct. To get the correct facing angle while inside a vehicle, use <a href="#GetVehicleZAngle">GetVehicleZAngle</a>.</remarks>
native GetPlayerFacingAngle(playerid,&Float:ang);
/// <summary>Checks if a player is in range of a point. This native function is faster than the PAWN implementation using distance formula.</summary>
/// <param name="playerid">The ID of the player</param>
/// <param name="range">The furthest distance the player can be from the point to be in range</param>
/// <param name="x">The X coordinate of the point to check the range to</param>
/// <param name="y">The Y coordinate of the point to check the range to</param>
/// <param name="z">The Z coordinate of the point to check the range to</param>
/// <seealso name="GetPlayerDistanceFromPoint"/>
/// <seealso name="GetVehicleDistanceFromPoint"/>
/// <seealso name="GetPlayerPos"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <returns><b><c>1</c></b> if the player is in range, <b><c>0</c></b> if not.</returns>
native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z);
/// <summary>Calculate the distance between a player and a map coordinate.</summary>
/// <param name="playerid">The ID of the player to calculate the distance from</param>
/// <param name="X">The X map coordinate</param>
/// <param name="Y">The Y map coordinate</param>
/// <param name="Z">The Z map coordinate</param>
/// <seealso name="IsPlayerInRangeOfPoint"/>
/// <seealso name="GetVehicleDistanceFromPoint"/>
/// <seealso name="GetPlayerPos"/>
/// <remarks>This function was added in <b>SA-MP 0.3c R3</b> and will not work in earlier versions!</remarks>
/// <returns>The distance between the player and the point as a float.</returns>
native Float:GetPlayerDistanceFromPoint(playerid, Float:X, Float:Y, Float:Z);
/// <summary>Checks if a player is streamed in another player's client.</summary>
/// <param name="playerid">The ID of the player to check is streamed in</param>
/// <param name="forplayerid">The ID of the player to check if playerid is streamed in for</param>
/// <seealso name="IsActorStreamedIn"/>
/// <seealso name="IsVehicleStreamedIn"/>
/// <seealso name="OnPlayerStreamIn"/>
/// <seealso name="OnPlayerStreamOut"/>
/// <seealso name="OnVehicleStreamIn"/>
/// <seealso name="OnVehicleStreamOut"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <remarks>Players aren't streamed in on their own client, so if playerid is the same as forplayerid it will return false!</remarks>
/// <remarks>Players stream out if they are more than <b><c>150</c></b> meters away (see <c>server.cfg</c> - <c>stream_distance</c>)</remarks>
/// <returns><b><c>1</c></b> if the player is streamed in, <b><c>0</c></b> if not.</returns>
native IsPlayerStreamedIn(playerid, forplayerid);
/// <summary>Set a player's interior. A list of currently known interiors and their positions can be found <a href="http://wiki.sa-mp.com/wiki/InteriorIDs">here</a>.</summary>
/// <param name="playerid">The ID of the player to set the interior of</param>
/// <param name="interiorid">The <a href="http://wiki.sa-mp.com/wiki/InteriorIDs">interior ID</a> to set the player in</param>
/// <seealso name="GetPlayerInterior"/>
/// <seealso name="LinkVehicleToInterior"/>
/// <seealso name="OnPlayerInteriorChange"/>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player is not connected.
/// </returns>
native SetPlayerInterior(playerid,interiorid);
/// <summary>Retrieves the player's current interior. A list of currently known interiors with their positions can be found on <a href="http://wiki.sa-mp.com/wiki/InteriorIDs">this</a> page.</summary>
/// <param name="playerid">The player to get the interior ID of</param>
/// <seealso name="SetPlayerInterior"/>
/// <seealso name="GetPlayerVirtualWorld"/>
/// <remarks>Always returns <b><c>0</c></b> for NPCs.</remarks>
/// <returns>The interior ID the player is currently in.</returns>
native GetPlayerInterior(playerid);
/// <summary>Set the health of a player.</summary>
/// <param name="playerid">The ID of the player to set the health of</param>
/// <param name="health">The value to set the player's health to. Max health that can be displayed in the HUD is <b><c>100</c></b>, though higher values are valid</param>
/// <seealso name="GetPlayerHealth"/>
/// <seealso name="GetPlayerArmour"/>
/// <seealso name="SetPlayerArmour"/>
/// <remarks>Health is obtained rounded to integers: set <b><c>50.15</c></b>, but get <b><c>50.0</c></b></remarks>
/// <remarks>If a player's health is set to <b><c>0</c></b> or a minus value, they will die instantly.</remarks>
/// <remarks>If a player's health is below <b><c>10</c></b> or above <b><c>98303</c></b>, their health bar will flash. </remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player specified does not exist.
/// </returns>
native SetPlayerHealth(playerid, Float:health);
/// <summary>The function GetPlayerHealth allows you to retrieve the health of a player. Useful for cheat detection, among other things.</summary>
/// <param name="playerid">The ID of the player</param>
/// <param name="health">Float to store health, passed by reference</param>
/// <seealso name="SetPlayerHealth"/>
/// <seealso name="GetVehicleHealth"/>
/// <seealso name="GetPlayerArmour"/>
/// <remarks>
/// Even though the health can be set to near infinite values on the server side, the individual clients will only report values up to <b><c>255</c></b>. Anything higher will wrap around; <b><c>256</c></b> becomes <b><c>0</c></b>, <b><c>257</c></b> becomes <b><c>1</c></b>, etc.<p/>
/// Health is obtained rounded to integers: set <b><c>50.15</c></b>, but get <b><c>50.0</c></b>
/// </remarks>
/// <returns>
/// <b><c>1</c></b> - success.<p/>
/// <b><c>0</c></b> - failure (i.e. player not connected).<p/>
/// </returns>
native GetPlayerHealth(playerid, &Float:health);
/// <summary>Set a player's armor level.</summary>
/// <param name="playerid">The ID of the player to set the armour of</param>
/// <param name="armour">The amount of armour to set, as a percentage (float). Values larger than <b><c>100</c></b> are valid, but won't be displayed in the HUD's armour bar</param>
/// <seealso name="GetPlayerArmour"/>
/// <seealso name="SetPlayerHealth"/>
/// <seealso name="GetPlayerHealth"/>
/// <remarks>Armour is obtained rounded to integers: set <b><c>50.15</c></b>, but get <b><c>50.0</c></b></remarks>
/// <remarks>The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player specified does not exist.
/// </returns>
native SetPlayerArmour(playerid, Float:armour);
/// <summary>This function stores the armour of a player into a variable.</summary>
/// <param name="playerid">The ID of the player that you want to get the armour of</param>
/// <param name="armour">The float to to store the armour in, passed by reference</param>
/// <seealso name="SetPlayerArmour"/>
/// <seealso name="GetPlayerHealth"/>
/// <seealso name="GetVehicleHealth"/>
/// <remarks>Even though the armour can be set to near infinite values on the server side, the individual clients will only report values up to <b><c>255</c></b>. Anything higher will wrap around; <b><c>256</c></b> becomes <b><c>0</c></b>, <b><c>257</c></b> becomes <b><c>1</c></b>, etc. </remarks>
/// <remarks>Armour is obtained rounded to integers: set <b><c>50.15</c></b>, but get <b><c>50.0</c></b> </remarks>
/// <remarks>The function's name is armour, not armor (Americanized). This is inconsistent with the rest of SA-MP, so remember that.</remarks>
/// <returns>
/// <b><c>1</c></b> - success.<p/>
/// <b><c>0</c></b> - failure (i.e. player not connected).<p/>
/// </returns>
native GetPlayerArmour(playerid, &Float:armour);
/// <summary>Set the ammo of a player's weapon.</summary>
/// <param name="playerid">The ID of the player to set the weapon ammo of</param>
/// <param name="weaponid">The ID of the <a href="http://wiki.sa-mp.com/wiki/Weapons">weapon</a> to set the ammo of.</param>
/// <param name="ammo">The amount of ammo to set</param>
/// <seealso name="GetPlayerAmmo"/>
/// <seealso name="GivePlayerWeapon"/>
/// <seealso name="SetPlayerArmedWeapon"/>
/// <remarks>Set the ammo to <b><c>0</c></b> to remove a weapon from a player's inventory. Note that the weapon will still show up in <a href="#GetPlayerWeaponData">GetPlayerWeaponData</a>, albeit with <b><c>0</c></b> ammo.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully. Success is also returned when the weapon slot specified is invalid (not 0-12).<p/>
/// <b><c>0</c></b>: The function failed to execute. The player isn't connected.<p/>
/// </returns>
native SetPlayerAmmo(playerid, weaponid, ammo);
/// <summary>Gets the amount of ammo in a player's current weapon.</summary>
/// <param name="playerid">The ID of the player whose ammo to get</param>
/// <seealso name="SetPlayerAmmo"/>
/// <seealso name="GetPlayerWeaponData"/>
/// <remarks>The ammo can hold 16-bit values, therefore values over <b><c>32767</c></b> will return erroneous values.</remarks>
/// <returns>The amount of ammo in the player's current weapon.</returns>
native GetPlayerAmmo(playerid);
/// <summary>Check the state of a player's weapon.</summary>
/// <param name="playerid">The ID of the player to obtain the weapon state of</param>
/// <seealso name="GivePlayerWeapon"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <remarks>
/// <b>Weapon states:</b><p/>
/// <ul>
/// <li><b><c>WEAPONSTATE_UNKNOWN</c></b> - unknown (Set when in a vehicle)</li>
/// <li><b><c>WEAPONSTATE_NO_BULLETS</c></b> - The weapon has no remaining ammo</li>
/// <li><b><c>WEAPONSTATE_LAST_BULLET</c></b> - the weapon has one remaining bullet</li>
/// <li><b><c>WEAPONSTATE_MORE_BULLETS</c></b> - the weapon has multiple bullets</li>
/// <li><b><c>WEAPONSTATE_RELOADING</c></b> - the player is reloading their weapon </li>
/// </ul>
/// </remarks>
/// <returns>The state of the player's weapon. <b><c>0</c></b> if player specified does not exist.</returns>
native GetPlayerWeaponState(playerid);
/// <summary>Check who a player is aiming at.</summary>
/// <param name="playerid">The ID of the player to get the target of</param>
/// <seealso name="GetPlayerCameraFrontVector"/>
/// <seealso name="OnPlayerGiveDamage"/>
/// <seealso name="OnPlayerTakeDamage"/>
/// <remarks>This function was added in <b>SA-MP 0.3d</b> and will not work in earlier versions! </remarks>
/// <remarks>Does not work for joypads/controllers, and after a certain distance. </remarks>
/// <remarks>Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. </remarks>
/// <returns>The ID of the target player, or <b><c>INVALID_PLAYER_ID</c></b> if none.</returns>
native GetPlayerTargetPlayer(playerid);
/// <summary>Gets id of an actor which is aimed by certain player.</summary>
/// <param name="playerid">The ID of the player to get the target of</param>
/// <seealso name="GetPlayerCameraTargetActor"/>
/// <seealso name="GetPlayerCameraFrontVector"/>
/// <seealso name="OnPlayerGiveDamageActor"/>
/// <remarks>This function was added in <b>SA-MP 0.3.7</b> and will not work in earlier versions!</remarks>
/// <remarks>Does not work for joypads/controllers, and after a certain distance. </remarks>
/// <remarks>Does not work for the sniper rifle, as it doesn't lock on to anything and as such can't and won't return a player. </remarks>
/// <returns>The ID of the targeted actor, or <b><c>INVALID_ACTOR_ID</c></b> if none.</returns>
native GetPlayerTargetActor(playerid);
/// <summary>Set the team of a player.</summary>
/// <param name="playerid">The ID of the player you want to set the team of</param>
/// <param name="teamid">The team to put the player in. Use <b><c>NO_TEAM</c></b> to remove the player from any team</param>
/// <seealso name="GetPlayerTeam"/>
/// <seealso name="SetTeamCount"/>
/// <seealso name="EnableVehicleFriendlyFire"/>
/// <remarks>Players can not damage/kill players on the same team unless they use a knife to slit their throat. As of <b>SA-MP 0.3x</b>, players are also unable to damage vehicles driven by a player from the same team. This can be enabled with <a href="#EnableVehicleFriendlyFire">EnableVehicleFriendlyFire</a>.</remarks>
/// <remarks><b><c>255</c></b> (or <b><c>NO_TEAM</c></b>) is the default team to be able to shoot other players, not <b><c>0</c></b>.</remarks>
native SetPlayerTeam(playerid, teamid);
/// <summary>Get the ID of the team the player is on.</summary>
/// <param name="playerid">The ID of the player to get the team of</param>
/// <seealso name="SetPlayerTeam"/>
/// <seealso name="SetTeamCount"/>
/// <returns>
/// <b><c>0-254</c></b>: The player's team. (<b><c>0</c></b> is a valid team).<p/>
/// <b><c>255</c></b>: Defined as <b><c>NO_TEAM</c></b>. The player is not on any team.<p/>
/// <b><c>-1</c></b>: The function failed to execute. Player is not connected.
/// </returns>
native GetPlayerTeam(playerid);
/// <summary>Set a player's score. Players' scores are shown in the scoreboard (shown by holding the TAB key).</summary>
/// <param name="playerid">The ID of the player to set the score of</param>
/// <param name="score">The value to set the player's score to</param>
/// <seealso name="GetPlayerScore"/>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player specified does not exist.
/// </returns>
native SetPlayerScore(playerid,score);
/// <summary>This function returns a player's score as it was set using <a href="#SetPlayerScore">SetPlayerScore</a>.</summary>
/// <param name="playerid">The player to get the score of</param>
/// <seealso name="SetPlayerScore"/>
/// <seealso name="GetPlayerPing"/>
/// <returns>The player's score.</returns>
native GetPlayerScore(playerid);
/// <summary>
/// Checks the player's level of drunkenness. If the level is less than <b><c>2000</c></b>, the player is sober. The player's level of drunkness goes down slowly automatically (1 level per frame) but will always reach <b><c>2000</c></b> at the end (in <b>0.3b</b> it will stop at <b><c>0</c></b>).
/// The higher drunkenness levels affect the player's camera, and the car driving handling. The level of drunkenness increases when the player drinks from a bottle (You can use <a href="#SetPlayerSpecialAction">SetPlayerSpecialAction</a> to give them bottles).
/// </summary>
/// <param name="playerid">The player you want to check the drunkenness level of</param>
/// <seealso name="SetPlayerDrunkLevel"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <returns>An integer with the level of drunkenness of the player.</returns>
native GetPlayerDrunkLevel(playerid);
/// <summary>Sets the drunk level of a player which makes the player's camera sway and vehicles hard to control.</summary>
/// <param name="playerid">The ID of the player to set the drunkenness of</param>
/// <param name="level">The level of drunkenness to set</param>
/// <seealso name="GetPlayerDrunkLevel"/>
/// <remarks>
/// Players' drunk level will automatically decrease over time, based on their FPS (players with <b><c>50</c></b> FPS will lose <b><c>50</c></b> 'levels' per second. This is useful for determining a player's FPS!).<p/>
/// In <b>0.3a</b> the drunk level will decrement and stop at <b><c>2000</c></b>. In <b>0.3b+</b> the drunk level decrements to <b><c>0</c></b>)<p/>
/// Levels over <b><c>2000</c></b> make the player drunk (camera swaying and vehicles difficult to control).<p/>
/// Max drunk level is <b><c>50000</c></b>.<p/>
/// While the drunk level is above <b><c>5000</c></b>, the player's HUD (radar etc.) will be hidden.
/// </remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player is not connected.
/// </returns>
native SetPlayerDrunkLevel(playerid, level);
/// <summary>Set the colour of a player's nametag and marker (radar blip).</summary>
/// <param name="playerid">The ID of the player whose color to set</param>
/// <param name="color">The color to set. Supports alpha values (<b>RGBA</b>)</param>
/// <seealso name="SetPlayerMarkerForPlayer"/>
/// <seealso name="GetPlayerColor"/>
/// <seealso name="ChangeVehicleColor"/>
/// <remarks>This function will change player's color for everyone, even if player's color was changed with <a href="#SetPlayerMarkerForPlayer">SetPlayerMarkerForPlayer</a> for any other player. </remarks>
/// <remarks>If used under <a href="#OnPlayerConnect">OnPlayerConnect</a>, the affecting player will not see the color in the TAB menu. </remarks>
native SetPlayerColor(playerid,color);
/// <summary>Gets the color of the player's name and radar marker. Only works after <a href="#SetPlayerColor">SetPlayerColor</a>.</summary>
/// <param name="playerid">The ID of the player to get the color of</param>
/// <seealso name="SetPlayerColor"/>
/// <seealso name="ChangeVehicleColor"/>
/// <remarks>GetPlayerColor will return <b><c>0</c></b> unless <a href="#SetPlayerColor">SetPlayerColor</a> has been used first.</remarks>
/// <returns>The player's color. <b><c>0</c></b> if no color set or player not connected.</returns>
native GetPlayerColor(playerid);
/// <summary>Set the skin of a player. A player's skin is their character model.</summary>
/// <param name="playerid">The ID of the player to set the skin of</param>
/// <param name="skinid">The <a href="http://wiki.sa-mp.com/wiki/Skins">skin</a> the player should use</param>
/// <seealso name="GetPlayerSkin"/>
/// <seealso name="SetSpawnInfo"/>
/// <remarks>If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using <a href="#TogglePlayerControllable">TogglePlayerControllable</a>. Players can be detected as being crouched through <a href="#GetPlayerSpecialAction">GetPlayerSpecialAction</a> (<b><c>SPECIAL_ACTION_DUCK</c></b>).</remarks>
/// <remarks>Setting a player's skin when he is dead may crash players around him.</remarks>
/// <remarks>Note that 'success' is reported even when skin ID is invalid (not <b><c>0</c></b>-<b><c>311</c></b>, or <b><c>74</c></b>), but the skin will be set to ID <b><c>0</c></b> (CJ).</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player specified does not exist.<p/>
/// </returns>
native SetPlayerSkin(playerid, skinid);
/// <summary>Returns the class of the players skin.</summary>
/// <param name="playerid">The player you want to get the skin from</param>
/// <seealso name="SetPlayerSkin"/>
/// <remarks>Returns the new skin after <a href="#SetSpawnInfo">SetSpawnInfo</a> is called but before the player actually respawns to get the new skin. </remarks>
/// <remarks>Returns the old skin if the player was spawned through <a href="#SpawnPlayer">SpawnPlayer</a> function. </remarks>
/// <returns>The skin id (<b><c>0</c></b> if invalid).</returns>
native GetPlayerSkin(playerid);
/// <summary>Give a player a weapon with a specified amount of ammo.</summary>
/// <param name="playerid">The ID of the player to give a weapon to</param>
/// <param name="weaponid">The ID of the weapon to give to the player</param>
/// <param name="ammo">The amount of ammo to give to the player</param>
/// <seealso name="SetPlayerArmedWeapon"/>
/// <seealso name="GetPlayerWeapon"/>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player is not connected.<p/>
/// </returns>
native GivePlayerWeapon(playerid, weaponid, ammo);
/// <summary>Removes all weapons from a player.</summary>
/// <param name="playerid">The ID of the player whose weapons to remove</param>
/// <seealso name="GivePlayerWeapon"/>
/// <seealso name="GetPlayerWeapon"/>
/// <remarks>To remove individual weapons from a player, set their ammo to <b><c>0</c></b> using <a href="#SetPlayerAmmo">SetPlayerAmmo</a>.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player specified does not exist.
/// </returns>
native ResetPlayerWeapons(playerid);
/// <summary>Sets which weapon (that a player already has) the player is holding.</summary>
/// <param name="playerid">The ID of the player to arm with a weapon</param>
/// <param name="weaponid">The ID of the weapon that the player should be armed with</param>
/// <seealso name="GivePlayerWeapon"/>
/// <seealso name="GetPlayerWeapon"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <remarks>This function arms a player with a weapon they <b>already have</b>; it does not give them a new weapon. See <a href="#GivePlayerWeapon">GivePlayerWeapon</a>.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully. Success is returned even when the function fails to execute (the player doesn't have the weapon specified, or it is an invalid weapon).<p/>
/// <b><c>0</c></b>: The function failed to execute. The player is not connected.
/// </returns>
native SetPlayerArmedWeapon(playerid, weaponid);
/// <summary>Get the weapon and ammo in a specific player's weapon slot (e.g. the weapon in the 'SMG' slot).</summary>
/// <param name="playerid">The ID of the player whose weapon data to retrieve</param>
/// <param name="slot">The weapon slot to get data for (<b><c>0-12</c></b>)</param>
/// <param name="weapons">A variable in which to store the weapon ID, passed by reference</param>
/// <param name="ammo">A variable in which to store the ammo, passed by reference</param>
/// <seealso name="GetPlayerWeapon"/>
/// <seealso name="GivePlayerWeapon"/>
/// <remarks>Old weapons with no ammo left are still returned.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. The player isn't connected and/or the weapon slot specified is invalid (valid is <b><c>0-12</c></b>).
/// </returns>
native GetPlayerWeaponData(playerid, slot, &weapons, &ammo);
/// <summary>Give money to or take money from a player.</summary>
/// <param name="playerid">The ID of the player to give money to or take money from</param>
/// <param name="money">The amount of money to give the player. Use a minus value to take money</param>
/// <seealso name="ResetPlayerMoney"/>
/// <seealso name="GetPlayerMoney"/>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player is not connected.
/// </returns>
native GivePlayerMoney(playerid,money);
/// <summary>Reset a player's money to $0.</summary>
/// <param name="playerid">The ID of the player to reset the money of</param>
/// <seealso name="GetPlayerMoney"/>
/// <seealso name="GivePlayerMoney"/>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player is not connected.
/// </returns>
native ResetPlayerMoney(playerid);
/// <summary>Sets the name of a player.</summary>
/// <param name="playerid">The ID of the player to set the name of</param>
/// <param name="name">The name to set. Must be 1-24 characters long and only contain valid characters (<b>0-9</b>, <b>a-z</b>, <b>A-Z</b>, <b>[]</b>, <b>()</b>, <b>$</b>, <b>@</b>, <b>.</b>, <b>_</b>, <b>=</b>)</param>
/// <seealso name="GetPlayerName"/>
/// <remarks>Changing the players' name to the same name but with different character cases (e.g. "John" to "JOHN") will not work. </remarks>
/// <remarks>If used in <a href="#OnPlayerConnect">OnPlayerConnect</a>, the new name will <b>not</b> be shown for the connecting player. </remarks>
/// <remarks>Passing a null string as the new name will crash the server. </remarks>
/// <remarks>Player names can be up to 24 characters when using this function, but when joining the server from the SA-MP server browser, players' names must be no more than 20 and less than 3 characters (the server will deny entry). This allows for 4 characters extra when using <a href="#SetPlayerName">SetPlayerName</a>. </remarks>
/// <returns>
/// <b><c>1</c></b> The name was changed successfully.<p/>
/// <b><c>0</c></b> The player already has that name.<p/>
/// <b><c>-1</c></b> The name can not be changed (it's already in use, too long or has invalid characters).
/// </returns>
native SetPlayerName(playerid, const name[]);
/// <summary>Retrieves the amount of money a player has.</summary>
/// <param name="playerid">The ID of the player to get the money of</param>
/// <seealso name="GivePlayerMoney"/>
/// <seealso name="ResetPlayerMoney"/>
/// <returns>The amount of money the player has.</returns>
native GetPlayerMoney(playerid);
/// <summary>Get a player's current state.</summary>
/// <param name="playerid">The ID of the player to get the current state of</param>
/// <seealso name="GetPlayerSpecialAction"/>
/// <seealso name="SetPlayerSpecialAction"/>
/// <seealso name="OnPlayerStateChange"/>
/// <remarks>
/// <b>States:</b><p/>
/// <ul>
/// <li><b><c>PLAYER_STATE_NONE</c></b> - empty (while initializing)</li>
/// <li><b><c>PLAYER_STATE_ONFOOT</c></b> - player is on foot</li>
/// <li><b><c>PLAYER_STATE_DRIVER</c></b> - player is the driver of a vehicle</li>
/// <li><b><c>PLAYER_STATE_PASSENGER</c></b> - player is passenger of a vehicle</li>
/// <li><b><c>PLAYER_STATE_WASTED</c></b> - player is dead or on class selection</li>
/// <li><b><c>PLAYER_STATE_SPAWNED</c></b> - player is spawned</li>
/// <li><b><c>PLAYER_STATE_SPECTATING</c></b> - player is spectating</li>
/// <li><b><c>PLAYER_STATE_EXIT_VEHICLE</c></b> - player exits a vehicle</li>
/// <li><b><c>PLAYER_STATE_ENTER_VEHICLE_DRIVER</c></b> - player enters a vehicle as driver</li>
/// <li><b><c>PLAYER_STATE_ENTER_VEHICLE_PASSENGER</c></b> - player enters a vehicle as passenger </li>
/// </ul>
/// </remarks>
/// <returns>The player's current state as an integer.</returns>
native GetPlayerState(playerid);
/// <summary>Get the specified player's IP address and store it in a string.</summary>
/// <param name="playerid">The ID of the player to get the IP address of</param>
/// <param name="ip">The string to store the player's IP address in, passed by reference</param>
/// <param name="len">The maximum length of the IP address (recommended 16)</param>
/// <seealso name="NetStats_GetIpPort"/>
/// <seealso name="GetPlayerName"/>
/// <seealso name="GetPlayerPing"/>
/// <seealso name="GetPlayerVersion"/>
/// <seealso name="OnIncomingConnection"/>
/// <seealso name="OnPlayerConnect"/>
/// <seealso name="OnPlayerDisconnect"/>
/// <remarks>This function does not work when used in <a href="#OnPlayerDisconnect">OnPlayerDisconnect</a> because the player is already disconnected. It will return an invalid IP (<b><c>255.255.255.255</c></b>). Save players' IPs under <a href="#OnPlayerConnect">OnPlayerConnect</a> if they need to be used under <a href="#OnPlayerDisconnect">OnPlayerDisconnect</a>. </remarks>
/// <returns><b><c>1</c></b> on success and <b><c>0</c></b> on failure.</returns>
native GetPlayerIp(playerid, ip[], len);
/// <summary>Get the ping of a player. The ping measures the amount of time it takes for the server to 'ping' the client and for the client to send the message back.</summary>
/// <param name="playerid">The ID of the player to get the ping of</param>
/// <seealso name="GetPlayerIp"/>
/// <seealso name="GetPlayerName"/>
/// <seealso name="GetPlayerVersion"/>
/// <remarks>Player's ping may be <b><c>65535</c></b> for a while after a player connects</remarks>
/// <returns>The current ping of the player (expressed in milliseconds).</returns>
native GetPlayerPing(playerid);
/// <summary>Returns the ID of the weapon a player is currently holding.</summary>
/// <param name="playerid">The ID of the player to get the currently held weapon of</param>
/// <seealso name="GetPlayerWeaponData"/>
/// <seealso name="GivePlayerWeapon"/>
/// <seealso name="ResetPlayerWeapons"/>
/// <remarks>Prior to version <b>0.3z R1-2</b>, when the player state is <b>PLAYER_STATE_PASSENGER</b> this function returns the weapon held by the player before they entered the vehicle. If a cheat is used to spawn a weapon inside a vehicle, this function will not report it.</remarks>
/// <returns>The ID of the player's current weapon. Returns <b><c>-1</c></b> if the player specified does not exist.</returns>
native GetPlayerWeapon(playerid);
/// <summary>Check which keys a player is pressing.</summary>
/// <param name="playerid">The ID of the player to get the keys of</param>
/// <param name="keys">Bitmask containing the player's key states. <a href="#Appendix_A_Keys">Table of keys</a></param>
/// <param name="updown">Up/down state</param>
/// <param name="leftright">Left/right state</param>
/// <seealso name="OnPlayerKeyStateChange"/>
/// <remarks>Only the FUNCTION of keys can be detected; not actual keys. For example, it is not possible to detect if a player presses <b>SPACE</b>, but you can detect if they press <b>SPRINT</b> (which can be mapped (assigned/binded) to ANY key (but is space by default)). </remarks>
/// <remarks>As of update <b>0.3.7</b>, the keys "A" and "D" are not recognized when in a vehicle. However, keys "W" and "S" can be detected with the "keys" parameter. </remarks>
/// <returns>The keys are stored in the specified variables.</returns>
native GetPlayerKeys(playerid, &keys, &updown, &leftright);
/// <summary>Get a player's name.</summary>
/// <param name="playerid">The ID of the player to get the name of</param>
/// <param name="name">An array into which to store the name, passed by reference</param>
/// <param name="len">The length of the string that should be stored. Recommended to be <b><c>MAX_PLAYER_NAME</c></b></param>
/// <seealso name="SetPlayerName"/>
/// <seealso name="GetPlayerIp"/>
/// <seealso name="GetPlayerPing"/>
/// <seealso name="GetPlayerScore"/>
/// <seealso name="GetPlayerVersion"/>
/// <remarks>A player's name can be up to 24 characters long (as of <b>0.3d R2</b>) by using <a href="#SetPlayerName">SetPlayerName</a>. This is defined in <c>a_samp.inc</c> as <b><c>MAX_PLAYER_NAME</c></b>. However, the client can only join with a nickname between 3 and 20 characters, otherwise the connection will be rejected and the player has to quit to choose a valid name.</remarks>
/// <returns>The length of the player's name. <b><c>0</c></b> if player specified doesn't exist.</returns>
native GetPlayerName(playerid, const name[], len);
/// <summary>Sets the game time for a player. If a player's clock is enabled (<a href="#TogglePlayerClock">TogglePlayerClock</a>) the time displayed by it will update automatically.</summary>
/// <param name="playerid">The ID of the player to set the game time of</param>
/// <param name="hour">Hour to set (0-23)</param>
/// <param name="minute">Minutes to set (0-59)</param>
/// <seealso name="SetWorldTime"/>
/// <seealso name="GetPlayerTime"/>
/// <seealso name="TogglePlayerClock"/>
/// <remarks>Using this function under <a href="#OnPlayerConnect">OnPlayerConnect</a> doesn't work.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. The player specified does not exist.
/// </returns>
native SetPlayerTime(playerid, hour, minute);
/// <summary>Get the player's current game time. Set by <a href="#SetWorldTime">SetWorldTime</a> or <a href="#SetPlayerTime">SetPlayerTime</a>, or by the game automatically if <a href="#TogglePlayerClock">TogglePlayerClock</a> is used.</summary>
/// <param name="playerid">The ID of the player to get the game time of</param>
/// <param name="hour">A variable in which to store the hour, passed by reference</param>
/// <param name="minute">A variable in which to store the minutes, passed by reference</param>
/// <seealso name="SetPlayerTime"/>
/// <seealso name="SetWorldTime"/>
/// <seealso name="TogglePlayerClock"/>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. The player specified does not exist.<p/>
/// </returns>
native GetPlayerTime(playerid, &hour, &minute);
/// <summary>Toggle the in-game clock (top-right corner) for a specific player. When this is enabled, time will progress at 1 minute per second. Weather will also interpolate (slowly change over time) when set using <a href="#SetWeather">SetWeather</a>/<a href="#SetPlayerWeather">SetPlayerWeather</a>.</summary>
/// <param name="playerid">The player whose clock you want to enable/disable</param>
/// <param name="toggle"><b><c>1</c></b> to show and <b><c>0</c></b> to hide. Hidden by default</param>
/// <remarks>Time is not synced with other players! Time can be synced using <a href="#SetPlayerTime">SetPlayerTime</a>.</remarks>
/// <remarks>Time will automatically advance 6 hours when the player dies.</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. The specified player does not exist.
/// </returns>
native TogglePlayerClock(playerid, toggle);
/// <summary>Set a player's weather.</summary>
/// <param name="playerid">The ID of the player whose weather to set</param>
/// <param name="weather">The <a href="http://wiki.sa-mp.com/wiki/WeatherID">weather</a> to set</param>
/// <seealso name="SetWeather"/>
/// <seealso name="SetGravity"/>
/// <remarks>If <a href="#TogglePlayerClock">TogglePlayerClock</a> is enabled, weather will slowly change over time, instead of changing instantly.</remarks>
native SetPlayerWeather(playerid, weather);
/// <summary>Forces a player to go back to class selection.</summary>
/// <param name="playerid">The player to send back to class selection</param>
/// <seealso name="AddPlayerClass"/>
/// <seealso name="SetPlayerSkin"/>
/// <seealso name="GetPlayerSkin"/>
/// <seealso name="OnPlayerRequestClass"/>
/// <remarks>The player will not return to class selection until they re-spawn. This can be achieved with <a href="#TogglePlayerSpectating">TogglePlayerSpectating</a>, as seen in the below example.</remarks>
native ForceClassSelection(playerid);
/// <summary>Set a player's wanted level (6 brown stars under HUD).</summary>
/// <param name="playerid">The ID of the player to set the wanted level of</param>
/// <param name="level">The wanted level to set for the player (0-6)</param>
/// <seealso name="GetPlayerWantedLevel"/>
/// <seealso name="PlayCrimeReportForPlayer"/>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. The player specified does not exist.
/// </returns>
native SetPlayerWantedLevel(playerid, level);
/// <summary>Gets the wanted level of a player.</summary>
/// <param name="playerid">The ID of the player that you want to get the wanted level of</param>
/// <seealso name="SetPlayerWantedLevel"/>
/// <seealso name="PlayCrimeReportForPlayer"/>
/// <returns>The player's wanted level.</returns>
native GetPlayerWantedLevel(playerid);
/// <summary>Set a player's special fighting style. To use in-game, aim and press the 'secondary attack' key (<b>ENTER</b> by default).</summary>
/// <param name="playerid">The ID of player to set the fighting style of</param>
/// <param name="style">The fighting style that should be set</param>
/// <seealso name="GetPlayerFightingStyle"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <remarks>This does not affect normal fist attacks - only special/secondary attacks (aim + press 'secondary attack' key).</remarks>
/// <remarks>
/// <b>Fighting styles:</b><p/>
/// <ul>
/// <li><b><c>FIGHT_STYLE_NORMAL</c></b></li>
/// <li><b><c>FIGHT_STYLE_BOXING</c></b></li>
/// <li><b><c>FIGHT_STYLE_KUNGFU</c></b></li>
/// <li><b><c>FIGHT_STYLE_KNEEHEAD</c></b></li>
/// <li><b><c>FIGHT_STYLE_GRABKICK</c></b></li>
/// <li><b><c>FIGHT_STYLE_ELBOW</c></b></li>
/// </ul>
/// </remarks>
native SetPlayerFightingStyle(playerid, style);
/// <summary>Get the fighting style the player currently using.</summary>
/// <param name="playerid">The ID of the player to get the fighting style of</param>
/// <seealso name="SetPlayerFightingStyle"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <remarks>
/// <b>Fighting styles:</b><p/>
/// <ul>
/// <li><b><c>FIGHT_STYLE_NORMAL</c></b></li>
/// <li><b><c>FIGHT_STYLE_BOXING</c></b></li>
/// <li><b><c>FIGHT_STYLE_KUNGFU</c></b></li>
/// <li><b><c>FIGHT_STYLE_KNEEHEAD</c></b></li>
/// <li><b><c>FIGHT_STYLE_GRABKICK</c></b></li>
/// <li><b><c>FIGHT_STYLE_ELBOW</c></b></li>
/// </ul>
/// </remarks>
/// <returns>The ID of the fighting style of the player.</returns>
native GetPlayerFightingStyle(playerid);
/// <summary>Set a player's velocity on the X, Y and Z axes.</summary>
/// <param name="playerid">The player to apply the speed to</param>
/// <param name="X">The velocity (speed) on the X axis</param>
/// <param name="Y">The velocity (speed) on the Y axis</param>
/// <param name="Z">The velocity (speed) on the Z axis</param>
/// <seealso name="GetPlayerVelocity"/>
/// <seealso name="SetVehicleVelocity"/>
/// <seealso name="GetVehicleVelocity"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. This means the player is not connected.
/// </returns>
native SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z);
/// <summary>Get the velocity (speed) of a player on the X, Y and Z axes.</summary>
/// <param name="playerid">The player to get the speed from</param>
/// <param name="X">A float variable in which to store the velocity on the X axis, passed by reference</param>
/// <param name="Y">A float variable in which to store the velocity on the Y axis, passed by reference</param>
/// <param name="Z">A float variable in which to store the velocity on the Z axis, passed by reference</param>
/// <seealso name="SetPlayerVelocity"/>
/// <seealso name="SetVehicleVelocity"/>
/// <seealso name="GetVehicleVelocity"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
native GetPlayerVelocity( playerid, &Float:X, &Float:Y, &Float:Z );
/// <summary>This function plays a crime report for a player - just like in single-player when CJ commits a crime.</summary>
/// <param name="playerid">The ID of the player that will hear the crime report</param>
/// <param name="suspectid">The ID of the suspect player whom will be described in the crime report</param>
/// <param name="crime">The crime ID, which will be reported as a 10-code (i.e. 10-16 if 16 was passed as the crime)</param>
/// <seealso name="PlayerPlaySound"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <remarks>
/// <b>Crime list:</b><p/>
/// <ul>
/// <li><b><c>3</c></b> 10-71 Advise nature of fire (size, type, contents of building)</li>
/// <li><b><c>4</c></b> 10-47 Emergency road repairs needed</li>
/// <li><b><c>5</c></b> 10-81 Breatherlizer Report</li>
/// <li><b><c>6</c></b> 10-24 Assignment Completed</li>
/// <li><b><c>7</c></b> 10-21 Call () by phone</li>
/// <li><b><c>8</c></b> 10-21 Call () by phone</li>
/// <li><b><c>9</c></b> 10-21 Call () by phone</li>
/// <li><b><c>10</c></b> 10-17 Meet Complainant</li>
/// <li><b><c>11</c></b> 10-81 Breatherlizer Report</li>
/// <li><b><c>12</c></b> 10-91 Pick up prisoner/subject</li>
/// <li><b><c>13</c></b> 10-28 Vehicle registration information</li>
/// <li><b><c>14</c></b> 10-81 Breathalyzer</li>
/// <li><b><c>15</c></b> 10-28 Vehicle registration information</li>
/// <li><b><c>16</c></b> 10-91 Pick up prisoner/subject</li>
/// <li><b><c>17</c></b> 10-34 Riot</li>
/// <li><b><c>18</c></b> 10-37 (Investigate) suspicious vehicle</li>
/// <li><b><c>19</c></b> 10-81 Breathalyzer</li>
/// <li><b><c>21</c></b> 10-7 Out of service</li>
/// <li><b><c>22</c></b> 10-7 Out of service </li>
/// </ul>
/// </remarks>
native PlayCrimeReportForPlayer(playerid, suspectid, crime);
/// <summary>Play an 'audio stream' for a player. Normal audio files also work (e.g. MP3).</summary>
/// <param name="playerid">The ID of the player to play the audio for</param>
/// <param name="url">The url to play. Valid formats are mp3 and ogg/vorbis. A link to a .pls (playlist) file will play that playlist</param>
/// <param name="posX">The X position at which to play the audio. Has no effect unless usepos is set to 1 (optional=<b><c>0.0</c></b>)</param>
/// <param name="posY">The Y position at which to play the audio. Has no effect unless usepos is set to 1 (optional=<b><c>0.0</c></b>)</param>
/// <param name="posZ">The Z position at which to play the audio. Has no effect unless usepos is set to 1 (optional=<b><c>0.0</c></b>)</param>
/// <param name="distance">The distance over which the audio will be heard. Has no effect unless usepos is set to 1 (optional=<b><c>50.0</c></b>)</param>
/// <param name="usepos">Use the positions and distance specified. (optional=<b><c>0</c></b>)</param>
/// <seealso name="StopAudioStreamForPlayer"/>
/// <seealso name="PlayerPlaySound"/>
/// <remarks>This function was added in <b>SA-MP 0.3d</b> and will not work in earlier versions!</remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. The player specified does not exist.
/// </returns>
native PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
/// <summary>Stops the current audio stream for a player.</summary>
/// <param name="playerid">The player you want to stop the audio stream for</param>
/// <seealso name="PlayAudioStreamForPlayer"/>
/// <seealso name="PlayerPlaySound"/>
/// <remarks>This function was added in <b>SA-MP 0.3d</b> and will not work in earlier versions!</remarks>
native StopAudioStreamForPlayer(playerid);
/// <summary>Loads or unloads an interior script for a player (for example the ammunation menu).</summary>
/// <param name="playerid">The ID of the player to load the interior script for</param>
/// <param name="shopname">The shop script to load. Leave blank ("") to unload scripts</param>
/// <seealso name="DisableInteriorEnterExits"/>
/// <seealso name="SetPlayerInterior"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <remarks>This function does not support casino scripts.</remarks>
/// <remarks>
/// <b>Shop names:</b><p/>
/// <ul>
/// <li><b><c>"FDPIZA"</c></b> Pizza Stack</li>
/// <li><b><c>"FDBURG"</c></b> Burger Shot</li>
/// <li><b><c>"FDCHICK"</c></b>Cluckin' Bell</li>
/// <li><b><c>"AMMUN1"</c></b> Ammunation 1</li>
/// <li><b><c>"AMMUN2"</c></b> Ammunation 2</li>
/// <li><b><c>"AMMUN3"</c></b> Ammunation 3</li>
/// <li><b><c>"AMMUN4"</c></b> Ammunation 4</li>
/// <li><b><c>"AMMUN5"</c></b> Ammunation 5</li>
/// </ul>
/// </remarks>
native SetPlayerShopName(playerid, shopname[]);
/// <summary>Set the skill level of a certain weapon type for a player.</summary>
/// <param name="playerid">The ID of the player to set the weapon skill of</param>
/// <param name="skill">The weapon to set the skill of</param>
/// <param name="level">The skill level to set for that weapon, ranging from <b><c>0</c></b> to <b><c>999</c></b>. A level out of range will max it out</param>
/// <seealso name="SetPlayerArmedWeapon"/>
/// <seealso name="GivePlayerWeapon"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <remarks>
/// <b>Weapon skills:</b><p/>
/// <ul>
/// <li><b><c>WEAPONSKILL_PISTOL(0)</c></b></li>
/// <li><b><c>WEAPONSKILL_PISTOL_SILENCED(1)</c></b></li>
/// <li><b><c>WEAPONSKILL_DESERT_EAGLE(2)</c></b></li>
/// <li><b><c>WEAPONSKILL_SHOTGUN(3)</c></b></li>
/// <li><b><c>WEAPONSKILL_SAWNOFF_SHOTGUN(4)</c></b></li>
/// <li><b><c>WEAPONSKILL_SPAS12_SHOTGUN(5)</c></b></li>
/// <li><b><c>WEAPONSKILL_MICRO_UZI(6)</c></b></li>
/// <li><b><c>WEAPONSKILL_MP5(7)</c></b></li>
/// <li><b><c>WEAPONSKILL_AK47(8)</c></b></li>
/// <li><b><c>WEAPONSKILL_M4(9)</c></b></li>
/// <li><b><c>WEAPONSKILL_SNIPERRIFLE(10)</c></b></li>
/// </ul>
/// </remarks>
native SetPlayerSkillLevel(playerid, skill, level);
/// <summary>Get the ID of the vehicle that the player is surfing (stuck to the roof of).</summary>
/// <param name="playerid">The ID of the player you want to know the surfing vehicle ID of</param>
/// <seealso name="GetPlayerVehicleID"/>
/// <seealso name="GetPlayerVehicleSeat"/>
/// <remarks>This function was added in <b>SA-MP 0.3a</b> and will not work in earlier versions!</remarks>
/// <returns>The ID of the vehicle that the player is surfing. If they are not surfing a vehicle or the vehicle they are surfing has no driver, <b><c>INVALID_VEHICLE_ID</c></b>. If the player specified is not connected, <b><c>INVALID_VEHICLE_ID</c></b> also.</returns>
native GetPlayerSurfingVehicleID(playerid);
/// <summary>Returns the ID of the object the player is surfing on.</summary>
/// <param name="playerid">The ID of the player surfing the object</param>
/// <remarks>This function was added in <b>SA-MP 0.3c R3</b> and will not work in earlier versions!</remarks>
/// <returns>The ID of the <b>moving</b> object the player is surfing. If the player isn't surfing a <b>moving</b> object, it will return <b><c>INVALID_OBJECT_ID</c></b>.</returns>
native GetPlayerSurfingObjectID(playerid);
/// <summary>Removes a standard San Andreas model for a single player within a specified range.</summary>
/// <param name="playerid">The ID of the player to remove the objects for</param>
/// <param name="modelid">The model to remove</param>
/// <param name="fX">The X coordinate around which the objects will be removed</param>
/// <param name="fY">The Y coordinate around which the objects will be removed</param>
/// <param name="fZ">The Z coordinate around which the objects will be removed</param>
/// <param name="fRadius">The radius around the specified point to remove objects with the specified model</param>
/// <seealso name="DestroyObject"/>
/// <seealso name="DestroyPlayerObject"/>
/// <remarks>This function was added in <b>SA-MP 0.3d</b> and will not work in earlier versions!</remarks>
/// <remarks>There appears to be a limit of around <b><c>1000</c></b> lines/objects. There is no workaround. </remarks>
/// <remarks>When removing the same object for a player, they will crash. Commonly, players crash when reconnecting to the server because the server removes buildings on <a href="#OnPlayerConnect">OnPlayerConnect</a>. </remarks>
/// <remarks>In <b>SA-MP 0.3.7</b> you can use <b><c>-1</c></b> for the modelid to remove all objects within the specified radius.</remarks>
native RemoveBuildingForPlayer(playerid, modelid, Float:fX, Float:fY, Float:fZ, Float:fRadius);
/// <summary>Retrieves the start and end (hit) position of the last bullet a player fired.</summary>
/// <param name="playerid">The ID of the player to get the last bullet shot information of</param>
/// <param name="fOriginX">A float variable in which to save the X coordinate of where the bullet originated from</param>
/// <param name="fOriginY">A float variable in which to save the Y coordinate of where the bullet originated from</param>
/// <param name="fOriginZ">A float variable in which to save the Z coordinate of where the bullet originated from</param>
/// <param name="fHitPosX">A float variable in which to save the X coordinate of where the bullet hit</param>
/// <param name="fHitPosY">A float variable in which to save the Y coordinate of where the bullet hit</param>
/// <param name="fHitPosZ">A float variable in which to save the Z coordinate of where the bullet hit</param>
/// <seealso name="GetPlayerWeaponData"/>
/// <seealso name="GetPlayerWeapon"/>
/// <seealso name="VectorSize"/>
/// <seealso name="OnPlayerWeaponShot"/>
/// <remarks>This function was added in <b>SA-MP 0.3z</b> and will not work in earlier versions!</remarks>
/// <remarks>This function will only work when <a href="http://wiki.sa-mp.com/wiki/Lag_Compensation">lag compensation</a> is <b>enabled</b>. </remarks>
/// <remarks>If the player hit nothing, the hit positions will be <b><c>0</c></b>. This means you can't currently calculate how far a bullet travels through open air. </remarks>
/// <returns>
/// <b><c>1</c></b>: The function executed successfully.<p/>
/// <b><c>0</c></b>: The function failed to execute. The player specified does not exist.<p/>
/// </returns>
native GetPlayerLastShotVectors(playerid, &Float:fOriginX, &Float:fOriginY, &Float:fOriginZ, &Float:fHitPosX, &Float:fHitPosY, &Float:fHitPosZ);
// Attached to bone objects
#define MAX_PLAYER_ATTACHED_OBJECTS 10 // This is the number of attached indexes available ie 10 = 0-9
/// <summary>Attach an object to a specific bone on a player.</summary>
/// <param name="playerid">The ID of the player to attach the object to</param>
/// <param name="index">The index (slot) to assign the object to (0-9 since 0.3d, 0-4 in previous versions)</param>
/// <param name="modelid">The <a href="http://wiki.sa-mp.com/wiki/Objects">model</a> to attach</param>
/// <param name="bone">The bone to attach the object to</param>
/// <param name="fOffsetX">X axis offset for the object position (optional=<b><c>0.0</c></b>)</param>
/// <param name="fOffsetY">Y axis offset for the object position (optional=<b><c>0.0</c></b>)</param>
/// <param name="fOffsetZ">Z axis offset for the object position (optional=<b><c>0.0</c></b>)</param>
/// <param name="fRotX">X axis rotation of the object (optional=<b><c>0.0</c></b>)</param>
/// <param name="fRotY">Y axis rotation of the object (optional=<b><c>0.0</c></b>)</param>
/// <param name="fRotZ">Z axis rotation of the object (optional=<b><c>0.0</c></b>)</param>
/// <param name="fScaleX">X axis scale of the object (optional=<b><c>1.0</c></b>)</param>
/// <param name="fScaleY">Y axis scale of the object (optional=<b><c>1.0</c></b>)</param>
/// <param name="fScaleZ">Z axis scale of the object (optional=<b><c>1.0</c></b>)</param>
/// <param name="materialcolor1">The first object color to set <b>ARGB</b> (optional=<b><c>0</c></b>)</param>
/// <param name="materialcolor2">The second object color to set <b>ARGB</b> (optional=<b><c>0</c></b>)</param>
/// <seealso name="RemovePlayerAttachedObject"/>
/// <seealso name="IsPlayerAttachedObjectSlotUsed"/>
/// <seealso name="EditAttachedObject"/>
/// <remarks>This function was added in <b>SA-MP 0.3c</b> and will not work in earlier versions!</remarks>
/// <remarks>In version <b>0.3d</b> and onwards, <b><c>10</c></b> objects can be attached to a single player (index <b><c>0</c></b>-<b><c>9</c></b>). In earlier versions, the limit is <b><c>5</c></b> (index <b><c>0</c></b>-<b><c>4</c></b>).</remarks>
/// <remarks>This function is separate from the <a href="#CreateObject">CreateObject</a> / <a href="#CreatePlayerObject">CreatePlayerObject</a> pools.</remarks>
/// <remarks>
/// <b>Bone IDs:</b><p/>
/// <ul>
/// <li><b><c>1</c></b> - spine</li>
/// <li><b><c>2</c></b> - head</li>
/// <li><b><c>3</c></b> - left upper arm</li>
/// <li><b><c>4</c></b> - right upper arm</li>
/// <li><b><c>5</c></b> - left hand</li>
/// <li><b><c>6</c></b> - right hand</li>
/// <li><b><c>7</c></b> - left thigh</li>
/// <li><b><c>8</c></b> - right thigh</li>
/// <li><b><c>9</c></b> - left foot</li>
/// <li><b><c>10</c></b> - right foot</li>
/// <li><b><c>11</c></b> - right calf</li>
/// <li><b><c>12</c></b> - left calf</li>
/// <li><b><c>13</c></b> - left forearm</li>
/// <li><b><c>14</c></b> - right forearm</li>
/// <li><b><c>15</c></b> - left clavicle (shoulder)</li>
/// <li><b><c>16</c></b> - right clavicle (shoulder)</li>
/// <li><b><c>17</c></b> - neck</li>
/// <li><b><c>18</c></b> - jaw </li>
/// </ul>
/// </remarks>
/// <returns><b><c>1</c></b> on success, <b><c>0</c></b> on failure.</returns>
native SetPlayerAttachedObject(playerid, index, modelid, bone, Float:fOffsetX = 0.0, Float:fOffsetY = 0.0, Float:fOffsetZ = 0.0, Float:fRotX = 0.0, Float:fRotY = 0.0, Float:fRotZ = 0.0, Float:fScaleX = 1.0, Float:fScaleY = 1.0, Float:fScaleZ = 1.0, materialcolor1 = 0, materialcolor2 = 0);
/// <summary>Remove an attached object from a player.</summary>
/// <param name="playerid">The ID of the player to remove the object from</param>
/// <param name="index">The index of the object to remove (set with <a href="#SetPlayerAttachedObject">SetPlayerAttachedObject</a>)</param>
/// <seealso name="SetPlayerAttachedObject"/>
/// <seealso name="IsPlayerAttachedObjectSlotUsed"/>
/// <remarks>This function was added in <b>SA-MP 0.3c</b> and will not work in earlier versions!</remarks>
/// <returns><b><c>1</c></b> on success, <b><c>0</c></b> on failure.</returns>
native RemovePlayerAttachedObject(playerid, index);
/// <summary>Check if a player has an object attached in the specified index (slot).</summary>
/// <param name="playerid">The ID of the player to check</param>
/// <param name="index">The index (slot) to check</param>
/// <seealso name="SetPlayerAttachedObject"/>
/// <seealso name="RemovePlayerAttachedObject"/>
/// <remarks>This function was added in <b>SA-MP 0.3c</b> and will not work in earlier versions!</remarks>
/// <returns><b><c>1</c></b> if used, <b><c>0</c></b> if not.</returns>
native IsPlayerAttachedObjectSlotUsed(playerid, index);
/// <summary>Enter edition mode for an attached object.</summary>
/// <param name="playerid">The ID of the player to enter in to edition mode</param>
/// <param name="index">The index (slot) of the attached object to edit</param>
/// <seealso name="SetPlayerAttachedObject"/>
/// <seealso name="RemovePlayerAttachedObject"/>
/// <seealso name="IsPlayerAttachedObjectSlotUsed"/>
/// <seealso name="EditObject"/>
/// <seealso name="EditPlayerObject"/>
/// <seealso name="SelectObject"/>
/// <seealso name="CancelEdit"/>
/// <seealso name="OnPlayerEditAttachedObject"/>
/// <remarks>This function was added in <b>SA-MP 0.3e</b> and will not work in earlier versions!</remarks>
/// <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>
/// <remarks>
/// There are 7 clickable buttons in edition mode.<p/>
/// The three single icons that have X/Y/Z on them can be dragged to edit position/rotation/scale.<p/>
/// The four buttons in a row are to select the edition mode and save edition: [Move] [Rotate] [Scale] [Save].<p/>
/// Clicking save will call <a href="#OnPlayerEditAttachedObject">OnPlayerEditAttachedObject</a>.
/// </remarks>
/// <remarks>Players will be able to scale objects up to a very large or negative value size. Limits should be put in place using <a href="#OnPlayerEditAttachedObject">OnPlayerEditAttachedObject</a> to abort the edit.</remarks>
/// <returns><b><c>1</c></b> on success and <b><c>0</c></b> on failure.</returns>
native EditAttachedObject(playerid, index);