Forum

> > CS2D > Scripts > A script bug
Forums overviewCS2D overview Scripts overviewLog in to reply

English A script bug

8 replies
To the start Previous 1 Next To the start

old A script bug

Xirot
User Off Offline

Quote
Well , I'm not a scripter.
And I don't know scripting/codding.
Who can help me doing this :
1. I want to make a small command for every rank.
!off (to hide the rank say and talk normaly) !on (to run the say color).
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
Admins = {xxxxx}
Modertors = {xxxxx}
Members = {44770}

addhook("say", "rankSay")
function rankSay(id, text)
	
	local _, i;
	for _, i in ipairs(Admins) do
		if (i == player(id, "usgn")) then
			msg("©255255255" .. player(id,"name") .. " [Admin]: " .. text)
			return 1;
		end
	end		
                    
	for _, i in ipairs(Modertors) do
		if (i == player(id, "usgn")) then
			msg("©034252010" .. player(id,"name") .. " [Modertor]: " .. text)
			return 1;
		end
	end
	
	for _, i in ipairs(Members) do
		if (i == player(id, "usgn")) then
			msg("©25212310" .. player(id,"name") .. " [Member] " .. text)
			return 1;
		end
	end
end

old Re: A script bug

limonata
User Off Offline

Quote
Here is the script. Sorry for some tab mistakes.

Commands:

- !on
- !off
--------
Spoiler >
edited 1×, last 10.06.13 07:39:13 pm

old Re: A script bug

limonata
User Off Offline

Quote
If he dont know anything about lua. So it might be hard to edit your script for him.

old Re: A script bug

Rainoth
Moderator Off Offline

Quote
user Xirot has written
@user limonata:
36:'then'expected near mod.


He wrote "is Mod" instead of "isMod"
Function name makes a big difference. It's just a small mistake
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview