1
0

YSF.inc 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. /* YSF - kurta999's version */
  2. #if defined _YSF_included
  3. #endinput
  4. #endif
  5. #define _YSF_included
  6. #define YSF_ERROR_ISNT_LOADED cellmin
  7. #define YSF_ERROR_PARAMETER_COUNT_ISNT_EQUAL (cellmin + 1)
  8. #define YSF_ERROR_PARAMETER_COUNT_ISNT_ENOUGH (cellmin + 2)
  9. // Definitions
  10. enum E_SERVER_RULE_FLAGS (<<= 1)
  11. {
  12. CON_VARFLAG_DEBUG = 1,
  13. CON_VARFLAG_READONLY,
  14. CON_VARFLAG_RULE,
  15. CON_VARFLAG_UNREMOVABLE
  16. }
  17. enum E_SCM_EVENT_TYPE
  18. {
  19. SCM_EVENT_PAINTJOB = 1,
  20. SCM_EVENT_MOD = 2,
  21. SCM_EVENT_RESPRAY = 3,
  22. SCM_EVENT_MOD_SHOP = 4
  23. }
  24. // Execute
  25. native execute(const command[], saveoutput=0, index=0);
  26. // File functions
  27. native ffind(const pattern[], filename[], len, &idx);
  28. native frename(const oldname[], const newname[]);
  29. // Directory functions
  30. native dfind(const pattern[], filename[], len, &idx);
  31. native dcreate(const name[]);
  32. native drename(const oldname[], const newname[]);
  33. // Gamemode restart time
  34. native SetModeRestartTime(Float:time);
  35. native Float:GetModeRestartTime();
  36. // Max player/npc change at runtime
  37. native SetMaxPlayers(maxplayers);
  38. native SetMaxNPCs(maxnpcs);
  39. // Filterscript functions
  40. native LoadFilterScript(const scriptname[]); // difference between "rcon loadfs": Return -> True if success, false if not
  41. native UnLoadFilterScript(const scriptname[]); // ^
  42. native GetFilterScriptCount();
  43. native GetFilterScriptName(id, name[], len = sizeof(name));
  44. // Server rule modifications
  45. native AddServerRule(const name[], const value[], E_SERVER_RULE_FLAGS:flags = CON_VARFLAG_RULE);
  46. native SetServerRule(const name[], const value[]);
  47. native IsValidServerRule(const name[]);
  48. native SetServerRuleFlags(const name[], E_SERVER_RULE_FLAGS:flags);
  49. native E_SERVER_RULE_FLAGS:GetServerRuleFlags(const name[]);
  50. // Server settings
  51. native GetServerSettings(&showplayermarkes, &shownametags, &stuntbonus, &useplayerpedanims, &bLimitchatradius, &disableinteriorenterexits, &nametaglos, &manualvehicleengine, &limitplayermarkers, &vehiclefriendlyfire, &defaultcameracollision, &Float:fGlobalchatradius, &Float:fNameTagDrawDistance, &Float:fPlayermarkerslimit);
  52. native GetNPCCommandLine(npcid, npcscript[], length = sizeof(npcscript));
  53. // Player position sync bounds
  54. native GetSyncBounds(&Float:hmin, &Float:hmax, &Float:vmin, &Float:vmax);
  55. native SetSyncBounds(Float:hmin, Float:hmax, Float:vmin, Float:vmax);
  56. // Toggling RCON commands
  57. native GetRCONCommandName(const cmdname[], changedname[], len = sizeof(changedname));
  58. native ChangeRCONCommandName(const cmdname[], changedname[]);
  59. // Per AMX function calling
  60. native CallFunctionInScript(const scriptname[], const function[], const format[], {Float,_}:...);
  61. // Broadcasting console messages
  62. native EnableConsoleMSGsForPlayer(playerid, color);
  63. native DisableConsoleMSGsForPlayer(playerid);
  64. native HasPlayerConsoleMessages(playerid, &color = 0);
  65. // YSF settings
  66. native YSF_SetTickRate(ticks);
  67. native YSF_GetTickRate();
  68. native YSF_EnableNightVisionFix(enable);
  69. native YSF_IsNightVisionFixEnabled();
  70. native YSF_ToggleOnServerMessage(toggle);
  71. native YSF_IsOnServerMessageEnabled();
  72. native YSF_SetExtendedNetStatsEnabled(enable);
  73. native YSF_IsExtendedNetStatsEnabled();
  74. native YSF_SetAFKAccuracy(time_ms);
  75. native YSF_GetAFKAccuracy();
  76. native SetRecordingDirectory(const dir[]);
  77. native GetRecordingDirectory(dir[], len = sizeof(dir));
  78. // Nickname
  79. native IsValidNickName(const name[]);
  80. native AllowNickNameCharacter(character, bool:allow);
  81. native IsNickNameCharacterAllowed(character);
  82. // Classes
  83. native GetAvailableClasses();
  84. native GetPlayerClass(classid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
  85. native EditPlayerClass(classid, teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
  86. // Timers
  87. native GetRunningTimers();
  88. // Per player things
  89. native SetPlayerGravity(playerid, Float:gravity);
  90. native Float:GetPlayerGravity(playerid);
  91. native SetPlayerAdmin(playerid, bool:admin); // Set player as RCON admin
  92. native SetPlayerTeamForPlayer(playerid, teamplayerid, teamid);
  93. native GetPlayerTeamForPlayer(playerid, teamplayerid);
  94. native SetPlayerSkinForPlayer(playerid, skinplayerid, skin);
  95. native GetPlayerSkinForPlayer(playerid, skinplayerid);
  96. native SetPlayerNameForPlayer(playerid, nameplayerid, const playername[]);
  97. native GetPlayerNameForPlayer(playerid, nameplayerid, playername[], size = sizeof(playername));
  98. native SetPlayerFightStyleForPlayer(playerid, styleplayerid, style);
  99. native GetPlayerFightStyleForPlayer(playerid, skinplayerid);
  100. native SetPlayerPosForPlayer(playerid, posplayerid, Float:fX, Float:fY, Float:fZ, bool:forcesync = true);
  101. native SetPlayerRotationQuatForPlayer(playerid, quatplayerid, Float:w, Float:x, Float:y, Float:z, bool:forcesync = true);
  102. native ApplyAnimationForPlayer(playerid, animplayerid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time); // DOESN'T WORK
  103. native GetPlayerWeather(playerid);
  104. native TogglePlayerWidescreen(playerid, bool:set);
  105. native IsPlayerWidescreenToggled(playerid);
  106. native GetSpawnInfo(playerid, &teamid, &modelid, &Float:spawn_x, &Float:spawn_y, &Float:spawn_z, &Float:z_angle, &weapon1, &weapon1_ammo, &weapon2, &weapon2_ammo,& weapon3, &weapon3_ammo);
  107. native GetPlayerSkillLevel(playerid, skill);
  108. native IsPlayerCheckpointActive(playerid);
  109. native GetPlayerCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fSize);
  110. native IsPlayerRaceCheckpointActive(playerid);
  111. native GetPlayerRaceCheckpoint(playerid, &Float:fX, &Float:fY, &Float:fZ, &Float:fNextX, &Float:fNextY, &Float:fNextZ, &Float:fSize);
  112. native GetPlayerWorldBounds(playerid, &Float:x_max, &Float:x_min, &Float:y_max, &Float:y_min);
  113. native IsPlayerInModShop(playerid);
  114. native GetPlayerSirenState(playerid);
  115. native GetPlayerLandingGearState(playerid);
  116. native GetPlayerHydraReactorAngle(playerid);
  117. native Float:GetPlayerTrainSpeed(playerid);
  118. native Float:GetPlayerZAim(playerid);
  119. native GetPlayerSurfingOffsets(playerid, &Float:fOffsetX, &Float:fOffsetY, &Float:fOffsetZ);
  120. native GetPlayerRotationQuat(playerid, &Float:w, &Float:x, &Float:y, &Float:z);
  121. native GetPlayerDialogID(playerid);
  122. native GetPlayerSpectateID(playerid);
  123. native GetPlayerSpectateType(playerid);
  124. native GetPlayerLastSyncedVehicleID(playerid);
  125. native GetPlayerLastSyncedTrailerID(playerid);
  126. native SendBulletData(senderid, forplayerid = -1, weaponid, hittype, hitid, Float:fHitOriginX, Float:fHitOriginY, Float:fHitOriginZ, Float:fHitTargetX, Float:fHitTargetY, Float:fHitTargetZ, Float:fCenterOfHitX, Float:fCenterOfHitY, Float:fCenterOfHitZ);
  127. native ShowPlayerForPlayer(forplayerid, playerid);
  128. native HidePlayerForPlayer(forplayerid, playerid);
  129. native AddPlayerForPlayer(forplayerid, playerid, isnpc = 0);
  130. native RemovePlayerForPlayer(forplayerid, playerid);
  131. native SetPlayerChatBubbleForPlayer(forplayerid, playerid, const text[], color, Float:drawdistance, expiretime);
  132. native ResetPlayerMarkerForPlayer(playerid, resetplayerid);
  133. native SetPlayerVersion(playerid, const version[]);
  134. native IsPlayerSpawned(playerid);
  135. native IsPlayerControllable(playerid);
  136. native SpawnForWorld(playerid);
  137. native BroadcastDeath(playerid);
  138. native IsPlayerCameraTargetEnabled(playerid);
  139. native SetPlayerDisabledKeysSync(playerid, keys, updown = 0, leftright = 0);
  140. native GetPlayerDisabledKeysSync(playerid, &keys, &updown = 0, &leftright = 0);
  141. // Actors
  142. native GetActorSpawnInfo(actorid, &skinid, &Float:fX, &Float:fY, &Float:fZ, &Float:fAngle);
  143. native GetActorSkin(actorid);
  144. native GetActorAnimation(actorid, animlib[], animlibsize = sizeof(animlib), animname[], animnamesize = sizeof(animname), &Float:fDelta, &loop, &lockx, &locky, &freeze, &time);
  145. // Scoreboard manipulation
  146. native TogglePlayerScoresPingsUpdate(playerid, bool:toggle);
  147. native TogglePlayerFakePing(playerid, bool:toggle);
  148. native SetPlayerFakePing(playerid, ping);
  149. native TogglePlayerInServerQuery(playerid, bool:toggle);
  150. native IsPlayerToggledInServerQuery(playerid);
  151. // Pause functions
  152. native IsPlayerPaused(playerid);
  153. native GetPlayerPausedTime(playerid);
  154. // Objects get - global
  155. native Float:GetObjectDrawDistance(objectid);
  156. native SetObjectMoveSpeed(objectid, Float:fSpeed);
  157. native Float:GetObjectMoveSpeed(objectid);
  158. native GetObjectTarget(objectid, &Float:fX, &Float:fY, &Float:fZ);
  159. native GetObjectAttachedData(objectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
  160. native GetObjectAttachedOffset(objectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
  161. native IsObjectMaterialSlotUsed(objectid, materialindex); // Return values: 1 = material, 2 = material text
  162. native GetObjectMaterial(objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcoor);
  163. native GetObjectMaterialText(objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
  164. native IsObjectNoCameraCol(objectid);
  165. // Objects get - player
  166. native Float:GetPlayerObjectDrawDistance(playerid, objectid);
  167. native SetPlayerObjectMoveSpeed(playerid, objectid, Float:fSpeed);
  168. native Float:GetPlayerObjectMoveSpeed(playerid, objectid);
  169. native Float:GetPlayerObjectTarget(playerid, objectid, &Float:fX, &Float:fY, &Float:fZ);
  170. native GetPlayerObjectAttachedData(playerid, objectid, &attached_vehicleid, &attached_objectid, &attached_playerid);
  171. native GetPlayerObjectAttachedOffset(playerid, objectid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ);
  172. native IsPlayerObjectMaterialSlotUsed(playerid, objectid, materialindex); // Return values: 1 = material, 2 = material text
  173. native GetPlayerObjectMaterial(playerid, objectid, materialindex, &modelid, txdname[], txdnamelen = sizeof(txdname), texturename[], texturenamelen = sizeof(texturename), &materialcolor);
  174. native GetPlayerObjectMaterialText(playerid, objectid, materialindex, text[], textlen = sizeof(text), &materialsize, fontface[], fontfacelen = sizeof(fontface), &fontsize, &bold, &fontcolor, &backcolor, &textalignment);
  175. native IsPlayerObjectNoCameraCol(playerid, objectid);
  176. native GetPlayerSurfingPlayerObjectID(playerid);
  177. native GetPlayerCameraTargetPlayerObj(playerid);
  178. native GetObjectType(playerid, objectid);
  179. // special - for attached objects
  180. native GetPlayerAttachedObject(playerid, index, &modelid, &bone, &Float:fX, &Float:fY, &Float:fZ, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fSacleX, &Float:fScaleY, &Float:fScaleZ, &materialcolor1, &materialcolor2);
  181. //n_ative AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
  182. native AttachPlayerObjectToObject(playerid, objectid, attachtoid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ, SyncRotation = 1);
  183. // RakNet ban functions
  184. native ClearBanList();
  185. native IsBanned(const ipaddress[]);
  186. // RakNet
  187. native SetTimeoutTime(playerid, time_ms);
  188. native GetLocalIP(index, localip[], len = sizeof(localip));
  189. // Exclusive RPC broadcast
  190. native SetExclusiveBroadcast(toggle);
  191. native BroadcastToPlayer(playerid, toggle=1);
  192. // Vehicle functions
  193. native GetVehicleSpawnInfo(vehicleid, &Float:fX, &Float:fY, &Float:fZ, &Float:fRot, &color1, &color2);
  194. native SetVehicleSpawnInfo(vehicleid, modelid, Float:fX, Float:fY, Float:fZ, Float:fAngle, color1, color2, respawntime = -2, interior = -2);
  195. #if !defined GetVehicleColor
  196. native GetVehicleColor(vehicleid, &color1, &color2);
  197. #endif
  198. #if !defined GetVehiclePaintjob
  199. native GetVehiclePaintjob(vehicleid);
  200. #endif
  201. #if !defined GetVehicleInterior
  202. native GetVehicleInterior(vehicleid);
  203. #endif
  204. native GetVehicleNumberPlate(vehicleid, plate[], len = sizeof(plate));
  205. native SetVehicleRespawnDelay(vehicleid, delay);
  206. native GetVehicleRespawnDelay(vehicleid);
  207. native SetVehicleOccupiedTick(vehicleid, ticks);
  208. native GetVehicleOccupiedTick(vehicleid); // GetTickCount() - GetVehicleOccupiedTick(vehicleid) = time passed since vehicle is occupied, in ms
  209. native SetVehicleRespawnTick(vehicleid, ticks);
  210. native GetVehicleRespawnTick(vehicleid); // GetTickCount() - GetVehicleRespawnTick(vehicleid) = time passed since vehicle spawned, in ms
  211. native GetVehicleLastDriver(vehicleid);
  212. native GetVehicleCab(vehicleid);
  213. native HasVehicleBeenOccupied(vehicleid);
  214. native SetVehicleBeenOccupied(vehicleid, occupied);
  215. native IsVehicleOccupied(vehicleid);
  216. native IsVehicleDead(vehicleid);
  217. native SetVehicleParamsSirenState(vehicleid, sirenState);
  218. native ToggleVehicleSirenEnabled(vehicleid, enabled);
  219. native IsVehicleSirenEnabled(vehicleid);
  220. native GetVehicleMatrix(vehicleid, &Float:rightX, &Float:rightY, &Float:rightZ, &Float:upX, &Float:upY, &Float:upZ, &Float:atX, &Float:atY, &Float:atZ);
  221. native GetVehicleModelCount(modelid);
  222. native GetVehicleModelsUsed();
  223. // Gangzones - Global
  224. native IsValidGangZone(zoneid);
  225. native IsPlayerInGangZone(playerid, zoneid);
  226. native IsGangZoneVisibleForPlayer(playerid, zoneid);
  227. native GangZoneGetColorForPlayer(playerid, zoneid);
  228. native GangZoneGetFlashColorForPlayer(playerid, zoneid);
  229. native IsGangZoneFlashingForPlayer(playerid, zoneid);
  230. native GangZoneGetPos(zoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);
  231. // Gangzones - Player
  232. native CreatePlayerGangZone(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy);
  233. native PlayerGangZoneDestroy(playerid, zoneid);
  234. native PlayerGangZoneShow(playerid, zoneid, color);
  235. native PlayerGangZoneHide(playerid, zoneid);
  236. native PlayerGangZoneFlash(playerid, zoneid, color);
  237. native PlayerGangZoneStopFlash(playerid, zoneid);
  238. native IsValidPlayerGangZone(playerid, zoneid);
  239. native IsPlayerInPlayerGangZone(playerid, zoneid);
  240. native IsPlayerGangZoneVisible(playerid, zoneid);
  241. native PlayerGangZoneGetColor(playerid, zoneid);
  242. native PlayerGangZoneGetFlashColor(playerid, zoneid);
  243. native IsPlayerGangZoneFlashing(playerid, zoneid);
  244. native PlayerGangZoneGetPos(playerid, zoneid, &Float:fMinX, &Float:fMinY, &Float:fMaxX, &Float:fMaxY);
  245. // Textdraw - Global
  246. native IsValidTextDraw(Text:textdrawid);
  247. native IsTextDrawVisibleForPlayer(playerid, Text:textdrawid);
  248. native TextDrawGetString(Text:textdrawid, text[], len = sizeof(text));
  249. native TextDrawSetPos(Text:textdrawid, Float:fX, Float:fY); // You can change textdraw pos with it, but you need to use TextDrawShowForPlayer() after that
  250. native TextDrawGetLetterSize(Text:textdrawid, &Float:fX, &Float:fY);
  251. native TextDrawGetTextSize(Text:textdrawid, &Float:fX, &Float:fY);
  252. native TextDrawGetPos(Text:textdrawid, &Float:fX, &Float:fY);
  253. native TextDrawGetColor(Text:textdrawid);
  254. native TextDrawGetBoxColor(Text:textdrawid);
  255. native TextDrawGetBackgroundColor(Text:textdrawid);
  256. native TextDrawGetShadow(Text:textdrawid);
  257. native TextDrawGetOutline(Text:textdrawid);
  258. native TextDrawGetFont(Text:textdrawid);
  259. native TextDrawIsBox(Text:textdrawid);
  260. native TextDrawIsProportional(Text:textdrawid);
  261. native TextDrawIsSelectable(Text:textdrawid);
  262. native TextDrawGetAlignment(Text:textdrawid);
  263. native TextDrawGetPreviewModel(Text:textdrawid);
  264. native TextDrawGetPreviewRot(Text:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
  265. native TextDrawGetPreviewVehCol(Text:textdrawid, &color1, &color2);
  266. native TextDrawSetStringForPlayer(Text:textdrawid, playerid, const string[], {Float,_}:...);
  267. // Textdraw - Player
  268. native IsValidPlayerTextDraw(playerid, PlayerText:textdrawid);
  269. native IsPlayerTextDrawVisible(playerid, PlayerText:textdrawid);
  270. native PlayerTextDrawGetString(playerid, PlayerText:textdrawid, text[], len = sizeof(text));
  271. native PlayerTextDrawSetPos(playerid, PlayerText:textdrawid, Float:fX, Float:fY);
  272. native PlayerTextDrawGetLetterSize(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
  273. native PlayerTextDrawGetTextSize(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
  274. native PlayerTextDrawGetPos(playerid, PlayerText:textdrawid, &Float:fX, &Float:fY);
  275. native PlayerTextDrawGetColor(playerid, PlayerText:textdrawid);
  276. native PlayerTextDrawGetBoxColor(playerid, PlayerText:textdrawid);
  277. native PlayerTextDrawGetBackgroundCol(playerid, PlayerText:textdrawid);
  278. native PlayerTextDrawGetShadow(playerid, PlayerText:textdrawid);
  279. native PlayerTextDrawGetOutline(playerid, PlayerText:textdrawid);
  280. native PlayerTextDrawGetFont(playerid, PlayerText:textdrawid);
  281. native PlayerTextDrawIsBox(playerid, PlayerText:textdrawid);
  282. native PlayerTextDrawIsProportional(playerid, PlayerText:textdrawid);
  283. native PlayerTextDrawIsSelectable(playerid, PlayerText:textdrawid);
  284. native PlayerTextDrawGetAlignment(playerid, PlayerText:textdrawid);
  285. native PlayerTextDrawGetPreviewModel(playerid, PlayerText:textdrawid);
  286. native PlayerTextDrawGetPreviewRot(playerid, PlayerText:textdrawid, &Float:fRotX, &Float:fRotY, &Float:fRotZ, &Float:fZoom);
  287. native PlayerTextDrawGetPreviewVehCol(playerid, PlayerText:textdrawid, &color1, &color2);
  288. // 3D Text - Global
  289. native IsValid3DTextLabel(Text3D:id);
  290. native Is3DTextLabelStreamedIn(playerid, Text3D:id);
  291. native Get3DTextLabelText(Text3D:id, text[], len = sizeof(text));
  292. native Get3DTextLabelColor(Text3D:id);
  293. native Get3DTextLabelPos(Text3D:id, &Float:fX, &Float:fY, &Float:fZ);
  294. native Float:Get3DTextLabelDrawDistance(Text3D:id);
  295. native Get3DTextLabelLOS(Text3D:id);
  296. native Get3DTextLabelVirtualWorld(Text3D:id);
  297. native Get3DTextLabelAttachedData(Text3D:id, &attached_playerid, &attached_vehicleid);
  298. // 3D Text - Player
  299. native IsValidPlayer3DTextLabel(playerid, PlayerText3D:id);
  300. native GetPlayer3DTextLabelText(playerid, PlayerText3D:id, text[], len = sizeof(text));
  301. native GetPlayer3DTextLabelColor(playerid, PlayerText3D:id);
  302. native GetPlayer3DTextLabelPos(playerid, PlayerText3D:id, &Float:fX, &Float:fY, &Float:fZ);
  303. native Float:GetPlayer3DTextLabelDrawDist(playerid, PlayerText3D:id);
  304. native GetPlayer3DTextLabelLOS(playerid, PlayerText3D:id);
  305. native GetPlayer3DTextLabelVirtualW(playerid, PlayerText3D:id);
  306. native GetPlayer3DTextLabelAttached(playerid, PlayerText3D:id, &attached_playerid, &attached_vehicleid);
  307. // Menu
  308. native IsMenuDisabled(Menu:menuid);
  309. native IsMenuRowDisabled(Menu:menuid, row);
  310. native GetMenuColumns(Menu:menuid);
  311. native GetMenuItems(Menu:menuid, column);
  312. native GetMenuPos(Menu:menuid, &Float:fX, &Float:fY);
  313. native GetMenuColumnWidth(Menu:menuid, &Float:fColumn1, &Float:fColumn2);
  314. native GetMenuColumnHeader(Menu:menuid, column, header[], len = sizeof(header));
  315. native GetMenuItem(Menu:menuid, column, itemid, item[], len = sizeof(item));
  316. // Pickups - Global
  317. native IsValidPickup(pickupid);
  318. native IsPickupStreamedIn(playerid, pickupid);
  319. native GetPickupPos(pickupid, &Float:fX, &Float:fY, &Float:fZ);
  320. native GetPickupModel(pickupid);
  321. native GetPickupType(pickupid);
  322. native GetPickupVirtualWorld(pickupid);
  323. /*
  324. // Pickups - Player
  325. native CreatePlayerPickup(playerid, model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
  326. native DestroyPlayerPickup(playerid, pickupid);
  327. native IsValidPlayerPickup(playerid, pickupid);
  328. native IsPlayerPickupStreamedIn(playerid, pickupid);
  329. native GetPlayerPickupPos(playerid, pickupid, &Float:fX, &Float:fY, &Float:fZ);
  330. native GetPlayerPickupModel(playerid, pickupid);
  331. native GetPlayerPickupType(playerid, pickupid);
  332. native GetPlayerPickupVirtualWorld(playerid, pickupid);
  333. */
  334. // Y_Less's model sizes inc
  335. native GetColCount();
  336. native Float:GetColSphereRadius(modelid);
  337. native GetColSphereOffset(modelid, &Float:fX, &Float:fY, &Float:fZ);
  338. // Formatting
  339. native SendClientMessagef(playerid, color, const message[], {Float,_}:...);
  340. native SendClientMessageToAllf(color, const message[], {Float,_}:...);
  341. native GameTextForPlayerf(playerid, displaytime, style, const message[], {Float,_}:...);
  342. native GameTextForAllf(displaytime, style, const message[], {Float,_}:...);
  343. native SendPlayerMessageToPlayerf(playerid, senderid, const message[], {Float,_}:...);
  344. native SendPlayerMessageToAllf(senderid, const message[], {Float,_}:...);
  345. native SendRconCommandf(const command[], {Float,_}:...);
  346. // Callbacks
  347. forward OnPlayerEnterGangZone(playerid, zoneid);
  348. forward OnPlayerLeaveGangZone(playerid, zoneid);
  349. forward OnPlayerEnterPlayerGangZone(playerid, zoneid);
  350. forward OnPlayerLeavePlayerGangZone(playerid, zoneid);
  351. forward OnPlayerPickUpPlayerPickup(playerid, pickupid);
  352. forward OnPlayerPauseStateChange(playerid, pausestate);
  353. forward OnPlayerStatsAndWeaponsUpdate(playerid);
  354. forward OnRemoteRCONPacket(const ipaddr[], port, const password[], success, const command[]);
  355. forward OnServerMessage(const msg[]);
  356. forward OnPlayerClientGameInit(playerid, &usecjwalk, &limitglobalchat, &Float:globalchatradius, &Float:nametagdistance, &disableenterexits, &nametaglos, &manualvehengineandlights,
  357. &spawnsavailable, &shownametags, &showplayermarkers, &onfoot_rate, &incar_rate, &weapon_rate, &lacgompmode, &vehiclefriendlyfire);
  358. forward OnOutcomeScmEvent(playerid, issuerid, E_SCM_EVENT_TYPE:eventid, vehicleid, arg1, arg2);
  359. forward OnServerQueryInfo(const ipaddr[], hostname[51], gamemode[31], language[31]);
  360. forward OnSystemCommandExecute(const line_output[], retval, index, success, line_current, line_total);
  361. //////////////////////////////////////////////////////////////
  362. // Fixes
  363. //////////////////////////////////////////////////////////////
  364. // No comment..
  365. #if !defined IsValidVehicle
  366. native IsValidVehicle(vehicleid);
  367. #endif
  368. #if !defined GetGravity
  369. native Float:GetGravity();
  370. #endif
  371. #if !defined GetWeather
  372. #define GetWeather() GetConsoleVarAsInt("weather")
  373. #endif
  374. native GetWeaponSlot(weaponid);
  375. enum
  376. {
  377. BS_BOOL,
  378. BS_CHAR,
  379. BS_UNSIGNEDCHAR,
  380. BS_SHORT,
  381. BS_UNSIGNEDSHORT,
  382. BS_INT,
  383. BS_UNSIGNEDINT,
  384. BS_FLOAT,
  385. BS_STRING
  386. };
  387. // Developer functions
  388. native SendRPC(playerid, RPC, {Float,_}:...); // playerid == -1 -> broadcast
  389. native SendData(playerid, {Float,_}:...); // playerid == -1 -> broadcast
  390. /* EXAMPLE
  391. CMD:pickup(playerid, params[])
  392. {
  393. new
  394. Float:X, Float:Y, Float:Z;
  395. GetPlayerPos(playerid, X, Y, Z);
  396. SendRPC(playerid, 95, // rpcid
  397. BS_INT, strval(params), // int - pickupid
  398. BS_INT, 1222, // int - modelid
  399. BS_INT, 19, // int - type
  400. BS_FLOAT, X + 2.0, // float
  401. BS_FLOAT, Y, // float
  402. BS_FLOAT, Z); // float
  403. return 1;
  404. }
  405. CMD:destroypickup(playerid, params[])
  406. {
  407. SendRPC(playerid, 63, // rpcid
  408. BS_INT, strval(params)); // int - pickupid
  409. return 1;
  410. }
  411. */