Forum

> > CS2D > Scripts > Lua Scripts/Questions/Help
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Lua Scripts/Questions/Help

6.770 Antworten
Seite
Zum Anfang Vorherige 1 2238 239 240338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

beckerchen
User Off Offline

Zitieren
murilogc hat geschrieben
... 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 hat geschrieben
...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 hat geschrieben
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 .....)
1× editiert, zuletzt 23.08.10 19:37:24

alt Re: Lua Scripts/Questions/Help

murilogc
User Off Offline

Zitieren
@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
1× editiert, zuletzt 24.08.10 20:22:49

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Zitieren
beckerchen hat geschrieben
murilogc hat geschrieben
... 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 hat geschrieben
...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 hat geschrieben
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
1× editiert, zuletzt 23.08.10 21:07:04

alt Re: Lua Scripts/Questions/Help

YellowBanana
BANNED Off Offline

Zitieren
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 Kommentar

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

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Zitieren
Help with script DC
Mehr >


can someone make only for ct this classes?
2× editiert, zuletzt 24.08.10 18:14:46

alt Re: Lua Scripts/Questions/Help

Evool
User Off Offline

Zitieren
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.

alt Re: Lua Scripts/Questions/Help

BlacKJacK93
User Off Offline

Zitieren
@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)

alt Re: Lua Scripts/Questions/Help

FASTDIE
User Off Offline

Zitieren
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 hat geschrieben
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!
3× editiert, zuletzt 24.08.10 21:08:59

alt Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
FaStDiE hat geschrieben
YellowBanana hat geschrieben
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

alt Re: Lua Scripts/Questions/Help

murilogc
User Off Offline

Zitieren
@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

alt Re: Lua Scripts/Questions/Help

Fehu
User Off Offline

Zitieren
Flacko hat geschrieben
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 :]

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Zitieren
-BLACK_J93- hat geschrieben
@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 ;]

alt Re: Lua Scripts/Questions/Help

kalis
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

Vectarrio
User Off Offline

Zitieren
Soja1997 hat geschrieben
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

alt Re: Lua Scripts/Questions/Help

Soja1997
User Off Offline

Zitieren
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

alt Re: Lua Scripts/Questions/Help

kalis
User Off Offline

Zitieren
Vectar666 hat geschrieben
Soja1997 hat geschrieben
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
1× editiert, zuletzt 25.08.10 13:20:59
Zum Anfang Vorherige 1 2238 239 240338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht