Forum

> > CS2D > Scripts > Nick Team
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Nick Team

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Nick Team

OutstandingPP
BANNED Off Offline

Zitieren
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

alt Re: Nick Team

kerker
User Off Offline

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

alt Re: Nick Team

THEMUD
User Off Offline

Zitieren
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.

alt Re: Nick Team

Rainoth
Moderator Off Offline

Zitieren
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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht