Coder Social home page Coder Social logo

southclaws / samp-zipline Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 2.0 20 KB

Create fun and useful ziplines players can use to speed across large areas quickly. Warning: does not work well with laggy players.

Pawn 100.00%
pawn-package sa-mp sa-mp-library zipline gameplay

samp-zipline's Introduction

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

samp-zipline's People

Contributors

agraber avatar southclaws avatar y-less avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

y-less brlivexp

samp-zipline's Issues

YSI 4 Update

It would appear this repository is yet to be updated.

C:\Users\Administrator\Desktop\pawno\include\Zipline.inc(52) : error 001: expected token: ";", but found "-identifier-"
C:\Users\Administrator\Desktop\pawno\include\Zipline.inc(69) : error 017: undefined symbol "Iterator@zip_Index"
C:\Users\Administrator\Desktop\pawno\include\Zipline.inc(69) : error 017: undefined symbol "Iterator@zip_Index"
C:\Users\Administrator\Desktop\pawno\include\Zipline.inc(69) : error 017: undefined symbol "Iter_Single@zip_Index"
C:\Users\Administrator\Desktop\pawno\include\Zipline.inc(69) : fatal error 107: too many error messages on one line

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.