Jump to content

Code Snippets (Developer Resource)


liverlande

Recommended Posts

This thread can be used to post "snippets" - a small amount of code that is either almost or fully independent of the script it's used in. Unless otherwise specified, snippets hold the following terms:

 

Credit must be given to the author of the snippet if used in another project
Posting a snippet gives the above license for use

 

Snippets:

 

Name: RandomCallouts
Author: LiverLande
Description: Caches all callouts and adds a function for calling a random callout.

Requirements: LSPDFR 0.3.1
Link: https://gist.github.com/RiverGrande/d27b7506d5eb1372e53f1840a8a647c8

 

Name: WaitForDismissal
Author: LiverLande
Description: Monitors all stopped Peds and waits until they're dismissed.

Requirements: LSPDFR 0.4.0
Link: https://gist.github.com/RiverGrande/712b8678baf6b6365ffa8e9c56b63134

 

Name: OnScreenKeyboard
Author: NoNameSet
Description: Draws a keyboard on the users screen (used in such things as the cheat menu)
Link: https://gist.github.com/NoNameSet/33dbed309e48428e8b5d498fa15165fa

 

Name: SynchronizedScene
Author: NoNameSet
Description: Plays synchronized animations (animations that are meant to be used to play together, like the cuffing animation)
Link: https://gist.Github.com/NoNameSet/048d8d7bac259236c25f6280a9918ce0

 

Name: Trains
Author: NoNameSet
Description: A class to easily create trains 
Link: https://gist.github.com/NoNameSet/0a90a9652643c795abe30fb23c187640

 

Name: PursuitExtensions
Author: NoNameSet
Description: Pursuit extension methods
Link: https://gist.github.com/NoNameSet/046464b917b3bc8f181fe5c9e6fa1a85

 

Post with the following format to have a snippet added to the main post:
Name:
Author:
Description:
Link:

 

Using GitHub gists is recommended for ease of use and access - discussion regarding snippets is also allowed in this thread. The goal is to produce a valuable resource for developers to share code.

Edited by liverlande
Link to comment
Share on other sites

Nice thread, I guess I've got a few gists to share that could help someone eventually:

 

Name: OnScreenKeyboard
Author: NoNameSet
Description: Draws a keyboard on the users screen (used in such things as the cheat menu)
Link: https://gist.github.com/NoNameSet/33dbed309e48428e8b5d498fa15165fa

 

Name: SynchronizedScene
Author: NoNameSet
Description: Plays synchronized animations (animations that are meant to be used to play together, like the cuffing animation)
Link: https://gist.github.com/NoNameSet/048d8d7bac259236c25f6280a9918ce0

 

Name: Trains
Author: NoNameSet
Description: A class to easily create trains 
Link: https://gist.github.com/NoNameSet/0a90a9652643c795abe30fb23c187640

 

Name: PursuitExtensions
Author: NoNameSet
Description: Pursuit extension methods
Link: https://gist.github.com/NoNameSet/046464b917b3bc8f181fe5c9e6fa1a85

 

Edited by NoNameSet
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...