Here is my question:
I made a new script, but I need help.
I want, if you open the menu and choose "Spawn random headcrabs" then 30 headcrabs spawn. But only after 10 seconds...
Example:
spawn headcrab
wait 10 seconds
spawn headcrab
wait 10 seconds
spawn headcrab
... until 30 headcrabs
I know, its work with timer but i dont know how.
That works:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("second","Lol") function Lol() 	if headcrab==1 then 		spawn=math.random(1,map("ysize")) 		spawn2=math.random(1,map("xsize")) 		spawn3=math.random(1,360) 		parse("spawnnpc 2 "..spawn2.." "..spawn.." "..spawn3) 	end end
But then the NPC 2 (Headcrab) spawn only one time...
----------------------------------
That don't work:
Error:
1
LUA ERROR: attempt to call a number value
Or an other question:
In my timer there are 4 parameters. But I need only the 1st,2nd and the 4th. How can I "delete" the 3rd parameter?