Giter Site home page Giter Site logo

item's Introduction

Item

A feature-rich item library with an massively extensive API.

A complex and flexible script to replace the use of pickups as a means of displaying objects that the player can pick up and use. Item offers picking up, dropping and even giving items to other players. Items in the game world consist of static objects combined with buttons from SIF/Button to provide a means of interacting.

Item aims to be an extremely flexible script offering a callback for almost every action the player can do with an item. The script also allows the ability to add the standard GTA:SA weapons as items that can be dropped, given and anything else you script items to do.

When picked up, items will appear on the character model bone specified in the item definition. This combines the visible aspect of weapons and items that are already in the game with the scriptable versatility of server created entities.

Overview

  • See the docs for in-depth information on extending the library and advanced topics.

  • See the code for function reference and documentation.

This library provides a rich set of tools for interactive entities in the world that have real, physical and tangible existence. This original idea was to counter the typical video-game-ness of spinning pickups or glowing orbs. This means that items are represented using in-game objects. Another major difference is that players interact with these objects actively rather than passively. What does this mean? When you walk through a typical pickup created with CreatePickup, the effect is realised immediately, with no negotiation from the player. This may have uses in some gamemodes but this library takes a different approach. Items in this library require pressing a key to pick up, pressing a key to use and pressing a key to drop. This is probably better suited to more realistic gamemodes such as roleplay rather than more arcade style gamemodes like TDM.

Another note regarding the design behind the way things work: this library has been used in production and refined since 2012. During this time, the design of the library has evolved and matured to a point where features adhere to a sort of guideline (almost a spec, although it's in my head!). Because of this, there will be very few changes. The library serves a purpose and is very extensible -- almost every facet of how the interface works can be customised or disabled in some way. It's a very powerful set of tools and basically underpins not only most of the Scavenge and Survive gameplay mechanics but also the fundamental design philosophies behind how users interact with the game.

On the topic of extensions, another benefit to this library is there are a ton of existing libraries to save you development time, including:

Usage

(A quick-start tutorial is in the works!)

Installation

Simply install to your project:

sampctl package install ScavengeSurvive/item

Include in your code and begin using the library:

#include <item>

Testing

To test, simply run the package:

sampctl package run

And connect to localhost:7777 to test.

item's People

Contributors

kolor4do avatar mysy00 avatar realstandal avatar southclaws avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.