Create2DColShape

From GT-MP
Jump to: navigation, search
Create2DColShape
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Creates a 2D collision shape which checks whether an entity is inside of a rectangular area, where height does not count.

Dialog-warning.png

Note: If shared API was used when creating, then the created entities are not deleted on ResourceStop


Syntax

In C#
Server-Side Function

API.create2DColShape(float x, float y, float width, float height);

Required Arguments

  • x parameter input should be in float type.
  • y parameter input should be in float type.
  • width parameter input should be in float type.
  • height parameter input should be in float type.


  • NOTE: This function returns data in Rectangle2DColShape type.
  • NOTE: X is the Width and Y is the Height
Icon-info.png
The actual height is from the lowest to the highest point on the map

Resource for Debug


Usage example

In C#
Server-Side Function

API.create2DColShape(float x, float y, float width, float height);

References