Forum

> > CS2D > Scripts > Auto give wrench
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Auto give wrench

38 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Re: Auto give wrench

Masea
Super User Off Offline

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

alt Re: Auto give wrench

GeoB99
Moderator Off Offline

Zitieren
@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')
2× editiert, zuletzt 22.07.16 09:34:39

alt Re: Auto give wrench

kerker
User Off Offline

Zitieren
user Masea hat geschrieben
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

alt Re: Auto give wrench

Mora
User Off Offline

Zitieren
user kerker hat geschrieben
user Masea hat geschrieben
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

alt Re: Auto give wrench

GeoB99
Moderator Off Offline

Zitieren
@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
.

alt Re: Auto give wrench

Baloon
GAME BANNED Off Offline

Zitieren
user Yates hat geschrieben
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

alt Re: Auto give wrench

Yates
Reviewer Off Offline

Zitieren
user Baloon hat geschrieben
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

alt Re: Auto give wrench

Mora
User Off Offline

Zitieren
@user Yates:
user kerker hat geschrieben
How to make when player spawn he was given a wrench? (lua)

user kerker hat geschrieben
given a wrench? (lua)

user kerker hat geschrieben
(lua)

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

alt Re: Auto give wrench

Yates
Reviewer Off Offline

Zitieren
@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
1× editiert, zuletzt 23.07.16 16:09:24

alt Re: Auto give wrench

Yates
Reviewer Off Offline

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

user Yates hat geschrieben
He never said what he wants

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

alt Re: Auto give wrench

Masea
Super User Off Offline

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

alt Re: Auto give wrench

kerker
User Off Offline

Zitieren
user Masea hat geschrieben
@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 hat geschrieben
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
Zitat
"spawn" with lua..
I said "Lua" because I do not really understand, is how to do it.
Dudes, sorry of my bad English.

alt Re: Auto give wrench

Yates
Reviewer Off Offline

Zitieren
@user Masea:
user kerker hat geschrieben
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.
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht