Forum

> > CS2D > Scripts > Clan tag
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Clan tag

24 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Clan tag

Jabama
User Off Offline

Zitieren
After searching the scripts, I wanted to know if there was a way that a button in f3/f4 could be made saying clan tag ON/OFF (whether it was on or off). It would be amazing if someone could write one. Clan tag=#Lewa |

alt Re: Clan tag

Jynxxx
User Off Offline

Zitieren
I'm guessing this is what you want.
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
Clan = {}

addhook("join","_join")
function _join(id)
	Clan[id] = {clantag = "#Lewa | ", clant = 0}
end

addhook("serveraction","_action")
function _action(id,action)
	if action == 1 then
		if Clan[id].clant == 0 then
			Clan[id].clant = 1
			msg2(id,"©000255000Tag has been turned on!")
		else
			Clan[id].clant = 0
			msg2(id,"©000255000Tag has been turned off!")
		end
	end
end

addhook("say","_say")
function _say(id,text)
	if Clan[id].clant == 1 then
		msg("©255000000"..Clan[id].clantag..""..player(id,"name")..": "..text)
		return 1
	else
     
	end
end

alt Re: Clan tag

Jabama
User Off Offline

Zitieren
Yeah, I mean when I press f3 I get the option, not just when I come on.

alt Re: Clan tag

ExecL
User Off Offline

Zitieren
user Jabama hat geschrieben
Yeah, I mean when I press f3 I get the option, not just when I come on.


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
Clan = {}

addhook("join","_join")
function _join(id)
     Clan[id] = {clantag = "#Lewa | ", clant = 0}
end

addhook("serveraction","_action")
function _action(id,action)
	if action == 1 then
		menu(id,"Clan Tag,On,Off")
	end
end

addhook("menu","_menu")
function _menu(id,title,button) 
	if title == "Clan Tag" then
		if button == 1 then
			if Clan[id].clant == 0 then
				Clan[id].clant = 1
				msg2(id,"©000255000Tag has been turned on!")
			end
		end
		if button == 2 then
			Clan[id].clant = 0
			msg2(id,"©000255000Tag has been turned off!")
		end
	end
end

addhook("say","_say")
function _say(id,text)
     if Clan[id].clant == 1 then
          msg("©255000000"..Clan[id].clantag..""..player(id,"name")..": "..text)
          return 1
     else
     
     end
end

Like this?

alt Re: Clan tag

Jabama
User Off Offline

Zitieren
Yeah, but when I press on it doesn't do anything.

alt Re: Clan tag

Flacko
User Off Offline

Zitieren
I'm guessing this will require a table with all the USGN ids of your members, right?

alt Re: Clan tag

ExecL
User Off Offline

Zitieren
user Jabama hat geschrieben
Yeah, but when I press on it doesn't do anything.


Press F2 and it will open a menu.

alt Re: Clan tag

ExecL
User Off Offline

Zitieren
user Jabama hat geschrieben
Yeah. Is that hard?


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
Clan = {}

addhook("join","_join")
function _join(id)
     Clan[id] = {clantag = "#Lewa | ", clant = 0}
end

addhook("serveraction","_action")
function _action(id,action)
	if action == 2 then
		menu(id,"Clan Tag,On,Off")
	end
end

addhook("menu","_menu")
function _menu(id,title,button) 
	if title == "Clan Tag" then
		if button == 1 then
			if Clan[id].clant == 0 then
				Clan[id].clant = 1
				msg2(id,"©000255000Tag has been turned on!")
			end
		end
		if button == 2 then
			Clan[id].clant = 0
			msg2(id,"©000255000Tag has been turned off!")
		end
	end
end

addhook("say","_say")
function _say(id,text)
     if Clan[id].clant == 1 then
          msg("©255000000"..Clan[id].clantag..""..player(id,"name")..": "..text)
          return 1
     else
     
     end
end

Here, press F3 and it will open a menu

alt Re: Clan tag

Jabama
User Off Offline

Zitieren
Yeah, but when I put it on it says AC550000000 #LeWa | Jabama. And there is no switch.

alt Re: Clan tag

ExecL
User Off Offline

Zitieren
I've tested it and it works fine. whats ur in-game name?

alt Re: Clan tag

ExecL
User Off Offline

Zitieren
Are you pressing F3(key at the top)
If you are, is a menu opening?

like this? "AC550000000 #Lewa | Jabama"

idk how that would happend.

Are you running any other scripts,
and are you putting it in sys/lua/server.lua?

alt Re: Clan tag

Jabama
User Off Offline

Zitieren
Yes a menu is opening, but the buttons don't do anything now.

And Yeah like that.

I was running an admin script, but I've put everything else in the samples, and now it doesn't work at all.

And No I'm not.

cookie

alt Re: Clan tag

ExecL
User Off Offline

Zitieren
make a text file and save it as server.lua in sys/lua and put the lua in there, save it and run cs2d should work now.

dont run any other scripts!

pm me the admin script you were using.
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht