Auto equip on spawn
14 replies



10.11.17 02:03:10 pm
Hello
, i just wanted to ask if there's a way to auto equip GasMasks on spawn.
Thanks for the help.

Thanks for the help.

Admin/mod comment:
Thread moved. /
@
apex2d:
By Auto-Equipping he means Lua Scripts, not Console Commands.

By Auto-Equipping he means Lua Scripts, not Console Commands.
It's about time i ditch this account, i've been hiding my identity for too long. I shall spread the news for the people of the Unrealsoftware Community to do the same. Join me, and together we may fight for a new future of the Community, Prevail.
i suck at codes but
Pls don't open the Spoiler
this is the nearest result
That code will spawn a Gaskmask Beneath you
Pls don't open the Spoiler
this is the nearest result

That code will spawn a Gaskmask Beneath you

Eat Sleep Conquer Repeat. www.Radeon2D.forumid.net
@
apex2d: yes you are.
As yates mentioned, there is also example how to use it on link he provide:

Code:
1
2
3
4
2
3
4
addhook("spawn","Equip_")
function Equip_(id)
return 60
end
function Equip_(id)
return 60
end
As yates mentioned, there is also example how to use it on link he provide:

Waiting summer, my demobilization from the army is in jule 7-th.
@
apex2d: If you're suck at it, why you needed to post on this thread? Or are you also suck as can't even think you shouldn't have done this?

Create and design your GUI easy and fast:
GUI Framework (12) | Go deep of the darkness and try your intrepidity:
Outlast 2 Modification (26)




oi dont hate on me i just asked cause im worse than a first time coder.but how the hell do i code it with triggers?

@
PersonNamedVictor: He's not talking to you. Notice how his message starts with @
apex2d
The code Mora gave you should suffice unless you need more.


The code Mora gave you should suffice unless you need more.
i know i meant how do i use the code mora gave. like do i put it in the console? do i put a special ent or trigger?
cause i want the ct's in my map to instantly come with a gasmask on them.
so it fits the lore of the map more
cause i want the ct's in my map to instantly come with a gasmask on them.
so it fits the lore of the map more

Gas Masks aren't actually equipable though. If it is as well as up to
spawn hook.
I could share the code but I'm not at the home now. It basically would be about spawning a gas mask under the player and set player position to anywhere and set back to the original position. And you'll eventually be equipped with a gas mask.

I could share the code but I'm not at the home now. It basically would be about spawning a gas mask under the player and set player position to anywhere and set back to the original position. And you'll eventually be equipped with a gas mask.
Create and design your GUI easy and fast:
GUI Framework (12) | Go deep of the darkness and try your intrepidity:
Outlast 2 Modification (26)




Here you are:
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("spawn", "_spawn")
function _spawn(p)
parse("spawnitem 56 "..player(p, "tilex").." "..player(p, "tiley"))
local x, y = player(p, "tilex"), player(p, "tiley")
parse("setpos "..p.." "..(player(p, "tilex") + 0.5) * 32 + 16 .." ".. (player(p, "tiley") + 0.5) * 32 + 16)
parse("setpos "..p.." "..x * 32 + 16 .." ".. y * 32 + 16)
end
function _spawn(p)
parse("spawnitem 56 "..player(p, "tilex").." "..player(p, "tiley"))
local x, y = player(p, "tilex"), player(p, "tiley")
parse("setpos "..p.." "..(player(p, "tilex") + 0.5) * 32 + 16 .." ".. (player(p, "tiley") + 0.5) * 32 + 16)
parse("setpos "..p.." "..x * 32 + 16 .." ".. y * 32 + 16)
end
Talented Doge
Eat Sleep Conquer Repeat. www.Radeon2D.forumid.net



