Forum

> > CS2D > General > Zombie Gas Grenade
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Zombie Gas Grenade

13 replies
To the start Previous 1 Next To the start

old Zombie Gas Grenade

CrazyPenguin
User Off Offline

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

old Re: Zombie Gas Grenade

apex2d
User Off Offline

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

old Re: Zombie Gas Grenade

Casper-
User Off Offline

Quote
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.

old Re: Zombie Gas Grenade

CrazyPenguin
User Off Offline

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

old Re: Zombie Gas Grenade

Rainoth
Moderator Off Offline

Quote
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
edited 2×, last 22.12.17 05:37:11 pm

old Re: Zombie Gas Grenade

CrazyPenguin
User Off Offline

Quote
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)

old Re: Zombie Gas Grenade

Rainoth
Moderator Off Offline

Quote
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

old Re: Zombie Gas Grenade

CrazyPenguin
User Off Offline

Quote
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 ?

old Re: Zombie Gas Grenade

Rainoth
Moderator Off Offline

Quote
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 √
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview