Forum

> > CS2D > Scripts > Class Tables
Forums overviewCS2D overview Scripts overviewLog in to reply

English Class Tables

1 reply
To the start Previous 1 Next To the start

old Class Tables

Kurumi
User Off Offline

Quote
Maybe someone can give me a script that gives different class menus for each team? Really Thanks!

old Re: Class Tables

DannyDeth
User Off Offline

Quote
I really don't feel like creating an entire example script, but here is some basic theory to the matter ( I am doing so that there is a menu that pops up when you press a serveraction key and when you join a team ) ::

When the serveraction key is pressed, check the team of the player:
1
2
3
4
5
6
7
8
addhook("serveraction","team_classes")
function team_classes(id)
	if player(id,"team")==1 then
		menu(id,"Terrorist Classes!,Class1,Class2")
	elseif player(id,"team")==2 then
		menu(id,"Counter-Terrorist Classes,Class1,Class2")
	end
end
If the player join a team, give him the team classes menu as well as when he presses a serveraction:
1
2
3
4
5
6
7
8
9
addhook("team","team_classes")
addhook("serveraction","team_classes")
function team_classes(id)
	if player(id,"team")==1 then
		menu(id,"Terrorist Classes!,Class1,Class2")
	elseif player(id,"team")==2 then
		menu(id,"Counter-Terrorist Classes,Class1,Class2")
	end
end

There is some theory.
Hope it helped
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview