1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("hit","claw_heal") function claw_heal(id,source,weapon,hpdmg,apdmg) if(weapon == 78) then parse ("sethealth "..id.." "..player(id,"health")+30) return 1 end end
edited 1×, last 30.01.11 07:39:36 pm
addhook("hit","claw_heal") function claw_heal(id,source,weapon,hpdmg,apdmg) if(weapon == 78) then parse ("sethealth "..id.." "..player(id,"health")+30) return 1 end end
addhook("hit","claw_heal") function claw_heal(id,source,weapon,hpdmg,apdmg) if(weapon == 78) then parse ("sethealth "..id.." "..player(id,"health")+30) end end
addhook("hit","claw_heal") function claw_heal(id,src,wpn,hpdmg,apdmg) 	if wpn == 78 then 		parse ("sethealth "..src.." "..player(src,"health")+30) 		return 1 	end end
addhook("hit","claw_heal") function claw_heal(id,src,wpn,hpdmg,apdmg) if wpn == 78 then parse ("sethealth "..src.." "..player(src,"health")+30) return 1 end end
addhook("hit","claw_heal") function claw_heal(id,src,wpn,hpdmg,apdmg) 	if wpn == 78 then 		parse ("sethealth "..src.." "..player(src,"health")+30) 		return 1 	end end
if sample==nil then sample={} end bfbc={} ----------------------- -- INITIAL SETUP -- ----------------------- function initArray(m) local array = {} for i = 1, m do array[i]=0 end return array end bfbc.class=initArray(32) function bfbc.classmenu(id) menu(id,"BF:BC2 choose class,Assault|M416-GL,Engineer|M3-Machete(Ammo),Medic|MP5-Claw(Heal),Recon|USP-(Speed),Scout|Barret .50-Mines,Tank|RPG-M249") end ----------------------- -- TEAM -> CLASS -- ----------------------- addhook("team","bfbc.team") function bfbc.team(id,team) if (team>0) then bfbc.classmenu(id) end end ----------------------- -- SERVERACTION -- ----------------------- addhook("serveraction","bfbc.serveraction") function bfbc.serveraction(id) bfbc.classmenu(id) end ----------------------- -- CLASS SELECTION -- ----------------------- addhook("menu","bfbc.menu") function bfbc.menu(id,menu,sel) if (menu=="BF:BC2 choose class") then if (sel>=0 and sel<=7) then bfbc.class[id]=sel if (player(id,"health")>0) then parse("killplayer "..id) 		 parse("setdeaths "..id.." "..player(id,"deaths")-1) 		 return 1 		end end end end ----------------------- -- SPAWN -- ----------------------- addhook("spawn","bfbc.spawn") function bfbc.spawn(id) if (bfbc.class[id]==0) then 	 bfbc.class[id]=math.random(1,7) end 	-- Assault 	if (bfbc.class[id]<=1) then 		parse ("setmaxhealth "..id.." 120") 		parse ("setarmor "..id.." 130") 		parse ("speedmod "..id.." 5") 		return "52,53,54,56,5,49,32,51"; 	end 	-- Engineer 	if (bfbc.class[id]<=2) then 		parse ("setmaxhealth "..id.." 130") 		parse ("setarmor "..id.." 150") 		parse ("speedmod "..id.." 3") 		return "51,54,77,74,3,10,69"; 	end 	-- Medic 	if (bfbc.class[id]==3) then 		parse ("setmaxhealth "..id.." 120") 		parse ("speedmod "..id.." 5") 		return "51,52,54,72,78,4,20,82"; 	end 	-- Recon 	if (bfbc.class[id]==4) then 		parse ("setmaxhealth "..id.." 75") 		parse ("speedmod "..id.." 15") 		return "52,53,54,1,59,84"; 	end 	-- Scout 	if (bfbc.class[id]==5) then 		parse ("setmaxhealth "..id.." 110") 		parse ("setarmor "..id.." 60") 		parse ("speedmod "..id.." 8") 		return "51,53,87,52,1,35,59"; 	end 	-- Tank 	if (bfbc.class[id]==6) then 		parse ("setmaxhealth "..id.." 250") 		parse ("speedmod "..id.." -8") 		return "54,85,3,47,40,81"; 	end end ----------------------- -- NO BUYING -- ----------------------- addhook("buy","bfbc.buy") function bfbc.buy() return 1 end ----------------------- -- NO COLLECTING -- ----------------------- addhook("walkover","bfbc.walkover") function bfbc.walkover(id,iid,type) if (type>=61 and type<=68) then return 0 end return 1 end ----------------------- -- NO DROPPING -- ----------------------- addhook("drop","bfbc.drop") function bfbc.drop() return 1 end ----------------------- -- NO DEAD DROPPING -- ----------------------- addhook("die","bfbc.die") function bfbc.die() return 1 end ---------------------------- -- HURT MSG -- ---------------------------- addhook("hit","bfbc.hit") function bfbc.hit(id,src,wpn,hpdmg) if player(id,"health")-hpdmg < 31 then msg2(id,"©210000000You are hurt.Get Cover !@C") end end -------------------------- --	MEDIC		-- -------------------------- addhook("hit","claw_heal") function claw_heal(id,src,wpn,hpdmg,apdmg) if wpn == 78 then parse ("sethealth "..src.." "..player(src,"health")+30) return 1 end end -------------------------- --	AMMO		-- -------------------------- addhook("attack","bfbc.ammo") function bfbc.ammo(id) if (player(id,"weapontype") == 69) then parse("spawnitem 62 "..player(id,"tilex").." "..player(id,"tiley")) parse("spawnitem 61 "..player(id,"tilex").." "..player(id,"tiley")) end end end
addhook('hit', 'hp') function hp(id,src,wpn) if wpn == 78 then parse("sethealth "..id.." "..player(id,"health")+30) return 1 end end