.
Scripts
Changing the menu commands, models ..
Changing the menu commands, models ..
1

Re: Changing the menu commands, models ..--First we need initArray function
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i] = 0
	end
return array
end
orc=initArray(32)
elf=initArray(32)
human=initArray(32)
undead=initArray(32)
--Make some menu when spawning
Addhook("spawn","chooserace")
function chooserace(id)
	menu("Choose race,Orc,Elf,Human,Undead")
end
--What happens when you choose race
addhook("menu","racecheck")
function racecheck(id,menu2,sel)
	if menu2=="Choose race" then
		if sel==1 then
			orc[id]=1
		end
		if sel==2 then
			elf[id]=1
		end
		if sel==3 then
			human[id]=1
		end
		if sel==4 then
			undead[id]=1
		end
	end
end
--That do players cant choose 5 classes in one time
addhook("ms100","unglitch")
function unglitch()
	for id=1,32 do
		if orc[id]==1 then
			human[id]=0
			elf[id]=0
			undead[id]=0
		end
		if elf[id]==1 then
			orc[id]=0
			undead[id]=0
			human[id]=0
		end
		if human[id]==1 then
			orc[id]=0
			elf[id]=0
			undead[id]=0
		end
		if undead[id]==1 then
			human[id]=0
			orc[id]=0
			elf[id]=0
		end
	end
end
--Now we need edit skills
addhook("spawn","skills")
function skills(id)
	if orc[id]==1 then
		parse("setmaxhealth "..id.." 150")
		parse("speedmod "..id,," -5")
	end
	if elf[id]==1 then
		parse("setmaxhealth "..id.." 50")
		parse("speedmod "..id.." +15")
	end
	if human[id]==1 then
		parse("setmaxhealth "..id.." 100")
		parse("speedmod "..id,," "0")
	end
	if undead[id]==1 then
		parse("setmaxhealth "..id.." 250")
		parse("speedmod "..id,," "-25")
	end
end
Re: Changing the menu commands, models ..--First we need initArray function
function initArray(m)
local array = {}
for i = 1, m do
array[i] = 0
end
return array
end
orc=initArray(32)
elf=initArray(32)
human=initArray(32)
undead=initArray(32)
--Make some menu when spawning
Addhook("spawn","chooserace")
function chooserace(id)
menu(id,"Choose race,Orc,Elf,Human,Undead")
end
--What happens when you choose race
addhook("menu","racecheck")
function racecheck(id,menu2,sel)
if menu2=="Choose race" then
if sel==1 then
orc[id]=1
end
if sel==2 then
elf[id]=1
end
if sel==3 then
human[id]=1
end
if sel==4 then
undead[id]=1
end
end
end
--That do players cant choose 5 classes in one time
addhook("ms100","unglitch")
function unglitch()
for id=1,32 do
if orc[id]==1 then
human[id]=0
elf[id]=0
undead[id]=0
end
if elf[id]==1 then
orc[id]=0
undead[id]=0
human[id]=0
end
if human[id]==1 then
orc[id]=0
elf[id]=0
undead[id]=0
end
if undead[id]==1 then
human[id]=0
orc[id]=0
elf[id]=0
end
end
end
--Now we need edit skills
addhook("spawn","skills")
function skills(id)
if orc[id]==1 then
parse("setmaxhealth "..id.." 150")
parse("speedmod "..id,," -5")
end
if elf[id]==1 then
parse("setmaxhealth "..id.." 50")
parse("speedmod "..id.." +15")
end
if human[id]==1 then
parse("setmaxhealth "..id.." 100")
parse("speedmod "..id,," "0")
end
if undead[id]==1 then
parse("setmaxhealth "..id.." 250")
parse("speedmod "..id,," "-25")
end
end
Re: Changing the menu commands, models ..
Re: Changing the menu commands, models ..
1
