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

10 replies
Goto Page
To the start Previous 1 Next To the start
Up
Crash13
User
Offline Off
Who know how i can make a script in Notepad, and what need to write to vote a map pressing F4 in notepad?
|MD| Construction | 85.25.34.242:36963 - Enter all for VIPS, MODS etc
15.12.10 08:09:41 pm
Up
Banaan
User
Offline Off
First question is easy: open Notepad and start typing, then simply save it as script.lua (I assume you want to create a Lua script)

The second question should be asked in the Lua help thread.
15.12.10 08:15:32 pm
Up
Refresh
User
Offline Off
go to options and controls
15.12.10 08:24:43 pm
Up
Crash13
User
Offline Off
Refresh has written:
go to options and controls


crister_012 said:
Me need to make script no to put at Controls
|MD| Construction | 85.25.34.242:36963 - Enter all for VIPS, MODS etc
16.12.10 08:16:46 pm
Up
Polygon3D
BANNED
Offline Off
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.
18.12.10 01:31:02 pm
Up
Crash13
User
Offline Off
thx. but make me pls....i want a example
|MD| Construction | 85.25.34.242:36963 - Enter all for VIPS, MODS etc
18.12.10 01:36:16 pm
Up
dev1las
User
Offline Off
hmm rly i need example too


IMG:http://www.forum-signatures.com/wizard/Sigs/2010/final1292671248175.jpg
IMG:http://www.forum-signatures.com/wizard/Sigs/2010/final1292671248175.jpg
18.12.10 01:45:16 pm
Up
RyceR
User
Offline Off
example for menu on F4 for you...
Code:
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.
IMG:http://img704.imageshack.us/img704/4043/userbargimp.png
18.12.10 08:15:49 pm
Up
Crash13
User
Offline Off
RyceR i love u, but when 1 player vote map need autochange, but i push on map and nothing.
edited 1×, last 18.12.10 08:32:49 pm
|MD| Construction | 85.25.34.242:36963 - Enter all for VIPS, MODS etc
19.12.10 11:52:58 am
Up
Yamaxanadu
User
Offline Off
You need to type in the name of the map (EX : De_Dust2)
Back in business, and I'll try not to be the Enigmatic asshole that i used to be....I hope
22.12.10 01:22:19 pm
Up
Crash13
User
Offline Off
how?
|MD| Construction | 85.25.34.242:36963 - Enter all for VIPS, MODS etc
To the start Previous 1 Next To the start