📄️ Overview
This section contains information about APIs available to both the client and server scripts.
📄️ Events
These event APIs allow you to send and receive data between different scripts or resources. Events only work cross-resources within the same context. For example:
📄️ JSON
JSON.Stringify(data string
📄️ Modules
Modules are a great way to share static data, functions, classes, and other functionality between scripts. Modules work on client, server, and shared scripts.
📄️ NetObject
Represents a networked entity.
📄️ NetObjectBase
Base class for all networked entities.
📄️ NetObjectType
The NetObjectType enum represents different types of network objects in the game. This is used with the NetObjectBase:GetType() method to determine the type of a network object.
📄️ NetPlayer
This class reprecents a player on the server.
📄️ NetPlayerBase
The base class for network players that provides common functionality for accessing player information.
📄️ NetVehicle
Network representation of a vehicle in the game. NetVehicle inherits from NetObject and provides vehicle-specific functionality.
📄️ PlayerClient
A player's client instance. You can use this class to get information about the player, such as their NetPlayer.
📄️ Players
These APIs allow you to interface with Players in the game.
📄️ Resource
See Resources.GetAll() to get a list of all resources.
📄️ ResourceAction
See the server event PlayerResourceAction for more information.
📄️ Resources
These APIs allow you to manage and control resources on the server. Resources are individual packages or modules that contain game logic, scripts, and assets.
📄️ ResourceStatus
The status of a resource. See Resource:GetStatus() for more information.
📄️ Timer
The Timer module provides global methods for creating and managing timers that can execute functions after a specified delay.
📄️ vec2
This class represents a two dimensional vector (x and y). It is often used to represent 2D screen coordinates.
📄️ vec3
This class represents a three dimensional vector (x, y, and z). It is often used to represent world coordinates in the game.
📄️ vec4
This class represents a four dimensional vector (x, y, z, and w). It is often used to represent colors (red, green, blue, and alpha).
📄️ VehiclePart
The vehicle part slots. These define the different articulated parts that can be found on vehicles. See the OnVehiclePartChangedState event for more information.
📄️ VehiclePartState
The state of a vehicle part. See the OnVehiclePartChangedState event for more information.
📄️ WeaponSlot
WeaponSlot is global enum that represents the different weapon slots in JC4MP.
🗃️ Weather
3 items