-
Notifications
You must be signed in to change notification settings - Fork 93
Natives (Areas)
samp-incognito edited this page Feb 3, 2018
·
21 revisions
-
CreateDynamicCircle
(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1)
-
CreateDynamicCylinder
(Float:x, Float:y, Float:minz, Float:maxz, Float:size, worldid = -1, interiorid = -1, playerid = -1)
-
CreateDynamicSphere
(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1)
-
CreateDynamicRectangle
(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1)
-
CreateDynamicCuboid
(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1)
-
CreateDynamicPolygon
(Float:points[], Float:minz = -FLOAT_INFINITY, Float:maxz = FLOAT_INFINITY, maxpoints = sizeof points, worldid = -1, interiorid = -1, playerid = -1)
- The points need to be specified as a sequence of ordered pairs (x1, y1, x2, y2, ..., xn, yn). The number of elements in the array must be divisible by two for this reason.
-
DestroyDynamicArea
(areaid)
-
IsValidDynamicArea
(areaid)
-
GetDynamicAreaType
(areaid)
-
GetDynamicPolygonPoints
(areaid, Float:points[], maxpoints = sizeof points)
-
GetDynamicPolygonNumberPoints
(areaid)
-
IsPlayerInDynamicArea
(playerid, areaid, recheck = 0)
-
IsPlayerInAnyDynamicArea
(playerid, recheck = 0)
-
IsAnyPlayerInDynamicArea
(areaid, recheck = 0)
-
IsAnyPlayerInAnyDynamicArea
(recheck = 0)
-
GetPlayerDynamicAreas
(playerid, areas[], maxareas = sizeof areas)
-
GetPlayerNumberDynamicAreas
(playerid)
-
IsPointInDynamicArea
(areaid, Float:x, Float:y, Float:z)
-
IsPointInAnyDynamicArea
(Float:x, Float:y, Float:z)
-
IsLineInDynamicArea
(areaid, Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2)
-
IsLineInAnyDynamicArea
(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2)
-
GetDynamicAreasForPoint
(Float:x, Float:y, Float:z, areas[], maxareas = sizeof areas)
-
GetNumberDynamicAreasForPoint
(Float:x, Float:y, Float:z)
-
GetDynamicAreasForLine
(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, areas[], maxareas = sizeof areas)
-
GetNumberDynamicAreasForLine
(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2)
-
AttachDynamicAreaToObject
(areaid, objectid, type = STREAMER_OBJECT_TYPE_DYNAMIC, playerid = INVALID_PLAYER_ID, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0)
- The object types are defined in
streamer.inc
.
- The object types are defined in
-
AttachDynamicAreaToPlayer
(areaid, playerid, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0)
-
AttachDynamicAreaToVehicle
(areaid, vehicleid, Float:offsetx = 0.0, Float:offsety = 0.0, Float:offsetz = 0.0)
-
ToggleDynAreaSpectateMode
(areaid, toggle)
- This toggles whether an area will still be triggered when players are in spectate mode. By default, it is turned on for each area.
-
IsToggleDynAreaSpectateMode
(areaid)
- This returns whether
ToggleDynAreaSpectateMode
is turned on for an area.
- This returns whether
- The
recheck
parameter allows an area check to occur without issuing a full update for the player. -
GetDynamicPolygonPoints
,GetPlayerDynamicAreas
, andGetDynamicAreasForPoint
all return the size of the array. - The coordinates specified for rectangles, cuboids, and polygons (as well as minimum/maximum Z coordinates for cylinders and polygons) will function as offsets when attached.