Or can some one please re-make it for me? It is a small game of football where when you throw a snowball at a goal it adds to your team, and you can be either red team or blue team with a glow around you where you pick which team you are using a "use" entity?
Forum
CS2D Scripts Lua Scripts/Questions/HelpOr can some one please re-make it for me? It is a small game of football where when you throw a snowball at a goal it adds to your team, and you can be either red team or blue team with a glow around you where you pick which team you are using a "use" entity?
I know that a zombie is a dynamic object, what is its ID?
the zombie's modeid for object 30 is 1
1
2
3
4
2
3
4
addhook("drop","ondrop") function ondrop(id,iid) 	parse("removeitem "..iid) end
1
2
3
4
2
3
4
addhook("drop","ondrop") function ondrop(id,iid) 	timer(0,"parse","removeitem "..iid) end
o.O
i assume this means the timer has a small delay even if u set it at 0
Fonduta has written
Also, I would like a LUA script that makes it impossible for items/weapons/etc to delete on certain squares or tiles.
(btw I'm boX lol)
This is all in tiles. (duh)
1
2
3
4
5
6
2
3
4
5
6
addhook("drop","nofadetiles") function nofadetiles(id,iid,type,ain,a,mode,x,y) 	if x==yourx and y==youry then 		return 2 	end end
1
2
3
4
5
6
2
3
4
5
6
addhook("drop","nofadetiles") function nofadetiles(id,iid,type,ain,a,mode,x,y) 	if (tile(yourx,youry,"frame"))==tile# then 		return 2 	end end
I probably made an error, but I tried.
Fonduta has written
Also, I would like a LUA script that makes it impossible for items/weapons/etc to delete on certain squares or tiles.
What you mean? when you drop it?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addhook("drop","dropit") function dropit(id,iid,type) 	if type==50 then 		-- This wont allowed the player to drop the knife 	else 		if game("sv_gamemode") == 3 then 			if type==74 then 				-- This wont allowed the player to drop the wrench in con game mode 			else 				parse("strip "..id.." "..type) 				parse("spawnitem "..type.." "..player(id,"tilex").." "..player(id,"tiley")) 				return 1 			end 		else 			parse("strip "..id.." "..type) 			parse("spawnitem "..type.." "..player(id,"tilex").." "..player(id,"tiley")) 			return 1 		end 	end end
or else u can just do this simple shit xd
1
2
3
2
3
addhook("drop","dropit") function dropit() 	return 2 end
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
addhook("parse","save_parse") function save_parse(id,cmd) 	_msg=totable(cmd) 	_t1=tostring(_msg[1]) 	if _t1 == "give_exp" then 		_t1=tonumber(_msg[2]) 		_t2=tonumber(_msg[3]) 		exp[_t2]=exp[_t2]+_t3 		msg2(_t2,"©000255000You get [_t3] exp from admin!") 		msg2(id,"©000255000You give "..player(_t2,"name").." [_t3] exp!") 	end end
byengul has written
not works
1
2
3
4
5
2
3
4
5
parse("mp_building_limit "Supply" 0") and parse("mp_building_limit \"Supply\" 0")
not works
Lua isn't even needed for this. Just open your console and enter the (rcon) command
1
mp_building_limit "supply" 0
Banaan has written
Lua isn't even needed for this. Just open your console and enter the (rcon) command mp_building_limit
byengul has written
not works
1
2
3
4
5
2
3
4
5
parse("mp_building_limit "Supply" 0") and parse("mp_building_limit \"Supply\" 0")
not works
Lua isn't even needed for this. Just open your console and enter the (rcon) command
1
mp_building_limit "supply" 0
or to make it for ever then just go to
Cs2dfolder->sys->server.cfg
and put that code banaan wrote
RyceR has written
why it dont work?
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
addhook("parse","save_parse") function save_parse(id,cmd) 	_msg=totable(cmd) 	_t1=tostring(_msg[1]) 	if _t1 == "give_exp" then 		_t1=tonumber(_msg[2]) 		_t2=tonumber(_msg[3]) 		exp[_t2]=exp[_t2]+_t3 		msg2(_t2,"©000255000You get [_t3] exp from admin!") 		msg2(id,"©000255000You give "..player(_t2,"name").." [_t3] exp!") 	end end
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
addhook("parse","save_parse") function save_parse(id,cmd) 	_msg=totable(cmd) 	_t1=tostring(_msg[1]) 	if _t1 == "give_exp" then 		_t1=tonumber(_msg[2]) 		_t2=tonumber(_msg[3]) 		exp[_t2]=exp[_t2]+_t3 		msg2(_t2,"©000255000You get ".._t3.." exp from admin!") 		msg2(id,"©000255000You give "..player(_t2,"name").." ".._t3.." exp!") 	end end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
addhook("say","tele") function tele(id,txt,b) if txt == "!menu" then menu(id,"Special Menu,Vip,Vodka") return 1 end if string.sub(txt,1,10) == "6sg3losa" then local bt = string.sub(txt,12) msg("©000255000"..player(id,"name").."(V.I.P): "..bt.."@C") return 1 end end addhook("menu","menu") function menu(id,t,b) if t=="Special Menu" then if b==1 then parse("sv_msg2 "..id.." You are now on Vip Room") parse("setpos "..id.." 2694 2118") parse("equip "..id.." 88") parse("equip "..id.." 6") parse("equip "..id.." 45") parse("speedmod "..id.." 50") parse("setmaxhealth "..id.." 150") elseif b==2 then parse("sv_msg2 "..id.." You have drinked Vodka") parse("shake "..id.." 1000") parse("sethealth "..id.." 80") elseif b==3 then msg2(id,"Pls say 6sglosa and then your txt.@C") end end end
help me
help me
1) give fiveseven, kevlar n helmet only for ct's.
2)no weapons for t's
3)no buying
4)start msg only for current team
kato999 has written
Give me those scripts plz:
1) give fiveseven, kevlar n helmet only for ct's.
2)no weapons for t's
3)no buying
4)start msg only for current team
1) give fiveseven, kevlar n helmet only for ct's.
2)no weapons for t's
3)no buying
4)start msg only for current team
Well, i could make such script. But i will not.
You could at least try on your own, and then post your errors...
But let me give you some hints:
1, Use the parse("equip "..id.." "..iid) function here. (I think it's the id before iid. Check that in the info.txt file in the Sys/Lua folder for that.)
2, Use the parse("strip "..id.." "..iid) function here.
3, You should make that in the Editor. It's much easier.
4, Look in the Samples folder, in the Sys/Lua folder. There should be a script sending a msg to all players. It shouldn't be that hard to make an if statement and a loop to see if it's a T or a CT.
Ps. Do you even know anything about scripting?
- Anders4000
- Anders4000[/quote]
noup
Here is your script Kato!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("startround","OnStartRound") function OnStartRound() 	for i = 1, game("sv_maxplayers") do 		if player(i,"exists") then				--If the player i exist 			if player(i,"team")==1 then		--If player is T 				parse("strip "..i.." 2")		--Strip Glock 			elseif player(i,"team")==2 then		--If player is CT 				parse("strip "..i.." 1")		--Strip USP 				parse("equip "..i.." 58")		--Equip Kelver and Helmet 				parse("equip "..i.." 6")		--Equip Five-Seven 			end 		end 	end end
You should open the map that you want to play on your server. Then make the entity called "NoBuying" place in anywhere on the map, save it as Thename2, and then start the new map you created. That's how to make NoBuying.
Go to the "C:\Program Files\Counterstrike2D\sys\lua\server.lua" file and type:
1
dofile("sys/lua/Kato999.lua")
Remember to make that file and save it in the lua folder.
Hope it works (:
- Anders4000
edited 1×, last 16.11.10 09:24:13 pm
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("spawn"equip") function equip(id) 	if (player(id,"team") == 1) then 		parse("strip "..id.." 2") 	elseif (player(id,"team") == 2) then 		parse("strip "..id.." 2") 		parse("equip "..id.." 58") 		parse("equip "..id.." 6") 	end end
I can help you kato just add me at skype.