File size: 8,199 Bytes
72629ed | 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 | #if defined _INC_a_npc
#endinput
#endif
#if defined _INC_a_samp
#error Include `<a_samp>` or `<a_npc>`, not both.
#endif
#define _INC_a_npc
#define _samp_included
#define SAMP_CONST_CORRECT
#pragma tabsize 4
#if !defined MAX_PLAYER_NAME
#define MAX_PLAYER_NAME (24)
#endif
#if !defined MAX_PLAYERS
#define MAX_PLAYERS (1000)
#endif
#if !defined MAX_VEHICLES
#define MAX_VEHICLES (2000)
#endif
#if !defined MAX_OBJECTS
#define MAX_OBJECTS (2000)
#endif
#if !defined MAX_GANG_ZONES
#define MAX_GANG_ZONES (1024)
#endif
#if !defined MAX_TEXT_DRAWS
#define MAX_TEXT_DRAWS (Text:2048)
#endif
#if !defined MAX_MENUS
#define MAX_MENUS (Menu:128)
#endif
#define NO_TEAM (255)
#define INVALID_PLAYER_ID (0xFFFF)
#define INVALID_VEHICLE_ID (0xFFFF)
#define INVALID_OBJECT_ID (0xFFFF)
#define INVALID_MENU (Menu:0xFF)
#define INVALID_TEXT_DRAW (Text:0xFFFF)
#define INVALID_GANG_ZONE (-1)
#define PLAYER_STATE_NONE (0)
#define PLAYER_STATE_ONFOOT (1)
#define PLAYER_STATE_DRIVER (2)
#define PLAYER_STATE_PASSENGER (3)
#define PLAYER_STATE_WASTED (7)
#define PLAYER_STATE_SPAWNED (8)
#define PLAYER_STATE_SPECTATING (9)
#define WEAPON_BRASSKNUCKLE (1)
#define WEAPON_GOLFCLUB (2)
#define WEAPON_NITESTICK (3)
#define WEAPON_KNIFE (4)
#define WEAPON_BAT (5)
#define WEAPON_SHOVEL (6)
#define WEAPON_POOLSTICK (7)
#define WEAPON_KATANA (8)
#define WEAPON_CHAINSAW (9)
#define WEAPON_DILDO (10)
#define WEAPON_DILDO2 (11)
#define WEAPON_VIBRATOR (12)
#define WEAPON_VIBRATOR2 (13)
#define WEAPON_FLOWER (14)
#define WEAPON_CANE (15)
#define WEAPON_GRENADE (16)
#define WEAPON_TEARGAS (17)
#define WEAPON_MOLTOV (18)
#define WEAPON_COLT45 (22)
#define WEAPON_SILENCED (23)
#define WEAPON_DEAGLE (24)
#define WEAPON_SHOTGUN (25)
#define WEAPON_SAWEDOFF (26)
#define WEAPON_SHOTGSPA (27)
#define WEAPON_UZI (28)
#define WEAPON_MP5 (29)
#define WEAPON_AK47 (30)
#define WEAPON_M4 (31)
#define WEAPON_TEC9 (32)
#define WEAPON_RIFLE (33)
#define WEAPON_SNIPER (34)
#define WEAPON_ROCKETLAUNCHER (35)
#define WEAPON_HEATSEEKER (36)
#define WEAPON_FLAMETHROWER (37)
#define WEAPON_MINIGUN (38)
#define WEAPON_SATCHEL (39)
#define WEAPON_BOMB (40)
#define WEAPON_SPRAYCAN (41)
#define WEAPON_FIREEXTINGUISHER (42)
#define WEAPON_CAMERA (43)
#define WEAPON_PARACHUTE (46)
#define WEAPON_VEHICLE (49)
#define WEAPON_DROWN (53)
#define WEAPON_COLLISION (54)
#define KEY_ACTION (1)
#define KEY_CROUCH (2)
#define KEY_FIRE (4)
#define KEY_SPRINT (8)
#define KEY_SECONDARY_ATTACK (16)
#define KEY_JUMP (32)
#define KEY_LOOK_RIGHT (64)
#define KEY_HANDBRAKE (128)
#define KEY_LOOK_LEFT (256)
#define KEY_SUBMISSION (512)
#define KEY_LOOK_BEHIND (512)
#define KEY_WALK (1024)
#define KEY_ANALOG_UP (2048)
#define KEY_ANALOG_DOWN (4096)
#define KEY_ANALOG_RIGHT (16384)
#define KEY_ANALOG_LEFT (8192)
#define KEY_UP (-128)
#define KEY_DOWN (128)
#define KEY_LEFT (-128)
#define KEY_RIGHT (128)
#define PLAYER_RECORDING_TYPE_NONE (0)
#define PLAYER_RECORDING_TYPE_DRIVER (1)
#define PLAYER_RECORDING_TYPE_ONFOOT (2)
#if MAX_PLAYER_NAME < 1 || MAX_PLAYER_NAME > 24
#error MAX_PLAYER_NAME must be >= 1 and <= 24
#endif
#if MAX_PLAYERS < 1 || MAX_PLAYERS > 1000
#error MAX_PLAYERS must be >= 1 and <= 1000
#endif
#if MAX_VEHICLES < 1 || MAX_VEHICLES > 2000
#error MAX_VEHICLES must be >= 1 and <= 2000
#endif
#if MAX_OBJECTS < 1 || MAX_OBJECTS > 2000
#error MAX_OBJECTS must be >= 1 and <= 2000
#endif
#if MAX_GANG_ZONES < 1 || MAX_GANG_ZONES > 1024
#error MAX_GANG_ZONES must be >= 1 and <= 1024
#endif
#if MAX_TEXT_DRAWS < Text:1 || MAX_TEXT_DRAWS > Text:2048
#error MAX_TEXT_DRAWS must be >= 1 and <= 2048
#endif
#if MAX_MENUS < Menu:1 || MAX_MENUS > Menu:128
#error MAX_MENUS must be >= 1 and <= 128
#endif
public const SAMP_INCLUDES_VERSION = 0x037030;
#include <core>
#include <float>
#include <string>
#include <file>
#include <time>
#include <datagram>
#tryinclude <console>
#if !defined _console_included
#define _console_included
native print(const string[]);
native printf(const format[], {Float,_}:...);
#endif
native format(output[], len = sizeof output, const format[], {Float,_}:...);
native SetTimer(const funcname[], interval, repeating);
native KillTimer(timerid);
native GetTickCount();
native Float:asin(Float:value);
native Float:acos(Float:value);
native Float:atan(Float:value);
native Float:atan2(Float:y, Float:x);
native SendChat(const msg[]);
native SendCommand(const commandtext[]);
native GetPlayerState(playerid);
native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z);
native GetPlayerVehicleID(playerid);
native GetPlayerArmedWeapon(playerid);
native GetPlayerHealth(playerid);
native GetPlayerArmour(playerid);
native GetPlayerSpecialAction(playerid);
native IsPlayerStreamedIn(playerid);
native IsVehicleStreamedIn(vehicleid);
native GetPlayerKeys(playerid, &keys, &updown, &leftright);
native GetPlayerFacingAngle(playerid, &Float:ang);
native GetMyPos(&Float:x, &Float:y, &Float:z);
native SetMyPos(Float:x, Float:y, Float:z);
native GetMyFacingAngle(&Float:ang);
native SetMyFacingAngle(Float:ang);
native GetDistanceFromMeToPoint(Float:X, Float:Y, Float:Z, &Float:Distance);
native IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z);
native GetPlayerName(playerid, name[], len = sizeof name);
native IsPlayerConnected(playerid);
native StartRecordingPlayback(playbacktype, const recordname[]);
native StopRecordingPlayback();
native PauseRecordingPlayback();
native ResumeRecordingPlayback();
forward OnNPCModeInit();
forward OnNPCModeExit();
forward OnNPCConnect(myplayerid);
forward OnNPCDisconnect(reason[]);
forward OnNPCSpawn();
forward OnNPCEnterVehicle(vehicleid, seatid);
forward OnNPCExitVehicle();
forward OnClientMessage(color, text[]);
forward OnPlayerDeath(playerid);
forward OnPlayerText(playerid, text[]);
forward OnPlayerStreamIn(playerid);
forward OnPlayerStreamOut(playerid);
forward OnVehicleStreamIn(vehicleid);
forward OnVehicleStreamOut(vehicleid);
forward OnRecordingPlaybackEnd(); |