Southclaws/samp-zipline
Create fun and useful ziplines players can use to speed across large areas quickly. Warning: does not work well with laggy players.
The author has archived this repository, so it is no longer maintained.
This repository has no licence file. It is public to read, but that alone does not give permission to reuse it.
Install with sampctl
sampctl package install Southclaws/samp-zipline
Run this in your project folder. sampctl downloads the package and what it depends on.
Adds its include files, with the libraries it depends on, to the Pawn compiler in your browser, ready to include in a script.
Depends on 7 packages
- southclaws/samp-stdlibnot in this directory
- Southclaws/samp-logger★ 21
- zeex/amx_assemblynot in this directory
- pawn-lang/YSI-Includes★ 227
- samp-incognito/samp-streamer-plugin★ 248
- Southclaws/samp-linegen★ 6
- ScavengeSurvive/mathutil★ 5
Used by 1 package
README.md
Zipline.inc
Create fun and useful ziplines players can use to speed across large areas quickly.
Warning: does not work well with laggy players.
Installation
Simply install to your project:
sampctl package install Southclaws/samp-zipline
Include in your code and begin using the library:
#include <zipline>
Usage
Constants
MAX_ZIPLINE:- Zipline creation limit.
Functions
CreateZipline(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2, worldid = 0, interiorid = 0):- Create a zipline between the two sets of coordinates.
DestroyZipline(ziplineid):- Delete a zipline from the game world.
IsValidZipline(ziplineid):- Returns if a zipline ID is a valid zipline.
GetZiplineStartAreaID(ziplineid):- Returns the ID of the streamer area used for the start point.
GetZiplineEndAreaID(ziplineid):- Returns the ID of the streamer area used for the end point.
GetZiplineLineID(ziplineid):- Returns the ID of the line segment object used for the zipline.
GetZiplineStartPos(ziplineid, &Float:x, &Float:y, &Float:z):- Returns the start point position.
SetZiplineStartPos(ziplineid, Float:x, Float:y, Float:z):- Sets the start point position and updates the line segment object accordingly.
GetZiplineEndPos(ziplineid, &Float:x, &Float:y, &Float:z):- Returns the end point position.
SetZiplineEndPos(ziplineid, Float:x, Float:y, Float:z):- Sets the end point position and updates the line segment object accordingly.
GetZiplineVector(ziplineid, &Float:x, &Float:y, &Float:z):- Returns the 3D direction vector of the zipline from the start point.
GetZiplineWorld(ziplineid):- Returns the virtual world in which the zipline is located.
SetZiplineWorld(ziplineid, worldid):- Sets the virtual world of the zipline and updates the line segment object accordingly.
GetZiplineInterior(ziplineid):- Returns the interior in which the zipline is located.
SetZiplineInterior(ziplineid, interiorid):- Sets the interior of the zipline and updates the line segment object accordingly.
IsPlayerOnZipline(playerid):- Returns if a player is currently on any zipline.
GetPlayerZipline(playerid):- Returns the zipline that a player is currently on.
Hooked
OnPlayerKeyStateChange:- For checking when a player interacts with a zipline entry point.
OnPlayerEnterDynamicArea:- For checking when the player reaches the end of a zipline so they can be removed.
Testing
To test, simply run the package:
sampctl package run
gameplaypawn-packagesa-mpsa-mp-libraryzipline
This page is built from what GitHub publishes about the repository. samp.directory does not host the code. Report a problem with this listing