Forum

> > CS2D > Scripts > Nick Team
Forums overviewCS2D overview Scripts overviewLog in to reply

English Nick Team

4 replies
To the start Previous 1 Next To the start

old Nick Team

OutstandingPP
BANNED Off Offline

Quote
hello guys i just need menu

example first button will be his name "cool"

when player press on it, he will be available to chat
"..player(id,"name").."[ Cool ]:"..txt"
and then he can chat with cool tag forever
but if he didn't press the button he can speak normaly without any tag or rank

hope you understanded me

if you understood me please send for me the code
because i am noob scripting

i know i will make the people crazy because i am the noobest scripter in the world

sorry for my bad english

old Re: Nick Team

kerker
User Off Offline

Quote
Do you mean that when you press the button the player has a tag in the chat and contrariwise?

old Re: Nick Team

THEMUD
User Off Offline

Quote
Try to write your script by your own. Think hard, try to find a way for it, put what you have come up with on a text editor, run it and then inform us with the errors you are facing.

old Re: Nick Team

Rainoth
Moderator Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
learn = {
tags = {"a","b","c"}, -- max 9 entries
hooks = {"menu","serveraction","say","join"},
tag = {}
}

for k,v in pairs (learn.hooks) do
	addhook(v,"learn_"..v)
end

function learn_join(id)
	learn.tag[id] = nil
end

function learn_menu(id,t,b)
	if t == "Tags" then
		learn.tag[id] = b
	end
end

function learn_serveraction(id,b)
	if b==1 then
		local menuString = "Tags"
		for k,v in pairs (learn.tags) do
			if learn.tag[id] == k then
				menuString = menuString .. "," .. "(" .. tags[k] .. ")"
			else
				menuString = menuString .. "," .. tags[k]
			end
		end
		menu(menuString)
		menuString = nil
	end
end

function learn_say(id,txt)
	if learn.tag[id] then
		msg(player(id,"name").."["..learn.tags[learn.tag[id]].."]: "..txt)
	end
end

Try to understand what each part of script does.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview