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 2126 127 128338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

NozliW
User Off Offline

Zitieren
YellowBanana hat geschrieben
-WiLSoN- hat geschrieben
-WiLSoN- hat geschrieben
it seems the command isn't working (i tried it on my server and it didn't work,tried with different items)


Yeah use it in the spawn hook
1
2
3
4
5
6
7
8
9
10
math.randomseed(os.time)
class[id] = array(32)

addhook("spawn","my_spawn")
function my_spawn(id)
	if (player(id,"bot")) then     		
     		local rnd = math.random(1,X) -- X = total classes
     		class[id] = rnd
	end
end

that's something totally different script -.-

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
Here:
1
If ([b]player(p,"usgn")[/b] [b]==[/b] 29595) then
1× editiert, zuletzt 30.12.09 21:13:22

alt Re: Lua Scripts/Questions/Help

Redefinder
User Off Offline

Zitieren
ok here it is...
1
2
3
4
5
addhook("spawn","superadmin")
if(usgn = 29595) then
parse("equip "..id.." 83")
parse("setmaxhealth "..id.." 250")
end

EDIT:
Blazzingxx hat geschrieben
Here:
Code:
If (player(p,"usgn") == 25959) then

thanks
1× editiert, zuletzt 30.12.09 21:14:52

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
That's full function, that's how it should work...
1
2
3
4
5
6
7
addhook("spawn","superadmin")
function superadmin(id)
	if (player(id,"usgn") == 29595) then
		parse("equip "..id.." 83")
		parse("setmaxhealth "..id.." 250")
	end
end

alt Re: Lua Scripts/Questions/Help

Noxic
User Off Offline

Zitieren
@My Issue with the break hook;

It works now in a new script, my last one was a real mess. The function and hook adding still looks exactly the same, so if this counts as a bug I can send the whole script in an email to someone (It's shredded by now though, rewrote it and messed with it during that time)

However, the "usebutton" hook always returns a player ID of 0. This is bothering me.

alt Re: Lua Scripts/Questions/Help

Balto
User Off Offline

Zitieren
leegao hat geschrieben
Balto hat geschrieben
Yes, but what i want is that the team names change (DEVGRU, GIGN, SAS, ARTIC AVENGERS, ETC...)


It's not possible to physically change the text on the join menu.


And no are other form to change that?

alt Re: Lua Scripts/Questions/Help

Deatherr
User Off Offline

Zitieren
Hello,I have been working on a mod that is called WW2D. I started a new server to test it but when ever someone (also bots too) joins a team the server crashed! So i when through a few more testes to see what is causing it but all i found is that the classes have been crashing the server and i don't know to how to fix it.Also the rest of the mod works fine. I think .

CT Classes:

Spoiler >


T Classes

Spoiler >

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
Hi Guys i just want to know its impossible to put on the gameplay on player :like blood on screen if the player HP >>-30
i mean just like flash light on Blazzingxx zombie script
but a blood on the screen
Any help here !!
1× editiert, zuletzt 31.12.09 09:28:29

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
Thanks WiLSoN i will give it a try !
[EDIT] i have this script i make it to give all players+4 hp per second if they get hurt , but i don't know what i did wrong
with it so it now give's only who have (ID 1) +4 hp can you tell me a way to fix it to give all players +4hp if they get hurt ?
Spoiler >

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
addhook("second","blazz_heal")
function blazz_heal()
	local i, health
	for i = 1, 32 do
		health = player(i,"health")
		if (player(i,"exists") and health < 100) then
			parse("sethealth "..i.." "..(health + 4))
		end
	end
end

alt Re: Lua Scripts/Questions/Help

Flacko
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
addhook("second","cod4.sec")
	function cod4.sec()
		local i = 1,32 do
		if (player(1,"exists")) then
			parse("sethealth "..i.." "..player(i,"health")+4)
		end
	end
end

Lol, failed loop attempt

alt Re: Lua Scripts/Questions/Help

memo
COMMUNITY BANNED Off Offline

Zitieren
lol i have a funny one !
this msg must go with out player"name" ....blablabla
it must say (BLACK_J93 sheds FIRST BLOOD BLazzingxx ) ..
but why it put the player"name" and player"victem" idk ?!
Spoiler >


∗[EDIT]Guys the script you gave me work but only for the player who have the ID 1 - i need it for all players !

alt Re: Lua Scripts/Questions/Help

ohaz
User Off Offline

Zitieren
1
msg ('©190255050 '..player(killer,"name")..' sheds FIRST BLOOD by killing '..player(victim,"name")..'!@C')

alt Re: Lua Scripts/Questions/Help

SQ
Moderator Off Offline

Zitieren
memo hat geschrieben
∗[EDIT]Guys the script you gave me work but only for the player who have the ID 1 - i need it for all players !

Use DC's UT sample... Even thought you are using it now

alt Re: Lua Scripts/Questions/Help

Deatherr
User Off Offline

Zitieren
Flacko hat geschrieben
Is that exactly your script?
What you put on server.lua?


I have it the "dofile" already done and other stuff in the mod but the classes lua didn't work i have dofile them right though.I still thing there is something wrong in the classes lua i posted before (pg.127)
Zum Anfang Vorherige 1 2126 127 128338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht