Scripting/Squirrel/Functions/CreateObject
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
This function will create an object.
Syntax
1
CreateObject( model, world, pos, alpha )
2
CreateObject( model, world, x, y, z, alpha )
Arguments
1
- int model - The object model id
- int world - The world id
- Vector pos - The object pos
- int alpha - The object alpha
2
- int model - The object model id.
- int world - The world id.
- float x - The x pos of the object.
- float y - The y pos of the object.
- float z - The z pos of the object.
- int alpha - The object alpha.
Example
The following example create an object
function onPlayerCommand( player, cmd, text );
{
if ( cmd == "obj" )
{
CreateObject( 560, player.World, player.Pos, 255);
}
}
Notes
Call onPlayerCommand were used in this example. More info about them in the corresponding pages.