Spoiler
addhook("always","hudding")
function hudding()
for i=1,player_count do
if rules=="1 kill" then
cfight="1 kill - "..player(challenger,"name").." vs "..player(challenging,"name")..""
end
if rules=="3 kills" then
cfight="3 kills - "..player(challenger,"name").." "..score1..":"..score2.." "..player(challenging,"name")..""
end
if rules=="1 min" then
cfight="1 minute fest - "..player(challenger,"name").." "..score1..":"..score2.." "..player(challenging,"name").." Time left: "..time2..":"..time..""
end
if rules=="3 min" then
cfight="3 minute madness - "..player(challenger,"name").." "..score1..":"..score2.." "..player(challenging,"name").." Time left: "..time2..":"..time..""
end
if racetable=={} then
crace=""..racetable.." is waiting for players to race with!"
end
if racetable~={} then
crace=""..racetable.." are waiting for the race to start! Come and join! "..time.." seconds left!"
end
hudtxt2(i,3,COLOR_NORMAL,"Current fight: "..cfight.."",30,400,LEFT)
hudtxt2(i,3,COLOR_NORMAL,"Current race: "..crace.."",30,410,LEFT)
hudtxt2(i,2,COLOR_NORMAL,"Houses RPG v12 by mat5b",200,40,CENTER)
end
end
-- race function is properly triggered
function race(id)
if racetable=={} then
racetable={""..player(id,"name")..""}
crace=""..racetable.." is waiting for players to race with!"
elseif racetable~={} then
time=20
pos=pos+1
table.insert(racetable,""..pos..","..player(id,"name").."")
crace=""..racetable.." are waiting for the race to start! Come and join! "..timer2.." seconds left!"
end
end
function hudding()
for i=1,player_count do
if rules=="1 kill" then
cfight="1 kill - "..player(challenger,"name").." vs "..player(challenging,"name")..""
end
if rules=="3 kills" then
cfight="3 kills - "..player(challenger,"name").." "..score1..":"..score2.." "..player(challenging,"name")..""
end
if rules=="1 min" then
cfight="1 minute fest - "..player(challenger,"name").." "..score1..":"..score2.." "..player(challenging,"name").." Time left: "..time2..":"..time..""
end
if rules=="3 min" then
cfight="3 minute madness - "..player(challenger,"name").." "..score1..":"..score2.." "..player(challenging,"name").." Time left: "..time2..":"..time..""
end
if racetable=={} then
crace=""..racetable.." is waiting for players to race with!"
end
if racetable~={} then
crace=""..racetable.." are waiting for the race to start! Come and join! "..time.." seconds left!"
end
hudtxt2(i,3,COLOR_NORMAL,"Current fight: "..cfight.."",30,400,LEFT)
hudtxt2(i,3,COLOR_NORMAL,"Current race: "..crace.."",30,410,LEFT)
hudtxt2(i,2,COLOR_NORMAL,"Houses RPG v12 by mat5b",200,40,CENTER)
end
end
-- race function is properly triggered
function race(id)
if racetable=={} then
racetable={""..player(id,"name")..""}
crace=""..racetable.." is waiting for players to race with!"
elseif racetable~={} then
time=20
pos=pos+1
table.insert(racetable,""..pos..","..player(id,"name").."")
crace=""..racetable.." are waiting for the race to start! Come and join! "..timer2.." seconds left!"
end
end
It said it couldn't concatenate global 'racetable' (a table value)...
edited 1×, last 05.11.09 05:48:31 pm