Forum

> > CS2D > Scripts > License
Forums overviewCS2D overview Scripts overviewLog in to reply

English License

28 replies
Page
To the start Previous 1 2 Next To the start

old License

Spook MQ Hacker
BANNED Off Offline

Quote
Guy i have a question for you.

can you make a script in license for $16000 ONLY?

Comment me for sure.

ok?

old Re: License

Nem
User Off Offline

Quote
He means rpg servers, where you need to have license to make shop.

old Re: License

Fossil
User Off Offline

Quote
LOL this guy dont know nothin about lua scripts... no offense

old Re: License

Kel9290
User 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
function a()
	local t = {}
	for i = 1, 32 do
		t[i]=0
	end
	return t
end

license=a()

addhook("say","licensesay")
function licensesay(i,t)
	if t=="!license" then
		if player(i,"money")==16000 then
			msg2(i,"You got license :E")
			parse("setmoney "..i.." 0")
			license[i]=1
		else
			msg2(i,"You not have enough money!@C")
		end
	end
end

addhook("leave","lleave")
function lleave(i)
	license[i]=0
end

old Re: License

Kel9290
User 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
adminlist={xxxxx}

function adm(id)
	for _, usgn in ipairs(adminlist) do
		if player(id,'usgn') == usgn then
			return 1
		end
	end
	return 0
end

addhook("serveraction","sv")
function sv(id,a)
	if a==3 then
		if adm==1 then
			local rot = player(id,"rot")
			if rot < -90 then rot = rot + 360 end
				local angle = math.rad(math.abs( rot + 90 )) - math.pi
				local x = player(id,"x") + math.cos(angle) * 10
				local y = player(id,"y") + math.sin(angle) * 10
			if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
				parse("setpos "..id.." "..x.." "..y)
			end
		end
	end
end

old Re: License

Bowlinghead
User Off Offline

Quote
Now I know why I have a bowlinghead:
At every time I see idiot questions then I bang my head vs. the table xDD.

Here try this!
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
adminlist={63171}

function adm(id)
     for _, usgn in ipairs(adminlist) do
          if player(id,'usgn') == usgn then
               return 1
          end
     end
     return 0
end

addhook("serveraction","sv")
function sv(id,a)
     if a==3 then
          if adm==1 then
               local rot = player(id,"rot")
               if rot < -90 then rot = rot + 360 end
                    local angle = math.rad(math.abs( rot + 90 )) - math.pi
                    local x = player(id,"x") + math.cos(angle) * 10
                    local y = player(id,"y") + math.sin(angle) * 10
               if x > 0 and y > 0 and x < map("xsize") * 32 and y < map("ysize") * 32 then
                    parse("setpos "..id.." "..x.." "..y)
               end
          end
     end
end

old Re: License

Bowlinghead
User Off Offline

Quote
Wtf.. O_o?
Copy this Code from above and file it in "[Scriptname].lua". Then do it into CounterStrike2D/sys/lua/[Scriptname].lua.
Then run cs2d - new game - more settings - mp_luaserver - [Scriptname].lua - Run Server

old Re: License

Klin
User Off Offline

Quote
It should be a FAQ about LUA.
Copy and Paste the code into your LUA script.

Klin

Too late...
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview