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, param4)
Parameters
- Required - param1 (Spawn), param2 (Spawn), param3 (int32), param4 (String)
- param1 is the caster of the entity command, must be a player
- param2 is the target of the entity command
- param3 is the id of the list in the database
- param4 is the command you want to cast
Usage
function used(Item, Spawn)
target = GetTarget(Spawn)
if target ~= nil then
CastEntityCommand(Spawn, target, 1, "Test entity command")
end
end
This item script will cast the "Test entity command" entity command from list 1 on the players target when the item is used