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 2238 239 240338 339 Next To the start

old Re: Lua Scripts/Questions/Help

beckerchen
User Off Offline

Quote
murilogc has written
... and the cmd !gomedic , its to go to the medic , gohotel , its to go to hotel ...


so you want that the player (if hes a medic/hotelowner) gets teleportet to a special point for medics/hotelowners?
Then I need the Xtile and the Ytile for the special places.

You dont want a command !goshop?

murilogc has written
...and i want pay day medic win 10k , shop owner win 5k and hotel owner win 6k...


how long should a day go? ~5minutes?





Soja1997 has written
i need script

If Terrorist(predator) Kill CT(Marine)
parse sv_sound


1
2
3
4
5
6
addhook("kill","killsound")
function killsound(vic,killer,weapon,x,y)
	if(player(killer,"team")==1 and player(vic,"team")==2)then
		parse("sv_sound \" THEFOLDER/THESOUND.wav\"")
	end
end

insted of THEFOLDER write the name of the folder in the sfx folder.

insted of THESOUND write the name of the sound

insted of .wav write the soundtype (.wav .ogg .wma .....)
edited 1×, last 23.08.10 07:37:24 pm

old Re: Lua Scripts/Questions/Help

murilogc
User Off Offline

Quote
@beckerchen has written:
so you want that the player (if hes a medic / hotelowner ) gets telepotet to a point medics/hotelowners?
Then i need the xtile and the ytyle for the special places. MEDIC 456 346 HOTEL 784 235.


@beckerchen has written:
You Don't want a command !goshop ??


no , because have 6 shops , but shop owners , win 5k and one weapon if 5 , 5 min , and msg YOU WIN ONE WEAPON and shopowners , can drop armors , if txt !droparmor .




@beckerchen as written:
how long should a day go? ~5minutes?

YES
edited 1×, last 24.08.10 08:22:49 pm

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
beckerchen has written
murilogc has written
... and the cmd !gomedic , its to go to the medic , gohotel , its to go to hotel ...


so you want that the player (if hes a medic/hotelowner) gets teleportet to a special point for medics/hotelowners?
Then I need the Xtile and the Ytile for the special places.

You dont want a command !goshop?

murilogc has written
...and i want pay day medic win 10k , shop owner win 5k and hotel owner win 6k...


how long should a day go? ~5minutes?





Soja1997 has written
i need script

If Terrorist(predator) Kill CT(Marine)
parse sv_sound


1
2
3
4
5
6
addhook("kill","killsound")
function killsound(vic,killer,weapon,x,y)
	if(player(killer,"team")==1 and player(vic,"team")==2)then
		parse("sv_sound \" THEFOLDER/THESOUND.wav\"")
	end
end

insted of THEFOLDER write the name of the folder in the sfx folder.

insted of THESOUND write the name of the sound

insted of .wav write the soundtype (.wav .ogg .wma .....)


ohh thanks it works

@EDIT

hello i need script
if CT Kill TT
CT Go to TT
and TT Go To CT
edited 1×, last 23.08.10 09:07:04 pm

old Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

Quote
Soja, fuck you. Stop fucking begging for you noob fucking scripts. Stop being a fucking retard and learn fucking lua. It isn't hard... I understand you're only 12 year old, no problem, but Lua is such an easy language that even a retard could learn it. So stop fucking beggin' for your goddamn noob fucking idiot scripts. Nobody wants to spoonfed a fkin retarded 12 year old kid.

Admin/mod comment

better stop raging and flaming NOW or you will receive a community ban! /DC

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
Help with script DC
More >


can someone make only for ct this classes?
edited 2×, last 24.08.10 06:14:46 pm

old Re: Lua Scripts/Questions/Help

Evool
User Off Offline

Quote
Hi guys! I want one lua script - door, which can open only players, when USGN i write in lua. Please help me!

Sorry for my bad english, i am polish.

old Re: Lua Scripts/Questions/Help

BlacKJacK93
User Off Offline

Quote
@Soja1997:

Yeah u can make a classes only for 1 team by adding this

1
2
3
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
	if (player(id,"team") == 2) then

Remove the old spawn and add this , this will make classes for team == 2 (For Cs team)

and number 1 (For Tt team)

old Re: Lua Scripts/Questions/Help

FASTDIE
User Off Offline

Quote
hi i need help with my map script

1
2
3
4
5
6
7
8
9
addhook("usebutton","onlyican")
function onlyican(id,x,y)
	x="10"
	y="1"

	if (player(id,"usgn")>16304) then
		parse("trigger door2")
	end
end

whats wrong?
ps:
YellowBanana has written
Soja, fuck you. Stop fucking begging for you noob fucking scripts. Stop being a fucking retard and learn fucking lua. It isn't hard... I understand you're only 12 year old, no problem, but Lua is such an easy language that even a retard could learn it. So stop fucking beggin' for your goddamn noob fucking idiot scripts. Nobody wants to spoonfed a fkin retarded 12 year old kid.


Yellow Banana yes lua isnt hard but someone who isnt good in english like soja or me its problem lua havent polish tutorials teach him it and he wont nonstop ask u!
edited 3×, last 24.08.10 09:08:59 pm

old Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Quote
1
2
3
4
5
6
7
8
addhook("usebutton","onlyican")
function onlyican(id,y,x)
	if (x==10) and (y==1) then

	if (player(id,"usgn")>16304) then
		parse("trigger door2")
	end
end
now is good

old Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Quote
FaStDiE has written
YellowBanana has written
flame, flame, flame

Yellow Banana yes lua isnt hard but someone who isnt good in english like soja or me its problem lua havent polish tutorials teach him it and he wont nonstop ask u!


