Forum

> > CS2D > Scripts > my classes script |need help
Forums overviewCS2D overview Scripts overviewLog in to reply

English my classes script |need help

24 replies
Page
To the start Previous 1 2 Next To the start

old Re: my classes script |need help

boyzinthewoodz
User Off Offline

Quote
cuz i need more help on my script "fruitclasses" : /
and i didnt want to create another topic :3

i need help on a bug wich is very very annoying:
the images dont appear.
they only appear if you play as "server" but not when u join the server (you just can see them at the start when ur still spect but after you joined a team they are lost)
More >

the funny thing is... this works on my other lua "fruithats"...
More >


and yes i added everything right in servertranser and all these other things.
its the fault of the lua
here is the original but noone could help me :*
http://fruit.cs2d.nl/index.php?site=forum_topic&topic=52

old Re: my classes script |need help

J4x
User Off Offline

Quote
maybe if u replace this
1
2
3
4
if (img[id]) then
freeimage(img[id])
end
img[id] = image("gfx/corpse/kirby.bmp",1,1,200+id)

with
1
2
freeimage(id)
id1= image("gfx/corpse/kirby.bmp",1,1,200+id)

old Re: my classes script |need help

TimeQuesT
User Off Offline

Quote
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
-- 10Xkirby
     if (sample.classes.class[id]==10) then
          parse('hudtxt2 '..id..' 1 "©250250255Your Class:" 30 200')
          parse('hudtxt2 '..id..' 2 "©250250050Kirby" 40 225')
          parse('hudtxt2 '..id..' 3 "©200200200Press F4 to choose your class " 10 100')
          parse ("setmaxhealth "..id.." 75")
          parse ("setarmor "..id.." 75")
          parse ("speedmod "..id.." -12")
          if (img[id]) then
               freeimage(img[id])
          end
          img[id] = image("gfx/corpse/kirby.bmp",1,1,200+id)
     return "55,75,48";
end
          -- 11Xzombie
     if (sample.classes.class[id]==11) then
          parse('hudtxt2 '..id..' 1 "©250250255Your Class:" 30 200')
          parse('hudtxt2 '..id..' 2 "©250250050Zombie" 40 225')
          parse('hudtxt2 '..id..' 3 "©200200200Press F4 to choose your class " 10 100')
          parse ("setmaxhealth "..id.." 80")
          parse ("speedmod "..id.." -2")
          if (img[id]) then	--here!
               freeimage(img[id])
          end
          img[id] = image("gfx/corpse/kirby.bmp",1,1,200+id)
     return "55,75,48";
end

id=image("gfx/corpse/zombie3.bmp",1,1,200+id) --you handle "id" as global...

i changed it for you. The upper code should work.

old Re: my classes script |need help

boyzinthewoodz
User Off Offline

Quote
yes it works but only if you are the server. its funny isnt it? i joined with a 2. cs2d game my own server and there was no image. what a annoying bug!
-------------------------
i need a lua wich unequips all at the roundend. i have some but they are bad.. sry im on my phone so i will post them later to show whats wrong.
edited 1×, last 09.03.11 09:59:45 am
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview