Forum

> > CS2D > Scripts > if say !buyinf then...
Forums overviewCS2D overview Scripts overviewLog in to reply

English if say !buyinf then...

4 replies
To the start Previous 1 Next To the start

old if say !buyinf then...

robed
User Off Offline

Quote
is there any script like someone say !buyinf then unlimited ammo will work only for them

old Re: if say !buyinf then...

Apache uwu
User Off Offline

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