Forum

> > CS2D > General > How to make cs2d script, vote a map pressing F4
Forums overviewCS2D overviewGeneral overviewLog in to reply

English How to make cs2d script, vote a map pressing F4

10 replies
To the start Previous 1 Next To the start

old Re: How to make cs2d script, vote a map pressing F4

Polygon3D
BANNED Off Offline

Quote
Well first you need to add a hook. (addhook("hook", "func"))

The main hook you require is serveraction(id, title, button).

As for the menu it's 'menu(id, "title, id, b1,b2,b3...,b9").

I recommend adding @b to the end of the title (bigger menu).

And | Info after the end of the button. (Caption and sub-caption.)

You need to think about...

---> Same number of votes return?
---> No one votes return?
---> What maps are being selected?
---> How many maps are there to vote from?


Good luck, I already have a 5 vote map script, except it picks 5 random maps from cs2d/maps, and it's trigger on the 15th round and switches on 16th.

old Re: How to make cs2d script, vote a map pressing F4

RyceR
User Off Offline

Quote
example for menu on F4 for you...
1
2
3
4
5
6
addhook("serveraction","rr_act")
function rr_act(id,action)
	if action == 3 then
		menu(id,"Menu,1,2,3,4,5,6,7,8,9")
	end
end
But try ask happy camper - i know you want script like from [HC] Construction server.
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview