Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-strohm committed Sep 26, 2017
2 parents 9a2d1a0 + 3004220 commit ca77b2b
Show file tree
Hide file tree
Showing 58 changed files with 4,264 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

# Created by https://www.gitignore.io/api/node,jetbrains

### JetBrains ###
.idea

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


# End of https://www.gitignore.io/api/node,jetbrains
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# types-ragemp-client
## Clientside definitions

[![Discord](https://discordapp.com/api/guilds/183979885788659713/widget.png)](https://discord.gg/A5exBRX) ![As of](https://img.shields.io/badge/As%20of-23.09.2017-green.svg)
56 changes: 56 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/// <reference path="types/MP.d.ts" />
/// <reference path="types/MP.Blip.d.ts" />
/// <reference path="types/MP.Browser.d.ts" />
/// <reference path="types/MP.Camera.d.ts" />
/// <reference path="types/MP.Checkpoint.d.ts" />
/// <reference path="types/MP.Colshape.d.ts" />
/// <reference path="types/MP.Entity.d.ts" />
/// <reference path="types/MP.Events.d.ts" />
/// <reference path="types/MP.Game.d.ts" />
/// <reference path="types/MP.Game.App.d.ts" />
/// <reference path="types/MP.Game.Audio.d.ts" />
/// <reference path="types/MP.Game.Brain.d.ts" />
/// <reference path="types/MP.Game.Cam.d.ts" />
/// <reference path="types/MP.Game.Controls.d.ts" />
/// <reference path="types/MP.Game.Cutscene.d.ts" />
/// <reference path="types/MP.Game.Datafile.d.ts" />
/// <reference path="types/MP.Game.Decisionevent.d.ts" />
/// <reference path="types/MP.Game.Decorator.d.ts" />
/// <reference path="types/MP.Game.Dlc1.d.ts" />
/// <reference path="types/MP.Game.Dlc2.d.ts" />
/// <reference path="types/MP.Game.Entity.d.ts" />
/// <reference path="types/MP.Game.Fire.d.ts" />
/// <reference path="types/MP.Game.Gameplay.d.ts" />
/// <reference path="types/MP.Game.Graphics.d.ts" />
/// <reference path="types/MP.Game.Interior.d.ts" />
/// <reference path="types/MP.Game.Itemset.d.ts" />
/// <reference path="types/MP.Game.Mobile.d.ts" />
/// <reference path="types/MP.Game.Object.d.ts" />
/// <reference path="types/MP.Game.Pathfind.d.ts" />
/// <reference path="types/MP.Game.Ped.d.ts" />
/// <reference path="types/MP.Game.Player.d.ts" />
/// <reference path="types/MP.Game.Recorder.d.ts" />
/// <reference path="types/MP.Game.Rope.d.ts" />
/// <reference path="types/MP.Game.Script.d.ts" />
/// <reference path="types/MP.Game.Stats.d.ts" />
/// <reference path="types/MP.Game.Streaming.d.ts" />
/// <reference path="types/MP.Game.System.d.ts" />
/// <reference path="types/MP.Game.Time.d.ts" />
/// <reference path="types/MP.Game.UI.d.ts" />
/// <reference path="types/MP.Game.Unk.d.ts" />
/// <reference path="types/MP.Game.Vehicle.d.ts" />
/// <reference path="types/MP.Game.Water.d.ts" />
/// <reference path="types/MP.Game.Weapon.d.ts" />
/// <reference path="types/MP.Game.Worldprobe.d.ts" />
/// <reference path="types/MP.Game.Zone.d.ts" />
/// <reference path="types/MP.Marker.d.ts" />
/// <reference path="types/MP.Object.d.ts" />
/// <reference path="types/MP.Ped.d.ts" />
/// <reference path="types/MP.Pickup.d.ts" />
/// <reference path="types/MP.Player.d.ts" />
/// <reference path="types/MP.Pool.d.ts" />
/// <reference path="types/MP.Quaternion.d.ts" />
/// <reference path="types/MP.Vector3.d.ts" />
/// <reference path="types/MP.Vehicle.d.ts" />

declare const mp: ScriptContext;
19 changes: 19 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "types-ragemp-client",
"version": "0.0.1",
"description": "Clientside definitions",
"main": "",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Pet-Platoon/types-ragemp-client.git"
},
"author": "pet-platoon",
"license": "GPL-3.0",
"bugs": {
"url": "https://github.com/Pet-Platoon/types-ragemp-client/issues"
},
"homepage": "https://github.com/Pet-Platoon/types-ragemp-client#readme"
}
61 changes: 61 additions & 0 deletions types/MP.Blip.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/// <reference path="../index.d.ts" />

