Giter Club home page Giter Club logo

pcgpolicecode's Introduction

pcgpolicecode

Description

A resource for MTASA that plays the police radio reports for wanted players, made for Prime Freeroam.

The only known missing zones are Jefferson and Creek.

Exported functions

playCrimeReport(player, id [, volume = 0.4 ])

Plays the initial report that contains a ten-code and the location of the player. Eg. "We got a 10-21 in Los Santos".

Arguments

  • player = Player element the report is about.
  • id = Valid crime ID is 1-8 and 10.
  • volume = Optional argument.

Returns the total duration of the audio in milliseconds if successful, false otherwise.


playLastSeenDescription(player [, volume = 0.4 ])

Plays the description of the player, eg. "Suspect last seen in a white 4-door".

Arguments

  • player = Player element the description is about.
  • volume = Optional argument.

Returns the total duration of the audio in milliseconds if successful, false otherwise.


playLastSeenLocation(player [, volume = 0.4 ])

Plays the last seen location of the player, eg. "Suspect last seen in Los Santos".

Arguments

  • player = Player element the location is about.
  • volume = Optional argument.

Returns the total duration of the audio in milliseconds if successful, false otherwise.

Example usage

This example plays a crime report and suspect description as heard in police vehicles in GTASA.

local resource = getResourceFromName("pcgpolicecode")
local crimeReportDuration = call(resource, "playCrimeReport", localPlayer, 1)
if crimeReportDuration then
	setTimer(call, crimeReportDuration, 1, resource, "playLastSeenDescription", localPlayer)
end

pcgpolicecode's People

Contributors

commendatore1 avatar zangomangu avatar lopezloo avatar

Stargazers

mateo avatar Nurupo avatar

Watchers

James Cloos avatar

Forkers

lopezloo

pcgpolicecode'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.