function sample.gg.start()
-- Reset Values
local i
for i=1,32 do
sample.gg.level[i]=1
sample.gg.kills[i]=0
-- Reset Weapon (Kill)
if (player(i,"exists")) then
-- Strip All Weapons (0)
parse("strip "..i.." 0")
-- Give first Weapon
parse("equip "..i.." "..sample.gg.wpn[1])
-- Strip Knife
parse("strip "..i.." 50")
end
end
end
-----------------------
-- JOIN --
-----------------------
addhook("join","sample.gg.join")
function sample.gg.join(id)
-- Reset
sample.gg.level[id]=1
sample.gg.kills[id]=0
end
-----------------------
-- SPAWN --
-----------------------
addhook("spawn","sample.gg.spawn")
function sample.gg.spawn(id)
-- Minimum Level is 1
if (sample.gg.level[id]<1) then
sample.gg.level[id]=1
end
-- Equip with Weapon for current Level
if (sample.gg.level[id]>0 and sample.gg.level[id]<=10) then
return sample.gg.wpn[sample.gg.level[id]]
end
end
-----------------------
-- KILL --
-----------------------
addhook("kill","sample.gg.kill")
function sample.gg.kill(id)
-- Add Kill
sample.gg.kills[id]=sample.gg.kills[id]+1
-- Next Level?
if (sample.gg.kills[id]>=3) then
-- Reset Kills
sample.gg.kills[id]=0
-- Increase Level
sample.gg.level[id]=sample.gg.level[id]+1
-- Win?
if (sample.gg.level[id]>=#sample.gg.wpn) then
msg("©000255000"..player(id,"name").." has won the game!@C")
parse("restart")
else
-- Give new Weapon
parse("equip "..id.." "..sample.gg.wpn[sample.gg.level[id]])
-- Remove last Weapon
parse("strip "..id.." "..sample.gg.wpn[sample.gg.level[id]-1])
end
end
-- Info
if (sample.gg.level[id]<11) then
msg2(id,"Level: "..sample.gg.level[id].." Kills: "..sample.gg.kills[id])
end
end
hmm next i dont copyed bekuz then been no colecting and more and more