Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
Forums overviewCS2D overview Scripts overviewLog in to reply

English Lua Scripts/Questions/Help

6,770 replies
Page
To the start Previous 1 2299 300 301338 339 Next To the start

old Admin Script

avander
User Off Offline

Quote
Hello all i need an admin script because i can't make lua's

if u or somebody can help me pls pm me.
thx

old Re: Lua Scripts/Questions/Help

ManuCrazy
User Off Offline

Quote
Hi Guys
yesterday I was rewriting the script for glow (sample)
for use on my server
however, gave an error that could not identify
if you can take a look I thank

(The error is {LUA ERROR: sys/lua/glowbymc.lua:11: ')' expected (to close '(' at line 10) near 'imagealpha'}

the script looks like 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
addhook("say","ad.glow")
function ad.glow(id,txt)
         if(txt=="!glow red") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,255,0,0)
          end
         if(txt=="!glow blue") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,0,0,255)
          end         
         if(txt=="!glow green") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,0,255,0)
          end
         if(txt=="!glow yellow") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,255,220,0)
          end
         if(txt=="!glow white") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,192,192,192)
          end
         if(txt=="!glow red") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,255,0,0)
          end
         if(txt=="!glow purple") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,128,0,128)
          end       
         if(txt=="!glow pink") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,255,0,255)
          end                 
         if(txt=="!glow bblue") then
         freeimage(id)
         id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
         imagescale(id1,1,1)
         imageblend(id1,1
         imagealpha(id1,0.7)
         imagecolor(id1,0,255,255)
          end
end

Thanks'
Potatos For All cookies

old Re: Lua Scripts/Questions/Help

Loooser
User Off Offline

Quote
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
addhook("say","ad.glow")
function ad.glow(id,txt)
if(txt=="!glow red") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,255,0,0)
end
if(txt=="!glow blue") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,0,0,255)
end
if(txt=="!glow green") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,0,255,0)
end
if(txt=="!glow yellow") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,255,220,0)
end
if(txt=="!glow white") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,192,192,192)
end
if(txt=="!glow red") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,255,0,0)
end
if(txt=="!glow purple") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,128,0,128)
end
if(txt=="!glow pink") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,255,0,255)
end
if(txt=="!glow bblue") then
freeimage(id)
id1=image("gfx/sprites/flare2.bmp",0,0,100+id)
imagescale(id1,1,1)
imageblend(id1,1)
imagealpha(id1,0.7)
imagecolor(id1,0,255,255)
end
end
you forgot at each image blend to close it with ')'

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
Hikaru has written
How i can download the !broadcast command script? i can't acess amx2d webpage

When i type !broadcast and put a message everyone can see it

i'm looking for that script


1
2
3
4
5
6
addhook("say","broadcast") function broadcast(id,t)
	if string.sub(t,1,10) == "!broadcast" then
		local bt = string.sub(t,12)
		msg(player(id,"name").."(BROADCAST): "..bt)
	end
end

old Re: Lua Scripts/Questions/Help

Kurumi
User Off Offline

Quote
1.is there a script that makes non turnable off silenceer for usp or m4a1?
2.Is there a script that triggers something when i shoot from non silenced usp or m4a1?

old Re: Lua Scripts/Questions/Help

kNedLiik
User Off Offline

Quote
hey guys I'm making new game mode for a friend and I need help with one part ..
How to make that if someone want join CT he must be usgn logged in but if he want join T he don't need be usgn logged but can join T. If someone no usgn logged try to join CT he can't . But if someone logged join T he can ?

old Re: Lua Scripts/Questions/Help

Banaan
User Off Offline

Quote
kato999 has written
1.is there a script that makes non turnable off silenceer for usp or m4a1?
2.Is there a script that triggers something when i shoot from non silenced usp or m4a1?


1. Do you mean that people can't switch it off? Then they should turn it on first. Otherwise return 1 on the attack2 hook if weapon is usp or m4a1.
2. idk

old Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Quote
kNedLiik has written
I need script for that , only usgn logged in players can join CT pls .


1
2
3
4
5
6
7
8
addhook("spawn","ct_usgn")
function ct_usgn(id)
	if player(id,"team")==2 then
		if player(id,"usgn")>=0 then
			parse("maket "..id)
		end
	end
end

i dont test this...

old Re: Lua Scripts/Questions/Help

kNedLiik
User Off Offline

Quote
Fehuziom has written
kNedLiik has written
I need script for that , only usgn logged in players can join CT pls .


1
2
3
4
5
6
7
8
addhook("spawn","ct_usgn")
function ct_usgn(id)
	if player(id,"team")==2 then
		if player(id,"usgn")>=0 then
			parse("maket "..id)
		end
	end
end

i dont test this...


Someone pls fix it??
Still making me T when im logged in usgn

old Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Quote
kNedLiik has written
Fehuziom has written
kNedLiik has written
I need script for that , only usgn logged in players can join CT pls .


1
2
3
4
5
6
7
8
addhook("spawn","ct_usgn")
function ct_usgn(id)
	if player(id,"team")==2 then
		if player(id,"usgn")>=0 then
			parse("maket "..id)
		end
	end
end

i dont test this...


Someone pls fix it??
Still making me T when im logged in usgn


Try write in game "rank"...if you have your rank statistic you are logged...

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
kNedLiik has written
Fehuziom has written
kNedLiik has written
I need script for that , only usgn logged in players can join CT pls .


1
2
3
4
5
6
7
8
addhook("spawn","ct_usgn")
function ct_usgn(id)
	if player(id,"team")==2 then
		if player(id,"usgn")>=0 then
			parse("maket "..id)
		end
	end
end

i dont test this...


Someone pls fix it??
Still making me T when im logged in usgn


1
2
3
4
5
6
7
8
9
10
addhook("team","joinct") function joinct(id,team)
	if team==2 then
		if (player(id,"usgn")>0) then
			--
		else
			msg2(id,"You need to be US logged in")
			return 1 -- Dosent allows
		end
	end
end
To the start Previous 1 2299 300 301338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview