Forum

> > CS2D > Scripts > Auto give wrench
Forums overviewCS2D overview Scripts overviewLog in to reply

English Auto give wrench

38 replies
Page
To the start Previous 1 2 Next To the start

old Re: Auto give wrench

Masea
Super User Off Offline

Quote
1
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..i.." 74")
end

old Re: Auto give wrench

GeoB99
Moderator Off Offline

Quote
@user Masea: Your script will lead to unexpected behaviours, technically speaking.
equip
should NEVER be used within cs2d lua hook 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
function WrenchItemSpawn()
  return '74'
end

addhook('spawn', 'WrenchItemSpawn')
edited 2×, last 22.07.16 09:34:39 am

old Re: Auto give wrench

kerker
User Off Offline

Quote
user Masea has written
1
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..i.." 74")
end

Ugly.
Right:
1
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..id.." 74")
end

old Re: Auto give wrench

Mora
User Off Offline

Quote
user kerker has written
user Masea has written
1
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..i.." 74")
end

Ugly.
Right:
1
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy(i)
	parse("equip "..id.." 74")
end


Ugly,
right

1
2
3
4
addhook("spawn","forlazyguy")
function forlazyguy()
	return 74
end

old Re: Auto give wrench

GeoB99
Moderator Off Offline

Quote
@user kerker: *facepalm* It's funny how you've posted the user Masea's code and I bet you didn't even look at my post. Your code will utterly fail due to
equip
.

old Re: Auto give wrench

Baloon
GAME BANNED Off Offline

Quote
user Yates has written
Guys, 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.

@user kerker: yeah your code is 100% right, joke lol

old Re: Auto give wrench

Yates
Reviewer Off Offline

Quote
user Baloon has written
When 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

old Re: Auto give wrench

Mora
User Off Offline

Quote
@user Yates:
user kerker has written
How to make when player spawn he was given a wrench? (lua)

user kerker has written
given a wrench? (lua)

user kerker has written
(lua)

He wants it from "spawn" with lua.. you ain't a master
deal with it

old Re: Auto give wrench

Yates
Reviewer Off Offline

Quote
@user Mora: Game mode 3, construction, automatically gives people wrench on spawn.

Go read the docs, m8

@user 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 04:09:24 pm

old Re: Auto give wrench

Yates
Reviewer Off Offline

Quote
@user Masea: Oh my here you fucking come along. READ two posts back (my posts).

user Yates has written
He never said what he wants

Meaning he never said what game mode. So my code is still correct.

old Re: Auto give wrench

Masea
Super User Off Offline

Quote
@user Yates: You didn't understand me again as always, not surprisingly. I was trying to say other codes has handy than yours.

old Re: Auto give wrench

kerker
User Off Offline

Quote
user Masea has written
@user 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.
user Masea has written
addhook("spawn","forlazyguy")
function forlazyguy(i)
parse("equip "..i.." 74")
end

user Yates Yeah, it works. But need to the players are not reborn again.
user Mora
Quote
"spawn" with lua..
I said "Lua" because I do not really understand, is how to do it.
Dudes, sorry of my bad English.

old Re: Auto give wrench

Yates
Reviewer Off Offline

Quote
@user Masea:
user kerker has written
How 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.
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview