Forum

> > CS2D > Scripts > Multiple serveractions
Forums overviewCS2D overview Scripts overviewLog in to reply

English Multiple serveractions

4 replies
To the start Previous 1 Next To the start

old Multiple serveractions

Alistaire
User Off Offline

Quote
How to use multiple serveractions?

1
2
3
4
5
6
7
function MM.serveraction(id,action)
	if MM.serveraction==1 then
		MM.classmenu(id)
	elseif MM.serveraction==2 then
		MM.commandmenu(id)
	end
end

doesn't work. It didn't open any menu..

old Re: Multiple serveractions

Apache uwu
User Off Offline

Quote
user Alistaire has written
How to use multiple serveractions?

1
2
3
4
5
6
7
function MM.serveraction(id,action)
	if MM.serveraction==1 then
		MM.classmenu(id)
	elseif MM.serveraction==2 then
		MM.commandmenu(id)
	end
end

doesn't work. It didn't open any menu..


Well you need to reference the local variable.

1
2
3
4
5
6
7
function MM.serveraction(id,action)
	if action==1 then
		MM.classmenu(id)
	elseif action==2 then
		MM.commandmenu(id)
	end
end

old Re: Multiple serveractions

Kel9290
User Off Offline

Quote
Maybe, you just put function before table init (MM={}) or hook (addhook)? Put code at end of script.
More >

Also, maybe you not have these funcs (mm.classmenu and mm.commandmenu)?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview