Southclaws/samp-linegen
Generates a line of objects between start point and destination. Useful for ziplines, tunnels, police tape, funky infinite neon strips, etc.
Dieses Repository hat keine Lizenzdatei. Es ist öffentlich lesbar, aber das allein gibt noch keine Erlaubnis, es weiterzuverwenden.
Mit sampctl installieren
sampctl package install Southclaws/samp-linegen
Führe das in deinem Projektordner aus. sampctl lädt das Paket und alles herunter, wovon es abhängt.
Fügt seine Include-Dateien samt der Bibliotheken, von denen es abhängt, dem Pawn-Compiler in deinem Browser hinzu, bereit zum Einbinden in ein Skript.
Hängt von 3 Paketen ab
- southclaws/samp-stdlibnicht in diesem Verzeichnis
- pawn-lang/YSI-Includes★ 226
- samp-incognito/samp-streamer-plugin★ 247
Verwendet von 5 Paketen
README.md
linegen.inc
Generates a line of objects between start point and destination. Useful for ziplines, tunnels, police tape, funky infinite neon strips, etc.
Installation
Simply install to your project:
sampctl package install Southclaws/samp-linegen
Include in your code and begin using the library:
#include <linegen>
Usage
Constants
MAX_LINE: Line segment creation limit.MAX_OBJECTS_PER_LINE: Maximum number of objects per line segment.INVALID_LINE_SEGMENT_ID: Invalid ID for use with validity checks.
Functions
CreateLineSegment(modelid, Float:objlength, Float:PointX, Float:PointY, Float:PointZ, Float:DestX, Float:DestY, Float:DestZ, Float:RotX = 0.0, Float:RotY = 0.0, Float:RotZ = 0.0, Float:objlengthoffset = 0.0, worldid = -1, interiorid = -1, playerid = -1, Float:maxlength = 100.0)- Creates a line segment consisting of objects of the specified model ID, rotation values, intervals and other properties. Can be set to be visible in a specific world, interior and to a specific player.
DestroyLineSegment(lineid)- Destroys a line segment and frees up the ID for use.
IsValidLineSegment(lineid)- Returns if a line segment ID is valid line segment that exists.
GetLineSegmentModel(lineid)- Returns the model used by a line segment.
SetLineSegmentModel(lineid, modelid, Float:objlength, Float:objlengthoffset)- Sets a line segment model ID and updates objects accordingly.
GetLineSegmentObjectCount(lineid)- Returns the amount of objects used by the line segment.
GetLineSegmentObjectLength(lineid)- Returns the set length of model used for the line segment.
SetLineSegmentObjectLength(lineid, Float:objlength)- Sets the length of the model used by the line segment which affects the spacing.
GetLineSegmentObjectOffset(lineid)- Returns the offset along the line at which objects are created.
SetLineSegmentObjectOffset(lineid, Float:objlengthoffset)- Sets the offset along the line at which objects are created.
GetLineSegmentMaxLength(lineid)- Returns the maximum length a line segment can be.
SetLineSegmentMaxLength(lineid, Float:maxlength)- Sets the maximum length of a line segment.
GetLineSegmentPoint(lineid, &Float:PointX, &Float:PointY, &Float:PointZ)- Gets the start point of a line segment.
SetLineSegmentPoint(lineid, Float:PointX, Float:PointY, Float:PointZ)- Sets the start point of a line segment.
GetLineSegmentDest(lineid, &Float:DestX, &Float:DestY, &Float:DestZ)- Gets the end point of a line segment.
SetLineSegmentDest(lineid, Float:DestX, Float:DestY, Float:DestZ)- Sets the end point of a line segment.
GetLineSegmentModelAngles(lineid, &Float:RotX, &Float:RotY, &Float:RotZ)- Gets the object rotation angles.
SetLineSegmentModelAngles(lineid, Float:RotX, Float:RotY, Float:RotZ)- Sets the object rotation angles.
GetLineSegmentWorld(lineid)- Gets the virtual world in which the line segment is visible (-1 for all worlds).
SetLineSegmentWorld(lineid, world)- Sets the virtual world in which the line segment is visible (-1 for all worlds).
GetLineSegmentInterior(lineid)- Gets the interior in which the line segment is visible (-1 for all interiors).
SetLineSegmentInterior(lineid, interior)- Sets the interior in which the line segment is visible (-1 for all interiors).
GetLineSegmentPlayerID(lineid)- Gets the player ID that the line segment is visible to (-1 for all players).
SetLineSegmentPlayerID(lineid, playerid)- Sets the player ID that the line segment is visible to (-1 for all players).
GetLineSegmentVector(lineid, &Float:x, &Float:y, &Float:z)- Returns the 3D direction vector of the line segment.
GetDistanceToLineSegmentPoint(lineid, Float:FromX, Float:FromY, Float:FromZ)- Returns the distance to the line segment start point.
GetDistanceToLineSegmentDest(lineid, Float:FromX, Float:FromY, Float:FromZ)- Returns the distance to the line segment end point.
GetLineSegmentLength(lineid)- Returns the overall length of the line segment.
Testing
To test, simply run the package:
sampctl package run
Diese Seite wird aus dem erstellt, was GitHub über das Repository veröffentlicht. samp.directory hostet den Code nicht. Ein Problem mit diesem Eintrag melden