Garry's Mod

Garry's Mod

Control Map Entities - Entity:fire() E2 Function (Wiremod / ent_fire)
Sykken 2014 年 10 月 6 日 上午 8:08
E2 Hacker Buddy help
I saw this addon and I though to myself: "You know what would be great? If I could make a hacker chip that floats next to you and helps you out by hacking turrets and unlocking doors for you?

So I worked on it for a while, and right now I'm a bit stumped and I was hoping you guys could help. I'm trying to make it so upon detecting a chat command it instantly welds itself to an entity and prints out the type of entity and thus it's inputs for easy manipulation, and this works absolutely fine on player props, but it doesn't want to weld to world (I am using E2 constraint core on workshop for all the welds). Any ideas as to how I might go about world-welding in a way that still allows me to control them using entity:isWeldedTo():fire()?
< >
正在显示第 1 - 2 条,共 2 条留言
.⁧⁧Zenny 2015 年 11 月 7 日 下午 10:58 
Maybe use this:

interval(100)

if(owner():lastSaid() == "chat command goes here" & owner():aimEntity():isValid()) {
entity():setPos(owner():aimEntity:pos()) #This may put the E2 chip inside the prop/entity.
weld(entity() , owner():aimEntity())
timer("Hack" , randint(100,1000)) #Random time between 1/10 of a second an 1 second.
}

if(clk("Hack")) {
entity():isWeldedTo():fire("fire command here")
}

I wrote this insde this chat box so I have not tested it. It may not work.

- ZenithGames³
最后由 .⁧⁧Zenny 编辑于; 2015 年 11 月 7 日 下午 10:59
Sykken 2015 年 11 月 20 日 上午 10:13 
I'll try it, thanks bro
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50