then make a lua script with the trigger hook and make parse("setarmor "..id.." "..player(id, "armor") +10)
Forum
CS2D Scripts Lua Scripts/Questions/Helpthen make a lua script with the trigger hook and make parse("setarmor "..id.." "..player(id, "armor") +10)
TheKilledDeath has written
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)
then make a lua script with the trigger hook and make parse("setarmor "..id.." "..player(id, "armor") +10)
1
2
3
4
2
3
4
addhook("trigger","hevcharger") function hevcharger(id, armor) parse("setarmor "..id.." "..player(id, "armor") +10) end
Or do I need to do it like this?
1
2
3
4
2
3
4
addhook("use","trigger.hevcharger") function trigger.hevcharger(id, trigger) 	parse(if trigger "entity" then "setarmor "..id.." "..player(id, "armor") +10) end
trigger name:
trigger x and y position
what it do when you use it?
LinuxGuy has written
Adds 10+ armor to player who use it. If armor is already 99 it should not add, or it should fill armor. alright, i will try to do it. i will need:
trigger name:
trigger x and y position
what it do when you use it?
trigger name:
trigger x and y position
what it do when you use it?
Admirdee has written
how to make script, if his/her score 10 ten then got 2% speed?
1
2
3
4
5
6
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
Heavy has written
Worx for me
Admirdee has written
how to make script, if his/her score 10 ten then got 2% speed?
1
2
3
4
5
6
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
edited 2×, last 26.06.09 04:16:16 pm
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
if (text = "!admin") then
kikinep has written
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
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" = Right
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 ?
-Skull_ has written
Which doesn't exist anymore? DC mentioned that he thinks about making a new system though.Use the Suggestion Thread.
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.
Mattman has written
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!
Read the Lua scripting tutorial, the first part shows you how it works:
http://www.unrealsoftware.de/forum_posts.php?post=134069&start=0