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 220 21 22338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

ohaz
User Off Offline

Zitieren
You could make it with a trigger_use and a timer...
then make a lua script with the trigger hook and make parse("setarmor "..id.." "..player(id, "armor") +10)

alt Re: Lua Scripts/Questions/Help

KimKat
GAME BANNED Off Offline

Zitieren
TheKilledDeath hat geschrieben
You could make it with a trigger_use and a timer...
then make a lua script with the trigger hook and make parse("setarmor "..id.." "..player(id, "armor") +10)
1
2
3
4
addhook("trigger","hevcharger")
function hevcharger(id, armor)
  parse("setarmor "..id.." "..player(id, "armor") +10)
end
This is all I got so far...

Or do I need to do it like this?
1
2
3
4
addhook("use","trigger.hevcharger")
function trigger.hevcharger(id, trigger)
	parse(if trigger "entity" then "setarmor "..id.." "..player(id, "armor") +10)
end

alt Re: Lua Scripts/Questions/Help

KimKat
GAME BANNED Off Offline

Zitieren
LinuxGuy hat geschrieben
alright, i will try to do it. i will need:

trigger name:

trigger x and y position

what it do when you use it?
Adds 10+ armor to player who use it. If armor is already 99 it should not add, or it should fill armor.

alt Re: Lua Scripts/Questions/Help

Alpha Beta
User Off Offline

Zitieren
Admirdee hat geschrieben
how to make script, if his/her score 10 ten then got 2% speed?


1
2
3
4
5
6
addhook("kill","killspeed")
function killspeed(killer,victim,weapon,x,y)
	if(player(killer,"score")==10) then
		parse("speedmod "..killer.." 2")
	end
end

Worx for me

alt Re: Lua Scripts/Questions/Help

Admir
User Off Offline

Zitieren
Heavy hat geschrieben
Admirdee hat geschrieben
how to make script, if his/her score 10 ten then got 2% speed?


1
2
3
4
5
6
addhook("kill","killspeed")
function killspeed(killer,victim,weapon,x,y)
	if(player(killer,"score")==10) then
		parse("speedmod "..killer.." 2")
	end
end

Worx for me


thanks.

EDIT: how about in classes. lol im newbie

EDIT2: nvm, I already got it
2× editiert, zuletzt 26.06.09 16:16:16

alt Re: Lua Scripts/Questions/Help

kikinep
User Off Offline

Zitieren
admins = {30844, 30575}
addhook("say","adm.classes.admin")
function adm.classes.admin(id, text)
i = 1
while (i <= #admins) do
i = i + 1
if (text = "!admin") then
if (player(id, "usgn") == admins[i]) then
msg("Player "..player(id, "name").." is admin!")
end
end
end
end

help this does not work

console msg:

LUA ERROR: sys/lua/server.lua:383: ')' expected near '='

help me plz

alt Re: Lua Scripts/Questions/Help

Alpha Beta
User Off Offline

Zitieren
kikinep hat geschrieben
i dont understand you

There is a "=" missing...
...The code must look like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
admins = {30844, 30575}
addhook("say","adm.classes.admin")
function adm.classes.admin(id, text)
	i = 1
	while (i <= #admins) do
	i = i + 1
	if (text == "!admin") then
		if (player(id, "usgn") == admins[i]) then
			msg("Player "..player(id, "name").." is admin!")
		end
	end
	end
end
"if (text = "!admin") then" = Wrong
"if (text == "!admin") then" = Right

alt Suggest Zombies Mode !!!

phihung940
User Off Offline

Zitieren
I suggest like this:

There are 3 types of zombies, the players first choose sides zombies are zombies level 2, then every time through round other players will countdown 10 seconds to select zombies "Boss", the remaining players turn into zombies with the only zombies as usual.

Zombies lv1 (human changed zombies).
Damge: 20~27
Speed: 90%
HP: 100

Zombies lv2 (player choose)
Damge: 30~35
Speed: 110%
HP: 150

Zombies "BOSS" (Countdown)
Damge: 45~50
Speed: 105%
HP: 200

When zombies were attacked by marble it will be push back again , and when zombies boss death ! the game will be end.

this can be do with LUA ? so every one can help me ?

alt Re: Lua Scripts/Questions/Help

KimKat
GAME BANNED Off Offline

Zitieren
-Skull_ hat geschrieben
Use the Suggestion Thread.
Which doesn't exist anymore? DC mentioned that he thinks about making a new system though.

By the way, have anyone got time to make a lua script that displays players USGN id's in a list? it's great for tracking down fakenickers.

alt Re: Lua Scripts/Questions/Help

Mattman
User Off Offline

Zitieren
Um..... sorry if I sound kinda noobish but i've been wondering this but how do you activate lua scripts onto your servers? Please write step by step!

alt Custom Kill

Bownok
User Off Offline

Zitieren
Does anyone know how to kill a person with custom kill? When I customkill someone using lua script, it would say Player Eat Player 2 and player would get the kill and stuff but player 2 would still be alive after the customkill.
Zum Anfang Vorherige 1 220 21 22338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht