MTA:Eir/functions/createCivilian

From Multi Theft Auto: Wiki
Revision as of 19:50, 17 December 2013 by Arran Fortuna (talk | contribs) (Created page with "__NOTOC__ This function creates a civilian. A civilian is a ped that acts like it would in single player. ==Syntax== <syntaxhighlight lang="lua"> civilian createCivilian ( int model, float x...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function creates a civilian. A civilian is a ped that acts like it would in single player.

Syntax

civilian createCivilian ( int model, float x, float y, float z, float rot )

Arguments

  • model: A whole integer specifying the GTASA skin ID.
  • x, y, z: position vector on the GTA:SA world
  • rot: Rotation on the Z axis of the civilian.

Returns

Returns a civilian if successfully created, false otherwise.

Example

Click to collapse [-]
Client

This snippet creates a civilian and warps the local player to it.

local myBuilding = createCivilian( 7, 0, 0, 10 );
setElementPosition( localPlayer, 0, 0, 12 );