Git Product home page Git Product logo

rewind's Introduction

Rewind

sampctl

A rewind/time machine script that takes you back a few steps/actions! Includes textdraws and 3D text labels.

Installation

Simply install to your project:

sampctl package install RogueDrifter/Rewind

Include in your code and begin using the library (Only in one script):

#include <Rewind>

Usage

Callbacks:

public OnPlayerRewindForPlayer(playerid, forplayerid);
public OnPlayerStartRewind(playerid);
public OnPlayerFinishRewind(playerid);

public OnPlayerFastRewind(playerid);
public OnPlayerFinishFastRewind(playerid);

Functions:

ShowTimeMachineSynced(playerid);
HideTimeMachineSynced(playerid);

StartRewinding(playerid);
StartRecordingRewindSynced(playerid);

bool:IsPlayerInvolvedInRewind(playerid);
bool:IsPlayerRewinding(playerid);
bool:IsPlayerFastRewinding(playerid);

ToggleRewindFlash(bool:toggle);
ToggleRewindFlashForPlayer(playerid, bool:toggle);

ToggleRewindCameraMove(bool:toggle);
ToggleRewindCameraMoveForPlayer(playerid, bool:toggle);

ToggleRewindAuto(bool:toggle);
ToggleRewindAutoForPlayer(playerid, bool:toggle);

ToggleWorldRewind(bool:toggle);
ToggleWorldRewindForPlayer(playerid, bool:toggle);

More add-ons:

#define REWIND_MAXIMUM_PHASES [NUMBER] //Can be changed just put the line with your number before the include.
#define REWIND_CHOOSING_DIALOG [NUMBER] //Dialog ID for the fast rewind you can change for whatever reason
#define REWiND_FULLY_SYNCED_TIMER [NUMBER] //This is in MS you can change it depending on how fast you want the timers to record/play
#define SYNCEED_REWIND_BUFFER [NUMBER] //This is the capacity of the fast rewind cells, don't change this if you don't know what you're doing

Testing

To test, simply run the package:

sampctl package run

Extras

1- A timer that rolls over to sync all player's ability to rewind.

2- Textdraws that define the rewind ability.

3- 3D Text labels to mark for other players your ability to rewind.

Currently supports vehicle interactions (not full) and on-foot interactions (not full either) but goes back up to 29 takes with an audio stream and a flashing extra textdraw.

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.