Your reward is a
Forum
CS2D General Classes ScriptClasses Script
7 replies 1
Your reward is a
Without code we can't help you!
Code:
----------Menu Open with F2-------
addhook("serveraction","class")
function class(id,actionbutton)
if (actionbutton==1) then
getaction1(id)
end
end
if sample==nil then sample={} end
classesopt={}
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
scriptclassmenu=initArray(32)
function scriptclassesmenu(id)
menu(id,"Select your Class,Killer|AK+M4+Medic Armor,Pwner|AK+M4+Medic armor+Kevlar+Helm,Destroyer|RPG+Grenade Launcher+Medic Armor,Haxer|Secret")
end
----------------------------
addhook("team","classesopt")
function classesopt(id,team)
if (team>0) then
scriptclassesmenu(id)
end
end
-----------------------------------------------------------------
addhook("menu","Classes")
function classesoptsel(id,menu,sel)
if (menu=="SMD Classes") then
if (sel>=0 and sel<=4) then
scriptclassmenu[id]=sel
if (player(id,"health")>0) then
parse('killplayer '..id)
end
end
end
end
-------------Spawn only Melee------------
addhook("spawn","nowep")
function nowep(id)
return no
end
----------------------------------------------------
---------------------------
function getaction1(id)
menu(id,"SDM Classes,Pwner,Killer,Destroyer,Haxer,")
end
---------------------------
addhook("menu","menuaction")
function menuaction(id,m,b)
if m=="SDM Classes" then
------Pwner--------
if b==1 then
---Killer---
parse('equip '..id..' 32 ')
parse('equip '..id..' 82 ')
parse('equip '..id..' 30 ')
--------------------------------------
end
------Killer--------
if b==2 then
---Add Funtion's Here---
parse('equip '..id..' 34 ')
parse('equip '..id..' 30 ')
parse('equip '..id..' 59 ')
parse('equip '..id..' 82 ')
--------------------------------------
end
------destroyer--------
if b==3 then
---Add Function's Here---
parse('equip '..id..' 49 ')
parse('equip '..id..' 47 ')
parse('equip '..id..' 82 ')
--------------------------------------
end
------Haxer--------
if b==4 then
---Add Function's Here---
parse('equip '..id..' 20 ')
parse('equip '..id..' 21 ')
parse('equip '..id..' 22 ')
parse('setmaxhealth '..id..' 250 ')
parse('equip '..id..' 47 ')
parse('equip '..id..' 81 ')
parse('equip '..id..' 41 ')
parse('equip '..id..' 40 ')
parse('equip '..id..' 82 ')
--------------------------------------
end
------Selection 5--------
if b==5 then
---Add Function's Here---
--------------------------------------
-------Every Second Script-------
addhook("second","heal")
function heal(id)
----------Functions-------
parse('setmaxhealth '..id..' 5 ')
------------------------------------
end
end
end
end
use
1
[code][ /code]
Tags!
1. The second hook has no parameter!
1
2
2
addhook("second","heal") function heal(id)
2. Missing 'end'
1
2
3
2
3
------Selection 5-------- if b==5 then ---Add Function's Here---
3. Return "no" ? Do it works (I dont know)
1
2
3
4
2
3
4
addhook("spawn","nowep") function nowep(id) return no end
I dont checkt the whole code just parts...
I think there are more misstakes!
And it mark words like "if" blue... (Like ever lua editor)
1