Forum
Scripts
Auto give wrench
Auto give wrench
38 replies
1
2
3
4
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..i.." 74")
end
Masea: Your script will lead to unexpected behaviours, technically speaking. equipshould NEVER be used within
spawn hook as this hook gives the item specific to the player upon spawn with return. It's documented regarding the matter, really.
1
2
3
4
5
2
3
4
5
function WrenchItemSpawn()
return '74'
end
addhook('spawn', 'WrenchItemSpawn')
edited 2×, last 22.07.16 07:34:39 am
GeoB99: Thanks for reminding me.
Masea has written1
2
3
4
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..i.." 74")
end
Ugly.
Right:
1
2
3
4
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..id.." 74")
end
kerker has written
Masea has written1
2
3
4
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..i.." 74")
end
Ugly.
Right:
1
2
3
4
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..id.." 74")
end
Ugly,
right
1
2
3
4
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy()
	return 74
end
kerker: Your code is actually the wrong, because the id parameter is invalid and undeclared in your code. 1
parse("sv_gamemode 3")
kerker: Learn some lua. When you will back with some knowledge about lua, I will be here.
kerker: *facepalm* It's funny how you've posted the
Masea's code and I bet you didn't even look at my post. Your code will utterly fail due to equip.
Yates has writtenGuys, please. I can shorten all your code:
1
parse("sv_gamemode 3")
When he wants to 1 round 1 spawn? I mean standard game mode.
@
kerker: yeah your code is 100% right, joke lol
Baloon has writtenWhen he wants to 1 round 1 spawn? I mean standard game mode.
He never said what he wants - so my code is 100% correct so I am the MÆSTØR.
Deal with it
Yates:
kerker has writtenHow to make when player spawn he was given a wrench? (lua)
kerker has writtengiven a wrench? (lua)
kerker has written(lua)
He wants it from "spawn" with lua.. you ain't a master
deal with it
Yates: sadly,
Mora said is true lol , he wants from LUA code.
Mora: Game mode 3, construction, automatically gives people wrench on spawn.Go read the docs, m8
@
Baloon: Did you not see my code? That was obviously Lua.I did exactly what the OP wanted. Can't touch this
edited 1×, last 23.07.16 02:09:24 pm
Yates: So what about if he wants play on Zombies! gamemode? Get rekt, m8.
Masea: Oh my here you fucking come along. READ two posts back (my posts).
Yates has writtenHe never said what he wants
Meaning he never said what game mode. So my code is still correct.
Yates: You didn't understand me again as always, not surprisingly. I was trying to say other codes has handy than yours.
Masea has written@
kerker: Learn some lua. When you will back with some knowledge about lua, I will be here.
kerker: Learn some lua. When you will back with some knowledge about lua, I will be here.And?You need to learn Lua.Your script is not work.
Masea has writtenaddhook("spawn","forlazyguy")
function forlazyguy(i)
parse("equip "..i.." 74")
end
function forlazyguy(i)
parse("equip "..i.." 74")
end
Yates Yeah, it works. But need to the players are not reborn again.
Mora Quote
I said "Lua" because I do not really understand, is how to do it."spawn" with lua..
Dudes, sorry of my bad English.
Masea:
kerker has writtenHow to make when player spawn he was given a wrench? (lua) 

That's all he asked. So stop your bullshit - you have your threads for that.
1 
Offline