English Lua Scripts/Questions/Help

6,770 replies
Goto Page
To the start Previous 1 2 ... 238 239 240 ... 338 339 Next To the start
23.08.10 07:18:09 pm
Up
beckerchen
User
Offline Off
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


Code:
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
23.08.10 08:01:56 pm
Up
murilogc
User
Offline Off
@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
23.08.10 08:20:29 pm
Up
Soja1997
User
Offline Off
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


Code:
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
24.08.10 12:04:14 am
Up
YellowBanana
BANNED
Offline Off
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
24.08.10 10:57:48 am
Up
Soja1997
User
Offline Off
Help with script DC
More >


can someone make only for ct this classes?
edited 2×, last 24.08.10 06:14:46 pm
24.08.10 07:02:52 pm
Up
Evool
User
Offline Off
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.
24.08.10 07:44:02 pm
Up
BlacKJacK93
User
Offline Off
@Soja1997:

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

Code:
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)
24.08.10 08:06:26 pm
Up
FASTDIE
User
Offline Off
hi i need help with my map script

Code:
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
24.08.10 08:50:54 pm
Up
YellowBanana
BANNED
Offline Off
Exactly,

"Give a man a fish, and he has food for one day,
Teach him how to fish, and he has food for all his life"
24.08.10 09:45:40 pm
Up
Fehu
User
Offline Off
Code:
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
IMG:http://www.flashflashrevolution.com/profile/newsiggy/Fehu/stardust/0/0-1-2-3-4-5.png
24.08.10 09:47:40 pm
Up
Flacko
User
Offline Off
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
24.08.10 09:53:20 pm
Up
murilogc
User
Offline Off
@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
24.08.10 11:45:03 pm
Up
Fehu
User
Offline Off
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 :]
IMG:http://www.flashflashrevolution.com/profile/newsiggy/Fehu/stardust/0/0-1-2-3-4-5.png
25.08.10 12:24:22 am
Up
Soja1997
User
Offline Off
-BLACK_J93- has written:
@Soja1997:

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

Code:
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 ;]
25.08.10 09:05:34 am
Up
kalis
User
Offline Off
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
25.08.10 11:05:33 am
Up
Soja1997
User
Offline Off
i need script if CT Kill TT
This CT maket
This TT makect
Can make this? script someone plz
25.08.10 11:28:13 am
Up
Vectarrio
User
Offline Off
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!
Code:
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
25.08.10 11:31:29 am
Up
Soja1997
User
Offline Off
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
25.08.10 12:14:09 pm
Up
Fehu
User
Offline Off
Soja, pw me allways with script and dont spam here
IMG:http://www.flashflashrevolution.com/profile/newsiggy/Fehu/stardust/0/0-1-2-3-4-5.png
25.08.10 12:27:01 pm
Up
kalis
User
Offline Off
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!
Code:
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 2 ... 238 239 240 ... 338 339 Next To the start