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 2317 318 319338 339 Nächste Zum Anfang

alt Re: Lua Scripts/Questions/Help

Surplus
User Off Offline

Zitieren
Made it simpeler to read
1
2
3
4
5
6
7
8
9
10
admin_usgn = {"18724","28429"}

addhook("team","adminteam") 
function adminteam(id,team) 
	if team == 2 and player(id,"usgn") == admin_usgn then 
				return 0
			else
				parse("maket "..id)
			end 
		end

and i want it to let only the ppl that have admin_usgn
but it transferes you to T, then CT. But i want it to transfer you to CT and then automaticaly T
3× editiert, zuletzt 26.11.10 18:19:03

alt Re: Lua Scripts/Questions/Help

blubbnetwork
User Off Offline

Zitieren
Hey how can i make a Heal armor on TIBIA RPG

     },

     [999] = {
          name = "Heal Armor",
          r = 255, g = 255, b = 255,
          action = "equip",
          slot = 2,
          eimage = "gfx/weiwen/healarmor.png",
          fimage = "gfx/weiwen/healarmor.png",
          def = 6.6,
          speed = 4.30,
          heal = function() return math.random(10,20) end,
          func = equip,
     },

alt .YeaH.

FiiD
User Off Offline

Zitieren
Just use the normal Heal Armor of CS2D and than you get HP...easy

alt Re: Lua Scripts/Questions/Help

Blacko
User Off Offline

Zitieren
Hello all.
>I search a script...
•This script is for made our own question at the instant, for example I write question : "Who want to change the map ?" And the question appear in the left up of screen and other player can vote with 1, 2, 3 ... But I think it's so hard to make it...
But I hope you help me, really !

alt HELPPP

Fiz
User Off Offline

Zitieren
I cant seem to run a sample gungame on cs2d! i need help ive done everything it says (remove comments after the dofile line to activate the lua) but nothing works please post back how to greatly appreciated - being trying to do it for ages

alt Re: Lua Scripts/Questions/Help

Infinite Rain
Reviewer Off Offline

Zitieren
Somebody can help me with that
in console dont have a error!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
function array(m)
local array = {}
for i = 1, m do
array[i] = 0
end
return array
end
mkits=array(32)

for i = 1, 32 do
mkits[i]=0
end

addhook("walkover","medkits")
function medkits(id,iid)
     if (iid == 64) then
          mkits[id]=mkits[id]+1
		  return 1
     end
end

addhook("serveraction","usemedkit")
function usemedkit(id,action1)
          if mkits[id] <= 1 then
               msg2(id,"You dont have any more medkits!@C")
               else
               parse("sethealth "..id.." 100")
               mkits[id]=mkits[id]-1
          end
end

alt Re: Lua Scripts/Questions/Help

Rainoth
Moderator Off Offline

Zitieren
Spoiler >


Maybe you should change array into initArray ?
And change part about serveractions to:
1
2
3
4
5
addhook("serveraction","usemedkit")
function usemedkit(id,b)
         if b== 1 then
          if mkits[id] <= 1 then
               msg2(id,"You dont have any more medkits!@C")
DOnt know but it is my opinion...

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

Now my Part :
Could somebody fix this ?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
level=initArray(32)
exp=initArray(32)
credits=initArray(32)
hacker=initArray(32)

function string.split(text,b)
local cmd = {}
if b then
b = b
else
b = "%s"
end
b = "[^"..b.."]+"
for o in string.gmatch(text,b) do
table.insert(cmd,o)
end
return cmd
end
if hacker==nil then hacker={} end
hacker={}

addhook("second","hack")
function hack()
if (hacker[id]==1) then
credits[id]=credits[id]+15
     end
end

addhook("spawn","class")
function class(id)
parse("equip "..id.." 56") -- Equips Ct's with defuse kit.
hacker[id] = 1 -- The Hacker Special is on
     parse("strip "..id)

I will include in credits the one who fixes this. I need this and my lua will be done

alt Re: Lua Scripts/Questions/Help

SkullFace
User Off Offline

Zitieren
hey how could i make when a bot spotted a building (or goes to it automatically when spawned) destroys it ?

P.S. I know how to make them build on a tile and stuff but this is something confusin'

alt still need help

Fiz
User Off Offline

Zitieren
please help - need a walkthrough from step 1 to the last step on how to run sample.gg script with bots on cs2d

alt Re: Lua Scripts/Questions/Help

_Ultimate_
User Off Offline

Zitieren
i need a script so evry player can give cookies to other like that

@givecookie ID
@takecookie ID

and i need the script
@say
for admins so the write in color
1× editiert, zuletzt 27.11.10 04:05:34

alt Re: Lua Scripts/Questions/Help

Rainoth
Moderator Off Offline

Zitieren
Yasday hat geschrieben
@batlaizys
what is this doing in your lua?
1
parse("strip "..id)
lol

and is there any error?


strip will take all weapons and armors the player has except for knife.
No errors says function added...

alt buildings short list

Fiz
User Off Offline

Zitieren
need buildings list for console eg: if i type in console mp_building price turret 0 ,the cost of the turret will then be 0. but if i type mp_building price teleport entrance 0 ,it says error. what are the translates to put in console for barbed wire, wall 1,2 and 3 and teleport entrance and teleport exit and gate field???
-barbed wire
-wall I
-wall II
-wall III
-gate field
-teleport entrance
-teleport exit

help would be greatly appreciated
thanks

alt Re: Lua Scripts/Questions/Help

Banaan
User Off Offline

Zitieren
This has nothing to do with lua, but here's your solution:

Put quotes ( "" ) around the names, e.g.
1
mp_building_price "barbed wire" 0

etc.

alt Re: Lua Scripts/Questions/Help

_Ultimate_
User Off Offline

Zitieren
Can some body give me a script for commands like these in EVIL SERVERS the commands i want are

@givecookie ID OF PLAYER
@takecookie IF OF PLAYER

Thanks

alt Re: Lua Scripts/Questions/Help

Redneck
BANNED Off Offline

Zitieren
Can someone make from this script that only team4 can trigger doors by saying "!trigger door1" help plz thank u
Spoiler >

alt Re: Lua Scripts/Questions/Help

Yasday
User Off Offline

Zitieren
@batlaizys
no it won't, it will just strip sth like this:
1
parse([[strip ]]..id..[[ ]]..wpnid) --wpnid must be the id of the waepon ;)
for stripping all weps use this (errors but you can remove em, still works):
1
2
3
for wpnid = 1,88 do
	parse([[strip ]]..id..[[ ]]..wpnid)
end
Zum Anfang Vorherige 1 2317 318 319338 339 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht