Spoiler function array(m)
local array = {}
for i = 1, m do
array[i] = 0
end
return array
end
player_count=game('sv_maxplayers')
haximg=array(player_count)
selected=array(player_count)
addhook("select","inithaxgun")
function inithaxgun(id,typ,mode)
if typ==51 then
haximg[id]=image("gfx/computer.png",-10000,-10000,200+id)
selected[id]=1
else
selected[id]=0
end
end
addhook("attack","throw")
function throw(id)
if selected[id]==1 then
parse('sv_sound HAX.ogg') -- Play Weapon Sound
imagepos(haximg[id],player(id,"x")+5,player(id,"y")+5,0)
selected[id]=0
end
end
addhook("projectile","implode")
function implode(id,weapon,x,y)
imagepos(haximg[id],x,y,0)
parse("explosion "..x.." "..y.." 32 1000 "..id)
end