declare interface MpBlip extends MpEntity {
setColour(blip: MpBlip, color: number): void;
setNameToPlayerName(blip: MpBlip, player: MpPlayer): void;
setShowCone(blip: MpBlip, toggle: boolean): void;
setSecondaryColour(blip: MpBlip, r: number, g: number, b: number): void;
getNextInfoId(blip: MpBlip): MpBlip;
getFirstInfoId(blip: MpBlip): MpBlip;
getInfoIdDisplay(blip: MpBlip): number;
getSprite(blip: MpBlip): number;
setCategory(blip: MpBlip, index: MpBlipCategory | number): void;
setAsMissionCreator(blip: MpBlip, toggle: boolean): void;
isMissionCreator(blip: MpBlip): boolean;
setFade(blip: MpBlip, opacity: number, duration: number): void;
setFlashesAlternate(blip: MpBlip, toggle: boolean): void;
setAlpha(blip: MpBlip, alpha: number): void;
getInfoIdEntityIndex(blip: MpBlip): MpEntity | object;
setRoute(blip: MpBlip, enabled: boolean): void;
hideNumberOn(blip: MpBlip): void;
getCoords(blip: MpBlip): MpVector3;
setShowHeadingIndicator(blip: MpBlip, toggle: boolean): void;
setAsFriendly(blip: MpBlip, toggle: boolean): void;
getHudColour(blip: MpBlip): number;
pulse(blip: MpBlip): void;
addTextComponentSubstringName(blip: MpBlip): void;
setRouteColour(blip: MpBlip, colour: number): void;
setDisplay(blip: MpBlip, displayId: number): void;
getAlpha(blip: MpBlip): number;
getInfoIdPickupIndex(blip: MpBlip): MpPickup;
showNumberOn(blip: MpBlip, number: number): void;
isFlashing(blip: MpBlip): boolean;
doesExist(blip: MpBlip): boolean;
setFlashInterval(blip: MpBlip, p1: object): void;
setCoords(blip: MpBlip, posX: number, posY: number, posZ: number): void;
setPriority(blip: MpBlip, priority: number): void;
setFlashes(blip: MpBlip, toggle: boolean): void;
setBright(blip: MpBlip, toggle: boolean): void;
endTextCommandSetName(blip: MpBlip): void;
setAsShortRange(blip: MpBlip, toggle: boolean): void;
getInfoIdType(blip: MpBlip): number;
setScale(blip: MpBlip, scale: number): void;
setFlashTimer(blip: MpBlip, duration: number): void;
isShortRange(blip: MpBlip): boolean;
getColour(blip: MpBlip): number;
setSprite(blip: MpBlip, spriteId: number): void;
setHighDetail(blip: MpBlip, toggle: boolean): void;
isOnMinimap(blip: MpBlip): boolean;
setNameFromTextFile(blip: MpBlip, gxtEntry: string): void;
setRotation(blip: MpBlip, rotation: number): void;
}

declare interface MpBlipPool extends MpPool<MpBlip> {

}

declare enum MpBlipCategory {
noTextOrDistance = 1,
text = 2,
noDistance = 3
}
15 changes: 15 additions & 0 deletions types/MP.Browser.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/// <reference path="../index.d.ts" />

declare interface MpBrowser {
url: string;
active: boolean;

reload(ignoreCache: boolean): void;
execute(executedCode: string): void;
destroy(): void;
markAsChat(): void;
}

declare interface MpBrowserPool extends MpPool<MpBrowser> {
'new'(url: string): MpBrowser;
}
87 changes: 87 additions & 0 deletions types/MP.Camera.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/// <reference path="../index.d.ts" />

declare interface MpCamera extends MpEntity {
getDirection(): MpVector3;
setActive(active: boolean): void;
isRendering(): boolean;
isInterpolating(): boolean;
setUseShallowDofMode(toggle: boolean): void;
setDebugName(name: string): void;
getFarDof(): number;
setDofMaxNearInFocuxDistanceBlendLevel(p0: number): void;
setDofPlanes(p0: number, p1: number, p2: number, p3: number): void;
setNearDof(nearDof: number): void;
setAnimCurrentPhase(phase: number): void;
setInheritRollVehicle(p1: boolean): void;
setCoord(posX: number, posY: number, posZ: number): void;
pointAt(entity: MpEntity, offsetX: number, offsetY: number, offsetZ: number, p4: boolean): void;
setDofStrength(dofStrength: number): void;
attachToPedBone(ped, boneIndex: number, x: number, y: number, z: number, heading: boolean): void;
pointAtPedBone(ped, boneIndex: number, x: number, y: number, z: number, heading: boolean): void;
shake(type: MpCameraShake | string, amplitude: number): void;
isShaking(): boolean;
setMotionBlurStrength(strength: number): void;
getRot(p0: object): MpVector3;
setDofFnumberOfLens(p1: number): void;
setRot(rotX: number, rotY: number, rotZ: number, p3: number): void;
destroy(destroy?: boolean): void;
setAffectsAiming(toggle: boolean): void;
playAnim(animName: string, animDictionary: string, x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, p8: object, p9: number): void;
setActiveWithInterp(camFrom: MpCamera, duration: number, easeLocation: number, easeRotation: number): void;
getAnimCurrentPhase(): number;
animatedShake(p0: string, p1: string, p2: string, p3: number): void;
detach(): void;
doesExist(): boolean;
setFarClip(farClip: number): void;
setFov(fieldOfView: number): void;
getSplinePhase(): number;
getFarClip(): number;
getCoord(): MpVector3;
stopShaking(p0: boolean): void;
setParams(x: number, y: number, z: number, xRot: number, yRot: number, zRot: number, duration: number, p8: object, p9: object, p10: object): void;
getFov(): number;
setDofMaxNearInFocusDistance(p0: number): void;
getNearClip(): number;
setDofFocusDistanceBias(p0: number): void;
setNearClip(nearClip: number): void;
isPlayingAnim(animName: string, animDictionary: string): boolean;
setShakeAmplitude(amplitude: number): void;
isActive(): boolean;
setFarDof(farDof: number): void;
stopPointing(): void;
pointAtCoord(x: number, y: number, z: number): void;
attachTo(entity: MpEntity | object, xOffset: number, yOffset: number, zOffset: number, isRelative: boolean): void;
}

declare interface MpCameraPool extends MpPool<MpCamera> {

}

declare enum MpCameraName {
defaultScriptedCamera = 'DEFAULT_SCRIPTED_CAMERA',
defaultAnimatedCamera = 'DEFAULT_ANIMATED_CAMERA',
defaultSplineCamera = 'DEFAULT_SPLINE_CAMERA',
defaultScriptedFlyCamera = 'DEFAULT_SCRIPTED_FLY_CAMERA',
timedSplinedCamera = 'TIMED_SPLINE_CAMERA'
}

declare enum MpCameraShake {
deathFailInEffectShake = 'DEATH_FAIL_IN_EFFECT_SHAKE',
drunkShake = 'DRUNK_SHAKE',
family5DrugTripShake = 'FAMILY5_DRUG_TRIP_SHAKE',
handShake = 'HAND_SHAKE',
joltShake = 'JOLT_SHAKE',
largeExplosionShake = 'LARGE_EXPLOSION_SHAKE',
mediumExplosionShake = 'MEDIUM_EXPLOSION_SHAKE',
smallExplosionShake = 'SMALL_EXPLOSION_SHAKE',
roadVibrationShake = 'ROAD_VIBRATION_SHAKE',
skyDivingShake = 'SKY_DIVING_SHAKE',
vibrateShake = 'VIBRATE_SHAKE'
}

declare enum MpCameraView {
thirdPersonClose = 0,
thirdPersonMid = 1,
thirdPersonFar = 2,
firstPerson = 3
}
9 changes: 9 additions & 0 deletions types/MP.Checkpoint.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference path="../index.d.ts" />

declare interface MpCheckpoint extends MpEntity {

}

declare interface MpCheckpointPool extends MpPool<MpCheckpoint> {

}
9 changes: 9 additions & 0 deletions types/MP.Colshape.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/// <reference path="../index.d.ts" />

declare interface MpColshape extends MpEntity {

}

declare interface MpColshapePool extends MpPool<MpColshape> {

}
Loading

0 comments on commit ca77b2b

Please sign in to comment.