Forum

> > CS2D > General > Zombie Gas Grenade
ForenübersichtCS2D-ÜbersichtGeneral-ÜbersichtEinloggen, um zu antworten

Englisch Zombie Gas Grenade

13 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Zombie Gas Grenade

CrazyPenguin
User Off Offline

Zitieren
How do some zombies have gas grenades in zombie mode on bunker map ? Since they can't pick one up

alt Re: Zombie Gas Grenade

apex2d
User Off Offline

Zitieren
You want the Zombies to spawn with Gas Grenade or You want Zombies to pickup Gas Grenades

alt Re: Zombie Gas Grenade

SkullFace
User Off Offline

Zitieren
Well, if you've put like a random math on spawn hook, that way, only sometimes zombies would get a gas grenade on spawn and could help zombies to steer away survivors from ''bunkering'' so much. I actually like that idea.

alt Re: Zombie Gas Grenade

CrazyPenguin
User Off Offline

Zitieren
user Baloon hat geschrieben
Why would zombie pick gas grenade anyways? too overpowered


not if I put a time limit on gas grenade spawn

it makes the game more interesting (also humans have a limited gas mask spawn)

alt Re: Zombie Gas Grenade

Rainoth
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
addhook("walkover","_w")
function _w(id,iid,type)
  if type == 72 then
    parse("equip "..id.." 72")
    parse("removeitem "..iid)
  end
end
2× editiert, zuletzt 22.12.17 17:37:11

alt Re: Zombie Gas Grenade

CrazyPenguin
User Off Offline

Zitieren
It does not seem to work....maybe its conflicting with this code I already run which gives everyone a wrench

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

I also run server settings in this order

1
2
3
mp_luaserver "SpawnWithWrenches.lua"
mp_luaserver "zombieGas.lua"
mp_luaserver "unlimitedbuild.lua"

the "zombieGas.lua" is the one with your code in it


also is "iid" a typo mistake for "id" or it has to be this way

1
parse("removeitem "..iid)

alt Re: Zombie Gas Grenade

Rainoth
Moderator Off Offline

Zitieren
I wrote it via phone so its hard to go in depth.

The reason its not working is because I didnt put space after the word 'function'.

id is player id
Iid is item id
Tye is item type (72 for gas grenade)

Also, your server settings should be dofile commands, not mp_luaserver

alt Re: Zombie Gas Grenade

CrazyPenguin
User Off Offline

Zitieren
but you did put space after function or am I not getting something ?

1
function _w(id,iid,type)

or do you mean space as in here
-> function


also what is a dofile command ?

alt Re: Zombie Gas Grenade

Rainoth
Moderator Off Offline

Zitieren
I fixed it in the code I posted, that's why you look at it now and see that everything's good.
Always check when the posts are edited.

dofile in server.lua to easily run multiple scripts.

What you do:
Put all scripts into 'sys/lua/' directory
Open up 'server.lua' and write
1
dofile("sys/lua/YourScriptName.lua")
Where 'YourScriptName' is the name of your lua script file.
Copy that line and run multiple lua script files like that.
Go to CS2D server settings, go to mp_luaserver, click default and click apply.
Done √
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antwortenGeneral-ÜbersichtCS2D-ÜbersichtForenübersicht