Scripting/Server/Functions/AddGraffiti

Paints the image (a file name of LU/decals, with or without extension). alpha is 0-255 (default 255), world the virtual world (default 0).

Syntax

AddGraffiti(image, x, y, z, rx, ry, rz, width, height [, alpha [, world]])

Arguments

Returns

integer id, or -1 when the image does not exist or the table (1024) is full

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "addgraffiti" )
	{
		local pos = player.Pos;
		local result = AddGraffiti( "example.png", pos.x, pos.y, pos.z, 0.0, 0.0, 0.0, 100, 100 );
		MessagePlayer( "AddGraffiti returned: " + result, player );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Graffiti (v0.5-beta, PC only)

Categories: Server functions | Graffiti (v0.5-beta, PC only)