Forum
CS2D Scripts Lua Scripts/Questions/Helpcolors:
vip - 195195195
moderator - 105255000
admin - 255090000
mapper, skinner, scripter - 190000190
like:
1
2
3
2
3
vip={12345,54321} moderator={98765} admin={15101}
When spawn in console got error
Attempt to call a nil value
Dont say where
plllz help!
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
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
function btp(id,sx,sy,ex,ey,mode) local prp if mode==1 then prp="" elseif mode==2 then prp="tile" end return (player(id,"exists") and player(id,prp.."x")>sx and player(id,prp.."x")<ex and player(id,prp.."y")>sy and player(id,prp.."y")<ey) end function initArray(m) 	local array = {} 		for i = 1, m do 	array[i] = 0 	end return array end terrorist=initArray(32) addhook("spawn","terroristvar") function terroristvar(id) 	if player(id,"team")==1 then 		terrorist[id]=1 	elseif player(id,"team")==2 then 		terrorist[id]=0 	end end addhook("movetile","house") function house(id) 	if btp(id,29,26,33,30,2) then 		for i=1,32 do 			if player(i,"exists") and terrorist[i]==1 then 				parse("setpos "..i.." 896 608") 			end 		end 	end end
DannyDeth has written
Hi all, I just wantd to ask a small question:
What is the appropriate command to draw an image to the screen at certain coordinates?
Thanks ~DannyDeth.
What is the appropriate command to draw an image to the screen at certain coordinates?
Thanks ~DannyDeth.
image(path,x,y,mode,pl)
info.txt has written
- image("path",x,y,mode,[pl]) Creates an image (dynamic object) on the map and returns the ID.
Mode 0: floor image (covered by players etc)
Mode 1: top image (covering players)
Mode 2: HUD image (covering everything, part of the interface)
Mode 3: super top image (covering everything on the map)
Mode 101-132: draw under this player (id+100)
Mode 201-232: draw over this player (id+200)
Mode 133-164: draw over this player and over entities (id+132)
When drawing at player, x and y are used this way:
x<=0: do not rotate with player, x>0: rotate img with player
y<=0: only draw if not covered by fog of war, y>0: draw always
[pl] is an optional parameter. 0 (default value) means that
all players see this image. If you set it to a player ID then
only this player will see this image!
The command returns the ID of the dynamic object image![/code]
Mode 0: floor image (covered by players etc)
Mode 1: top image (covering players)
Mode 2: HUD image (covering everything, part of the interface)
Mode 3: super top image (covering everything on the map)
Mode 101-132: draw under this player (id+100)
Mode 201-232: draw over this player (id+200)
Mode 133-164: draw over this player and over entities (id+132)
When drawing at player, x and y are used this way:
x<=0: do not rotate with player, x>0: rotate img with player
y<=0: only draw if not covered by fog of war, y>0: draw always
[pl] is an optional parameter. 0 (default value) means that
all players see this image. If you set it to a player ID then
only this player will see this image!
The command returns the ID of the dynamic object image![/code]
factis699 has written
Guys i need help with script
When spawn in console got error
Attempt to call a nil value
Dont say where
plllz help!
When spawn in console got error
Attempt to call a nil value
Dont say where
plllz help!
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
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
function btp(id,sx,sy,ex,ey,mode) local prp if mode==1 then prp="" elseif mode==2 then prp="tile" end return (player(id,"exists") and player(id,prp.."x")>sx and player(id,prp.."x")<ex and player(id,prp.."y")>sy and player(id,prp.."y")<ey) end function initArray(m) 	local array = {} 		for i = 1, m do 	array[i] = 0 	end return array end terrorist=initArray(32) addhook("spawn","terroristvar") function terroristvar(id) 	if player(id,"team")==1 then 		terrorist[id]=1 	elseif player(id,"team")==2 then 		terrorist[id]=0 	end end addhook("movetile","house") function house(id) 	if btp(id,29,26,33,30,2) then 		for i=1,32 do 			if player(i,"exists") and terrorist[i]==1 then 				parse("setpos "..i.." 896 608") 			end 		end 	end end
I tested this code and didn't get any errors on respawn. Is that all the code you have? Because the error is most probably there
J.
RyceR has written
How to add special say for vips, moderators, admins, mappers, skiners and scripters?
colors:
vip - 195195195
moderator - 105255000
admin - 255090000
mapper, skinner, scripter - 190000190
like:
colors:
vip - 195195195
moderator - 105255000
admin - 255090000
mapper, skinner, scripter - 190000190
like:
1
2
3
2
3
vip={12345,54321} moderator={98765} admin={15101}
Make for me script like that please
http://unrealsoftware.de/forum_posts.php?post=120848&goto=203486#post203486
RyceR has written
Make for me script like that please
RyceR has written
How to add special say for vips, moderators, admins, mappers, skiners and scripters?
colors:
vip - 195195195
moderator - 105255000
admin - 255090000
mapper, skinner, scripter - 190000190
like:
colors:
vip - 195195195
moderator - 105255000
admin - 255090000
mapper, skinner, scripter - 190000190
like:
1
2
3
2
3
vip={12345,54321} moderator={98765} admin={15101}
Make for me script like that please
do you mean something like this
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
if rp_ct[id] == true then 		rp_msg([[196196196]],player(id,[[name]])..[[(ADMIN): ]]..txt) 		return 1 	elseif rp_vip2[id] == true then 		rp_msg([[000255000]],player(id,[[name]])..[[(VIP): ]]..txt) 		return 1 	end end
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("die","death") function death(id) freeimage(id) id1=image("gfx/bodyparts.bmp",player(id"tilex"),player(id"tiley"),0) imagescale(id1,1,1) imageblend(id1,0) imagealpha(id1,1.0) end
it sends me this error: temp to cal local "id" (a number value).
addhook("die","death")
function death(id)
freeimage(id)
img=image("gfx/bodyparts.bmp",player(id,"x"),player(id,"y"),0)
imagescale(img,1,1)
imageblend(img,0)
imagealpha(img,1.0)
end
1-Die has many parameters. Check info.txt for them.
2-Put a number, not just id.
AND, if the player is dead, it does not have an x and y. BUT the hook "die" has an x and y which will let you do this. Here, have a corrected version.
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
deathimg = {} addhook("die","death") function death(v,id,w,x,y) 	d = d+1 	deathimg[d]=image("gfx/bodyparts.bmp",x,y,0) 	imagescale(deathimg[d],1,1) 	imageblend(deathimg[d],0) 	imagealpha(deathimg[d],1.0) end
Can't guarantee that it will work.
T is the law there?
Please tell me if
(KOR)ohWill give relief and hate haha
thanks for reply
FN_Nemesis has written
can someone help me with this?
it sends me this error: temp to cal local "id" (a number value).
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("die","death") function death(id) freeimage(id) id1=image("gfx/bodyparts.bmp",player(id"tilex"),player(id"tiley"),0) imagescale(id1,1,1) imageblend(id1,0) imagealpha(id1,1.0) end
it sends me this error: temp to cal local "id" (a number value).
may be put commas like this:
1
2
3
4
2
3
4
id1=image("gfx/bodyparts.bmp",player(id,"tilex"),player(id,"tiley"),0) imagescale(id,1,1,1) imageblend(id,1,0) imagealpha(id,1,1.0)
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
for i =1,32 do 	img[i] = 0 end addhook("die","death") function death(id) 	freeimage(img[id]) 	img[id]=image("gfx/bodyparts.bmp",player(id"x"),player(id"y"),0) 	imagescale(img[id],1,1) 	imageblend(img[id],0) 	imagealpha(img[id],1.0) end
and it will free the old die img if you die again ...
EDIT: the solution was this :
1
2
3
4
5
6
7
2
3
4
5
6
7
addhook("die","death") function death(id) freeimage(id)id1=image("gfx/bodyparts.bmp",player(id,"x"),player(id,"y"),0) imagescale(id,1,1,1) imageblend(id,1,0) imagealpha(id,1,1.0) end
@Robed2 try this
1
parse("mp_building_limit:NAME OF THE BUILDING:1000)
edited 1×, last 21.12.10 05:58:15 pm
iDios has written
Hello, I search a little script, a player with USGN can talk in red when : !say ... Please help ! Thanks !
Please help !
try to pm flacko he maybe can help u...