Southclaws/samp-linegen
Generates a line of objects between start point and destination. Useful for ziplines, tunnels, police tape, funky infinite neon strips, etc.
Ce dépôt n’a pas de fichier de licence. Il est public en lecture, mais cela ne donne pas à lui seul le droit de le réutiliser.
Installer avec sampctl
sampctl package install Southclaws/samp-linegen
Lance ceci dans le dossier de ton projet. sampctl télécharge le paquet et ce dont il dépend.
Ajoute ses fichiers include, avec les bibliothèques dont il dépend, au compilateur Pawn de ton navigateur, prêts à être inclus dans un script.
Dépend de 3 paquets
- southclaws/samp-stdlibpas dans cet annuaire
- pawn-lang/YSI-Includes★ 226
- samp-incognito/samp-streamer-plugin★ 247
Utilisé par 5 paquets
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
Cette page est construite à partir de ce que GitHub publie sur le dépôt. samp.directory n’héberge pas le code. Signaler un problème avec cette fiche