Forum
CS2D Scripts if say !buyinf then...if say !buyinf then...
4 replies 1
robed has written
is there any script like someone say !buyinf then unlimited ammo will work only for them
mp_infammo affects everyone.
However you can use lua to only give infinite ammo to a certain player.
Here I made a quick script.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
addhook("reload","_reload") addhook("say","_say") addhook("join","_join") t_infammo={} function _reload(id,mode) 	if mode==2 then 		if t_infammo[id]==true then 			parse("equip "..id.." "..player(id,"weapontype")) 		end 	end end function _say(id,message) 	if message=="!buyinf" then 		msg2(id, "You have infinite ammo now.") 		t_infammo[id]=true 	end end function _join(id) 	t_infammo[id]=false end
EDIT: Should work. >:D
edited 1×, last 06.07.11 09:28:41 am
Apache uwu has written
1
parse("equip "..id.." "..player(id,"weapontype")
Shame on you! There should be an extra parenthesis at the end.
1