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 2158 159 160338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
GINO hat geschrieben
i reaserch so much for just this thing
if it doesent work lets think all that its imposible

Lol, you sound like a little fag

1
parse('hudtxt2 '..id..' 2 "©250070000 Vida: '..player(id,"health")..'" 420 420 1')

alt Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Zitieren
Flacko hat geschrieben
GINO hat geschrieben
i reaserch so much for just this thing
if it doesent work lets think all that its imposible

Lol, you sound like a little fag

1
parse('hudtxt2 '..id..' 2 "©250070000 Vida: '..player(id,"health")..'" 420 420 1')


Flacko's code is right (;
Use that!

alt Re: Lua Scripts/Questions/Help

leoska
User Off Offline

Zitieren
I have not worked recover, help me...
if (bio_class[id]==5) then
if (player(id,"exists")) then
parse("sethealth "..id.." "..player(id,"health")+3))
end
end

alt Re: Lua Scripts/Questions/Help

0ito
User Off Offline

Zitieren
need help for put the terrorists and counter-terrorist in the survivors in the zombie mod if someone help me on what to put in the script I thank

alt Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Zitieren
Leo7755 hat geschrieben
I have not worked recover, help me...
if (bio_class[id]==5) then
if (player(id,"exists")) then
parse("sethealth "..id.." "..player(id,"health")+3))
end
end


First of all here is your code tabbed:
Spoiler >


And i think you'll have to + the 3 hp another way maybe...
I think Blazzingxx can help if he passes (:

---------------------------------------------------------------------------------

I have a problem!
1
parse([[hudtxt2 ]]..id..[[ 7 "©000255000Pixels: ]]..player(id,"x")..[[ x ]]..player(id,"y")..[[" 5 196]])

This line just make a hudtxt with the players position in pixels... but i get a lot of digits after a comma... how can i fix it? ...I don't want that comma.
I think i'll have to use some "math.blabla"... but i don't know that tag (:
Help!

Here is a screenshot:
IMG:https://f50.img-up.net/aim_AKD_Scsxzy.jpg
3× editiert, zuletzt 08.02.10 21:38:06

alt Re: Lua Scripts/Questions/Help

Zeik
User Off Offline

Zitieren
Flacko hat geschrieben
GINO hat geschrieben
i reaserch so much for just this thing
if it doesent work lets think all that its imposible

Lol, you sound like a little fag

1
parse('hudtxt2 '..id..' 2 "©250070000 Vida: '..player(id,"health")..'" 420 420 1')


It doesn't work, it gives me this error:
bad argument #1 to 'player' (number expected, got function)

alt Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Zitieren
Have you remeber'd to add a "always" hook?

If not -> Use this code:
1
2
3
4
addhook("always","GIVE IT A NAME HERE")
function THE NAME YOU ENTERED HERE(id)
parse('hudtxt2 '..id..' 2 "©250070000 Vida: '..player(id,"health")..'" 420 420 1')
end

alt Re: Lua Scripts/Questions/Help

Zeik
User Off Offline

Zitieren
Anders4000 hat geschrieben
Have you remeber'd to add a "always" hook?

If not -> Use this code:
1
2
3
4
addhook("always","GIVE IT A NAME HERE")
function THE NAME YOU ENTERED HERE(id)
parse('hudtxt2 '..id..' 2 "©250070000 Vida: '..player(id,"health")..'" 420 420 1')
end



I tried with ms100 and it didn't work, i'll try with always now..

Doesn't work... it gives me another error:
bad argument #1 to 'player' (number expected, got nil)

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
@Anders4000,
Use math.ceil()

By the way, replace [[ ]] with " becouse it's better if you are beginner.
1
parse('hudtxt2 '..id..' 0 "©000255000Pixels: '..player(id,"x")..' x '..player(id,"y")..'" 5 196')
2× editiert, zuletzt 08.02.10 22:09:33

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
@Rit:
That's not my fault.

@Leo:
You have to use setmaxhealth and you have to use parethesis in the right way.

@Anders
1
2
3
4
5
6
7
8
function math.round(n)
     a = math.floor(n) + 0.5
     if a > n then
          return math.floor(n)     
     elseif a <= n then
          return math.ceil(n)
     end
end

alt Re: Lua Scripts/Questions/Help

Anders4000
User Off Offline

Zitieren
RiT hat geschrieben
Anders4000 hat geschrieben
Have you remeber'd to add a "always" hook?

If not -> Use this code:
1
2
3
4
addhook("always","GIVE IT A NAME HERE")
function THE NAME YOU ENTERED HERE(id)
parse('hudtxt2 '..id..' 2 "©250070000 Vida: '..player(id,"health")..'" 420 420 1')
end



I tried with ms100 and it didn't work, i'll try with always now..

Doesn't work... it gives me another error:
bad argument #1 to 'player' (number expected, got nil)


Try with this code then:
1
2
3
4
addhook("always","GIVE IT A NAME HERE")
function THE NAME YOU ENTERED HERE(id)
parse([[hudtxt2 ]]..id..[[ 10 "©000255000Vida: ]]..player(id,"health")..[[" 5 144]])
end

alt Re: Lua Scripts/Questions/Help

Zeik
User Off Offline

Zitieren
Anders4000 hat geschrieben
Try with this code then:
1
2
3
4
addhook("always","GIVE IT A NAME HERE")
function THE NAME YOU ENTERED HERE(id)
parse([[hudtxt2 ]]..id..[[ 10 "©000255000Vida: ]]..player(id,"health")..[[" 5 144]])
end


same error .__.

Flacko hat geschrieben
@Rit:
That's not my fault.


Eh?.. gracias? ;S

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
RiT hat geschrieben
Flacko hat geschrieben
@Rit:
That's not my fault.


Eh?.. gracias? ;S


It's enough with having that shit fixed the first time.
Why don't you better go and play minesweeper instead of playing "being a programmer"?

alt Re: Lua Scripts/Questions/Help

Zeik
User Off Offline

Zitieren
Flacko hat geschrieben
RiT hat geschrieben
Flacko hat geschrieben
@Rit:
That's not my fault.


Eh?.. gracias? ;S


It's enough with having that shit fixed the first time.
Why don't you better go and play minesweeper instead of playing "being a programmer"?


We perdoname vos nacistes sabiendo.. Y gracias por insultarme en ingles jaja..

Y no, no esta "fixed" porque no me anda asique no te pongas así

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
RiT hat geschrieben
We perdoname vos nacistes sabiendo.. Y gracias por insultarme en ingles jaja..

Y no, no esta "fixed" porque no me anda asique no te pongas así


That's my point, I fixed your error in the first place and I tested it to make sure that it works, and it did.
If you just don't know how to make a 3 lined function, don't blame me because as I said, it's not my fault.

alt Re: Lua Scripts/Questions/Help

Zeik
User Off Offline

Zitieren
Flacko hat geschrieben
You're welcome


at least you gave me a base to make it work fine, i think...

anyway, it works so, thanks lol.
1× editiert, zuletzt 09.02.10 00:24:06
Zum Anfang Vorherige 1 2158 159 160338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht