Extends

Learn more about our custom alt:V Internal Extends

Introduction

We created some extends for alt:V Internals. This will help you to do some basic stuff without the boilerplate. Extending means that we create new methods and properties on internal alt:V classes

Extending classes in TypeScript is done by overriding the prototype of a class like Player or Vehicle.

Our Extends

alt.Player

We created some methods that are available on each Player Instance.

// This is available on each player instance
// With this, you can emit event direct to player without
// needed player param
player.emit('yourEventName', 'arg1', 'arg2','arg3')

alt.Colshape

The colshape has a new property to attach a name to it.

// If you want to interact with the colshape decorators
// set name to your ColShape
const colShape = new ColshapeCylinder(0,0,0,3,2);
colShape.name = 'yourColshape';

Last updated