Code Monkey home page Code Monkey logo

actor_robbery's Introduction

actor_robbery

sampctl

Table of Contents

Introduction

Inspired by GTA V store robbery. actor_robbery.inc imitates it! You basically aim at the actor and the actor will play 3 animation sequence, the actor will either give you the money or you will leave empty handed.

Installation

Simply install to your project:

sampctl package install Patrick/actor_robbery

Include in your code and begin using the library:

#include <actor_robbery>

Testing

To test, simply run the package:

sampctl package run

Usage

Functions

Function:
	CreateActorRobbery

Info:
	Creates the robbery actor according to the position set.

Param:
* skinid -> Skin ID of the robbery actor
* Float:x -> Coordinate X of the robbery actor
* Float:y -> Coordinate X of the robbery actor
* Float:z -> Coordinate X of the robbery actor
* Float:ang -> Facing angle of the robbery actor
* actor_vwid -> virtualid of the robbery actor
* r_moneymin -> Minimum money to be robbed from the robbery actor
* r_moneymax -> Maximum money to be robbed from the robbery actor

Function:
	GetActorRobberyData

Info:
	Retrieves the actor data

Param:
	* actorid -> ID of robbery actor you want to retrieve data from.
	* &skinid -> Skin ID of the robbery actor
	* &Float:x -> Coordinate X of the robbery actor
	* &Float:y -> Coordinate X of the robbery actor
	* &Float:z -> Coordinate X of the robbery actor
	* &Float:ang -> Facing angle of the robbery actor
	* &actor_vwid -> virtualid of the robbery actor
	* &r_moneymin -> Minimum money to be robbed from the robbery actor
	* &r_moneymax -> Maximum money to be robbed from the robbery actor

Function:
	GetActorFreeID

Info:
	Retrieves the unused ID of an actor.

Param:
	None

Callbacks

//OnPlayerRequestRobbery is called when the player aims at an actor. You can disallow a player from robbing by returning 0.
forward OnPlayerRequestRobbery(playerid, actorid);

//OnPlayerStartRobbery is called when the player aims at an actor after OnPlayerRequestRobbery allows the player to rob.
forward OnPlayerStartRobbery(playerid, actorid, robbed_recently);

//OnPlayerFinishRobbery is called when the 3 animation sequence has been played.
forward OnPlayerFinishRobbery(playerid, actorid, robbedmoney, type);

Animation Sequence

  1. SHP_Rob_HandsUp
  2. SHP_Rob_GiveCash
  3. DUCK_cower

actor_robbery's People

Contributors

madgenius0 avatar patrickgtr avatar weponztv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

actor_robbery's Issues

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.