--Diablo script for CS2D by Ultimate Software --
--Beta 1 26.06.2011 00:00 --
--------------------------------------------------------------------------------
if sample==nil then sample={} end
diablo={}
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
he=initArray(32)
--add where name of weapon example:
--m4a1=initArray(32)
--ak47=initArray(32)
--( "--" is comment!!!)
addhook("buy","diablo_buy")
function diablo_buy(pl,weapon)
if weapon==51 then
parse("killplayer "..pl)
he[pl]=1
--add where number(id) of weapon(see it in map editor)
--example:
--elseif weapon==34 then
--parse("killplayer "..pl)
--m4a1[pl]=1
--elseif weapon==33 then
--parse("killplayer "..pl)
--ak47[pl]=1
end
end
addhook("spawn","diablo_spawn")
function diablo_spawn(pl)
if he[pl]==1 then
parse("equip "..pl.." 51")
he[pl]=0
--write where as it writen in example:
--elseif m4a1[pl]==1 then
--parse("equip "..pl.." 34")
--m4a1[pl]=0 L_______the number(id) of weapon
--elseif ak47[pl]==1 then
--parse("equip "..pl.." 35")
--ak47[pl]=0 L_______the number(id) of weapon
end
end
This lua Ultimate programmer it isn wroking
when i buy weapon , I will dont have them forever
Ex:i buy a He ,I died and next time i respawn i dont have a He