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 2287 288 289338 339 Next To the start

old Re: Lua Scripts/Questions/Help

FASTDIE
User Off Offline

Quote
use this:
1
2
3
4
addhook("spawn","spawnwithout")
function spawnwithout(id)
return x
end
READ INFO.TXT IN UR LUA DIR!!!
return x will strip usp n glock

old Re: Lua Scripts/Questions/Help

Smuckie
User Off Offline

Quote
Fonduta has written
hyh2 has written
Fonduta has written
Fonduta has written
@hyh2: Can you please download the new code and send me the download link? I cannot edit LUA AT ALL!


Link biatch?


http://www.mediafire.com/?hcrkjwdffvbha8k
I want to remove the Laser, RPG, and Super Armor from the buying list.

Also, instead of saying "You have not enough money!" make it say "You do not have enough money." and put the $ sign on the left side of the amount, instead of the right. Like this $800.

Edit the script, and give me the new download link.
It is the Advanced buying menu script.

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
@Fastdie: You actually have to return a string (return "x" instead of x)

@Triple H: Don't spam
@Fonduta: I think most of us have read that. Don't quote yourself if you haven't got anything to add dude -.-
edited 1×, last 23.10.10 06:41:02 pm

old Re: Lua Scripts/Questions/Help

Snake_Eater
User Off Offline

Quote
Hi guys I made this aim line script but a player can aim only one and not all others so pls help me....

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
function Masterarray(m,v)
local buff = {}
for i=1,m or 1 do
buff[i] = v or 0
end
return buff
end

aim = Masterarray(32)
id = Masterarray(32)
imgs = Masterarray(32)

addhook ("always","hui")
function hui()
for i=1,32 do
if aim[i]==true then
if player(id[i],"exists") then
if player(id[i],"health")>0 then
if player(i,"health")>0 then
freeimage(imgs[i])
imgs[i] = image("gfx/sprites/line.bmp",player(i,"x"),player(i,"y"),1,i)
local rot = (math.deg(math.atan2(player(id[i],"y")-player(i,"y"),player(id[i],"x")-player(i,"x")))+90)
if rot>180 then rot = rot - 360 end
imagepos (imgs[i],player(i,"x"),player(i,"y"),rot)
end
local hp = player(id[i],"health")
if (hp>90) then
imagecolor(imgs[i],0,255,0)
elseif (hp>60) and (hp<91) then
imagecolor(imgs[i],255,255,0)
elseif (hp>30) and (hp<61) then
imagecolor(imgs[i],255,128,0)
elseif (hp>0) and (hp<31) then
imagecolor(imgs[i],255,0,0)		
end
else
freeimage(imgs[i])
end
end
end
end
end

addhook ("say","fff")
function fff(p,t)
local ids = tonumber(t)
aim[p]=true
id[p]=ids
end

pls help

old Re: Lua Scripts/Questions/Help

Casper-
User Off Offline

Quote
What's wrong with this cr*p ?
1
parse("mp_unbuildable barricade,dispenser,supply,"gate field"")
"gate field" word is messing up my script and I don't know how to fix it Please help

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
BureX has written
What's wrong with this cr*p ?
1
parse("mp_unbuildable barricade,dispenser,supply,"gate field"")
"gate field" word is messing up my script and I don't know how to fix it Please help

use \"gate field\"

old Code does not work

Jaso
BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
dynwall=0
addhook("say","dynwall")
function dynwall(id,txt)
if dynwall==0 then
if txt=="hello" or txt=="Hello" or txt=="hi" or txt=="Hi" or txt=="Hia" or txt=="hia" then
parse("trigger dynwall")
          parse("sv_sound 'sfx/sound.wav'")
dynwall=1
end
end
end

Why does this script not work what is wrong about it?

old Re: Lua Scripts/Questions/Help

Jaso
BANNED Off Offline

Quote
When i try it with a dynwall and i say like Hi the wall doesnt go away and i dont hear a sound i just called the dynwall- dynwall....

old Re: Lua Scripts/Questions/Help

Dictatus Papae
User Off Offline

Quote
Ok, a quick thing before my question.

STOP FUCKING COPYING THE CC RP SCRIPT!!! All the questions are about that, and now pretty much all rp servers use copies.

1. Don't copy it. Most of you guys don't really know what real rp is. You think it's about owning a shop, selling guns, and killing everyone for their stuff.

2. WFW is retarded. Their script is a shitty copy, too. Their script is crap, their clan is crap, and they don't even know how to rp. Just go and play on CC's server, kids.

And now for the question.

How can I change the text in menu buttons? For e.g. if variable = 1 then button says "button 1" if variable = 2 then button "button 2", kinda like in the superhero script (but Blazzinxx's scripts are lil too comlicated for me to examine :P)

Thanks

old Re: Lua Scripts/Questions/Help

Casper-
User Off Offline

Quote
Dark Byte has written
BureX has written
What's wrong with this cr*p ?
1
parse("mp_unbuildable barricade,dispenser,supply,"gate field"")
"gate field" word is messing up my script and I don't know how to fix it Please help

use \"gate field\"


It doesn't work
Looks like this in console
1
... ')' expected near '\'

old Re: Lua Scripts/Questions/Help

Snake_Eater
User Off Offline

Quote
Hi guys,
How to get the distance of two Positions like....

position 1 = (x = 3,y = 10) position 2 = (x = 3,y = 20)

distance = 9 or 10

help pls

old Re: Lua Scripts/Questions/Help

RAVENOUS
BANNED Off Offline

Quote
Is it possible to make command look like:
1
parse("setpos '..id..' '..x..' '..y..'-1)
I want that a player is just moving a pixel downwards.
I hope you can help.

old Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Quote
Skipper has written
Is it possible to make command look like:
1
parse("setpos '..id..' '..x..' '..y..'-1)
I want that a player is just moving a pixel downwards.
I hope you can help.

use:
1
parse("setpos "..id.." "..player(id,'x').." "..player(,id,'y')-1)
(think this should work ;))

old Re: Lua Scripts/Questions/Help

archmage
User Off Offline

Quote
BureX has written
Dark Byte has written
BureX has written
What's wrong with this cr*p ?
1
parse("mp_unbuildable barricade,dispenser,supply,"gate field"")
"gate field" word is messing up my script and I don't know how to fix it Please help

use \"gate field\"


It doesn't work
Looks like this in console
1
... ')' expected near '\'

Use
1
parse("mp_unbuildable barricade,dispenser,supply,\"gate field\"")

old Re: Lua Scripts/Questions/Help

HaRe
User Off Offline

Quote
Ok just need an small help. Im currently working on an Ball thing, Wich is when the ball hits some body it explodes. So ive tryed this

1
2
3
4
5
6
7
8
9
10
11
for i = 1,32 do
	if (player(i,"exists")) then
		if (player(i,"x") == mx[id]) and (player(i,"y") == my[id])
			if i==id then
				--
			else
				-- yeah it explodes dont need to put something here  just want the up part to work
			end
		end
	end
end

old Re: Lua Scripts/Questions/Help

Casper-
User Off Offline

Quote
Spoiler >


DarkByte i always get this error i even replaced '\'
like "\gate field"\ and \"gate field"\ and many stuff but still doesnt work
IMG:https://i51.tinypic.com/1zd7vhc.jpg
To the start Previous 1 2287 288 289338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview