Forum

> > Trash > Confused Script
Forums overviewTrash overviewLog in to reply

English Confused Script

No replies
To the start Previous 1 Next To the start

closed moved Confused Script

Ace Howl
User Off Offline

Quote
Hello.
My first script is having problem. It is confusing. Can you fix it?

Here:
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
addhook("say","p_cmd")


admin = {109296}
vip = {}



function Admin(id)
	return table.find(admin, player(id,"usgn"))
end

function VIP(id)
	return table.find(vip, player(id,"usgn"))
end

function PlayerLevel(id)
	if Admin(id) then
		return 5
	elseif VIP(id) then
		return 3
	end
	return 0
end

function p_cmd(id,txt,message)
	if string.sub(txt, 1, 7) == "@freeze" then
		if PlayerLevel(id) >= 5 then
			local p = tonumber(string.match(txt , "@freeze (%d+)"))
			if (p ~= nil) and (player(p,"exist")) then
				parse("speedmod "..p.." -100")
				return 1
			end
		else
			msg2(id,"©125125255ADMINISTRATOR COMMAND")
			return 1
		end
	end
end
The End.
To the start Previous 1 Next To the start
Log in to replyTrash overviewForums overview