Rainoth has writtendownload the game
What
y u no cs2d?
Scripts
Why doesn't it work?
Rainoth has written
y u no cs2d?
?
Rainoth: Nope.. Milk = {}
addhook("leave","_leave")
function _leave(id)
if Milk[id] ~= nil then
freeimage(Milk[id])
Milk[id] = nil
end
end
addhook("startround","_startround")
function _startround(mode)
for k,v in pairs (player(0,"tableliving")) do
if Milk[v] == nil then
Milk[v] = image("gfx/7hud/full.png",555,300,2)
imagealpha(Milk[v],0.5)
end
end
end
addhook("endround","_endround")
function _endround(mode)
for k,v in pairs (player(0,"table")) do
if Milk[v] ~= nil then
freeimage(Milk[v])
Milk[v] = nil
end
end
end
Rainoth: Yeah this script worked! But it kind of didn't at the same time since I have another script which causes it to disappear too.
§2.1 - No needless and/or doubled posts (spam)
Rainoth has written
Rainoth: I found this:
Rainoth: addhook(roundend,re) function re,id,ball for id = 1,32 do ball = nil end
GeoB99 ball = nil
Rainoth: addhook(endround,er) function er ball = nil end
addhook("endround","er") -- both hooks and function names are texts so you need strings. Strings need quotes (') or (")
function er(mode) -- endround hook has mode argument which you don't need but should write to better understand what the hook provides and what it doesn't
	ball = nil -- tab each new level (function is start so lvl 0, IFs add more depth (level 1,2,3 and so on but you dont have them so tab the declaration once)
end
Rainoth: Thanks =D
Rainoth has writtenMilk = {}
addhook("leave","_leave")
function _leave(id)
if Milk[id] ~= nil then
freeimage(Milk[id])
Milk[id] = nil
end
end
addhook("startround","_startround")
function _startround(mode)
for k,v in pairs (player(0,"tableliving")) do
if Milk[v] == nil then
Milk[v] = image("gfx/7hud/full.png",555,300,2)
imagealpha(Milk[v],0.5)
end
end
end
addhook("endround","_endround")
function _endround(mode)
for k,v in pairs (player(0,"table")) do
if Milk[v] ~= nil then
freeimage(Milk[v])
Milk[v] = nil
end
end
end