You are viewing an old version of this page. Return to the latest version.
Version of 21:42, 12 May 2013 by I need to Update My Profile
No categories assigned
LUA:CastEntityCommand
- Last edited 12 years ago by I need to Update My Profile
LUA Functions: CastEntityCommand()
Casts an entity command on the target
Syntax
CastEntityCommand(param1, param2, param3)
Parameters
- Required - param1 (Spawn), param2 (Spawn), param3 (String)
- param1 is the caster of the entity command, must be a player
- param2 is the target of the entity command
- param3 is the entity command
Usage
function used(Item, Spawn)
target = GetTarget(Spawn)
if target ~= nil then
CastEntityCommand(Spawn, target, "Test entity command")
end
end
This item script will cast the "Test entity command" entity command on the players target when the item is used