Lies. Those cases are the least.

Also, there was a polish guy who sucked very bad at lua and blamed his language until the day he realized that nobody would make his noobish scripts and share with him the credits so he learnt lua.
At first he started making easy scripts and asked for help when he couldn't understand something, maybe you should start doing something too?

EDIT: Oh, Fehuziom was faster, but he is missing an end to close the first if

old Re: Lua Scripts/Questions/Help

murilogc
User Off Offline

Quote
@beckerchen has written:
so you want that the player (if hes a medic / hotelowner ) gets telepotet to a point medics/hotelowners?
Then i need the xtile and the ytyle for the special places. MEDIC 456 346 HOTEL 784 235.


@beckerchen has written:
You Don't want a command !goshop ??


no , because have 6 shops , but shop owners , win 5k and one weapon if 5 , 5 min , and msg YOU WIN ONE WEAPON and shopowners , can drop armors , if txt !droparmor .




@beckerchen as written:
how long should a day go? ~5minutes?

YES

old Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Quote
Flacko has written
EDIT: Oh, Fehuziom was faster, but he is missing an end to close the first if
0hh... Thx flacko

edit//
flacko i from poland

edit 2//
flacko i can start making polish lua tutorial / help :]

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
-BLACK_J93- has written
@Soja1997:

Yeah u can make a classes only for 1 team by adding this

1
2
3
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
	if (player(id,"team") == 2) then

Remove the old spawn and add this , this will make classes for team == 2 (For Cs team)

and number 1 (For Tt team)

Very thanks for you its works ;]

old Re: Lua Scripts/Questions/Help

kalis
User Off Offline

Quote
why error
? help

attempt to call glotbal 'totable' (a nil value)

Code:
function load(id)
usgn = player(id,"usgn")
if (usgn > 0) then
local usgn = player(id, "usgn")
files = io.open("sys/lua/scelldata/"..usgn..".txt","r")
if(files~=nil) then
msg2(id,"©000255000Your save file found!@C")
msg2(id,"©160160255Your U.S.G.N ID: "..usgn.."@C")
parse('hudtxt2 '..id..' 7 "©000255000Login as: '..usgn..'" 40 415')
for line in io.lines("sys/lua/scelldata/"..usgn..".txt","r") do
local parses = totable(line)
if (tonumber(parses[1])>0) then
yourmon[id] = tonumber(parses[1])
license[id] = tonumber(parses[2])
break
end
end
else
msg2(id,"©255000000Failed to load save!@C")
msg2(id,"©255000000Please check your U.S.G.N account settings!@C")
parse('hudtxt2 '..id..' 7 "©255000000Failed to Load Save" 40 415')
end
end
end

addhook("leave","save")
function save(id)
if (player(id, "usgn") > 0) then
save_data = license[id].." "..yourmon[id]
file = assert(io.open("sys/lua/scelldata/"..usgn..".txt","w"))
file:write(save_data)
file:close()
msg2(id,'©000255001Save Data Successfull!@C')
else
msg2(id,"©255000000Failed to Save!@C")
end
end

old Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Quote
Soja1997 has written
i need script if CT Kill TT
This CT maket
This TT makect
Can make this? script someone plz

you did it yourself!
1
2
3
4
5
6
7
addhook("kill","killa")
function killa(killer,victim)
	if player(killer,"team")==2 and player(victim,"team")==1 then
		parse("maket "..killer)
		parse("makect "..victim)
	end
end

@heocon953
You didn't add finction "totable" to your script

old Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Quote
Vectar666 thanks you
and i need next script
no more than 1 predator(terrorist) can you make this?
and i need script
if i use gutbomb to kill change name gutbomb to harpun

old Re: Lua Scripts/Questions/Help

kalis
User Off Offline

Quote
Vectar666 has written
Soja1997 has written
i need script if CT Kill TT
This CT maket
This TT makect
Can make this? script someone plz

you did it yourself!
1
2
3
4
5
6
7
addhook("kill","killa")
function killa(killer,victim)
	if player(killer,"team")==2 and player(victim,"team")==1 then
		parse("maket "..killer)
		parse("makect "..victim)
	end
end

@heocon953
You didn't add finction "totable" to your script

tkx
but you can help me to addd?


function totable()

function load(id)
usgn = player(id,"usgn")
if (usgn > 0) then
local usgn = player(id, "usgn")
files = io.open("sys/lua/scelldata/"..usgn..".txt","r")
if(files~=nil) then
msg2(id,"©000255000Your save file found!@C")
msg2(id,"©160160255Your U.S.G.N ID: "..usgn.."@C")
parse('hudtxt2 '..id..' 7 "©000255000Login as: '..usgn..'" 40 415')
for line in io.lines("sys/lua/scelldata/"..usgn..".txt","r") do
local parses = totable(line)
if (tonumber(parses[1])>0) then
yourmon[id] = tonumber(parses[1])
license[id] = tonumber(parses[2])
break
end
end
else
msg2(id,"©255000000Failed to load save!@C")
msg2(id,"©255000000Please check your U.S.G.N account settings!@C")
parse('hudtxt2 '..id..' 7 "©255000000Failed to Load Save" 40 415')
end
end
end

addhook("leave","save")
function save(id)
if (player(id, "usgn") > 0) then
save_data = license[id].." "..yourmon[id]
file = assert(io.open("sys/lua/scelldata/"..usgn..".txt","w"))
file:write(save_data)
file:close()
msg2(id,'©000255001Save Data Successfull!@C')
else
msg2(id,"©255000000Failed to Save!@C")
end
end
? error
edited 1×, last 25.08.10 01:20:59 pm
To the start Previous 1 2238 239 240338 339 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview