null, bool, int, uint, long, ulong, double, string, object
All types above as an array, eg. int [] or string[]
Furthermore Dictionaries with string-Type as Key, eg. Dictionary<string, object>
But also all interfaces of the API or extend these, eg. IEntity, IVehicle, IBlip, ICheckpoint, ...
Alt.On("test", args => { Alt.Log("args=" + args[0]); });
Alt.Emit("test", "bla");Alt.On<string>("test", str => { Alt.Log("str=" + str); });
Alt.Emit("test", "bla");Alt.On("test", delegate(string str){ Alt.Log("str=" + str); });
Alt.Emit("test", "bla");Alt.On<string>("test", bla);
void bla(string str) {
Alt.Log("str=" + str);
}
Alt.Emit("test", "bla");The first Generics (in our example below int and string) are the Types for the parameters, the last generic (bool) is the return-type.
Note: Return types are optional at events
Alt.On<int, string, bool>("test", (number, str) => {
Alt.Log("str=" + str + " - " + number);
return true;
});| Parameter Name | Type | Description |
|---|---|---|
| checkpoint | ICheckpoint |
|
| entity | IEntity |
|
| state | bool |
true = Entersfalse = Exit |
| Parameter Name | Type | Description |
|---|---|---|
| entity | IEntity |
| Parameter Name | Type | Description |
|---|---|---|
| player | IPlayer |
|
| reason | string |
| Parameter Name | Type | Description |
|---|---|---|
| player | IPlayer |
|
| attacker | IEntity |
|
| weapon | uint |
|
| damage | byte |
| Parameter Name | Type | Description |
|---|---|---|
| player | IPlayer |
|
| killer | IEntity |
|
| weapon | uint |
| Parameter Name | Type | Description |
|---|---|---|
| player | IPlayer |
|
| reason | string |
| Parameter Name | Type | Description |
|---|---|---|
| vehicle | IVehicle |
|
| player | IPlayer |
|
| oldSeat | sbyte |
|
| newSeat | sbyte |
| Parameter Name | Type | Description |
|---|---|---|
| vehicle | IVehicle |
|
| player | IPlayer |
|
| seat | sbyte |
| Parameter Name | Type | Description |
|---|---|---|
| vehicle | IVehicle |
|
| player | IPlayer |
|
| seat | sbyte |
IBlip Alt.CreateBlip(IPlayer player, byte type, IEntity entityAttach)
IBlip Alt.CreateBlip(IPlayer player, byte type, Position pos)| Parameter Name | Type | Description |
|---|---|---|
| player | IPlayer |
|
| type | byte |
|
| entityAttach | byte |
|
| pos | Position |
Type: IBlip
Description: -
ICheckpoint Alt.CreateCheckpoint(IPlayer player, byte type, Position pos, float radius, float height, Rgba color)| Parameter Name | Type | Description |
|---|---|---|
| player | IPlayer |
|
| type | byte |
|
| pos | Position |
|
| radius | float |
|
| height | float |
|
| color | Rgba |
Type: ICheckpoint
Description: -
IVehicle Alt.CreateVehicle(VehicleHash vehicleHash, Position pos, float heading)
IVehicle Alt.CreateVehicle(uint model, Position pos, float heading)| Parameter Name | Type | Description |
|---|---|---|
| vehicleHash | VehicleHash |
|
| pos | Position |
|
| heading | float |
|
| model | uint |
Type: IVehicle
Description: -
void Alt.Emit(string eventName, params object[] args)| Parameter Name | Type | Description |
|---|---|---|
| eventName | string |
|
| args | params object[] |
None
void Alt.EmitAllClients(string eventName, params object[] args)| Parameter Name | Type | Description |
|---|---|---|
| eventName | string |
|
| args | params object[] |
None
Dictionary<IntPtr,IBlip>.ValueCollection Alt.GetAllBlips()None
Type: Dictionary<IntPtr,IBlip>.ValueCollection
Description: -
Dictionary<IntPtr,ICheckpoint>.ValueCollection Alt.GetAllCheckpoints()None
Type: Dictionary<IntPtr,ICheckpoint>.ValueCollection
Description: -
Dictionary<IntPtr,IPlayer>.ValueCollection Alt.GetAllPlayers()None
Type: Dictionary<IntPtr,IPlayer>.ValueCollection
Description: -
Dictionary<IntPtr,IVehicle>.ValueCollection Alt.GetAllVehicles()None
Type: Dictionary<IntPtr,IVehicle>.ValueCollection
Description: -
void Alt.Log(string message)| Parameter Name | Type | Description |
|---|---|---|
| message | string |
None
bool Alt.RemoveEntity(Entity entity)| Parameter Name | Type | Description |
|---|---|---|
| entity | Entity |
Type: bool
Description: -