Forum

> > CS2D > Scripts > How to save hats?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch How to save hats?

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt How to save hats?

tiky
User Off Offline

Zitieren
Hi all. Im working in a script and I have tried and asked but I couldn´t create a file that can save hats, soo if someone can help me I will be happy. Thanks

alt Re: How to save hats?

Cure Pikachu
User Off Offline

Zitieren
By saving hats what do you mean? Save currently equipped hat or hat inventory?
Also would be great if you can provide the code for your hat script so we can see how the script operates and then work from there.

alt Re: How to save hats?

tiky
User Off Offline

Zitieren
Save the player´s hats. When player join to server, he has his hat without do anything.

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
41
42
43
44
45
46
47
48
49
50
addhook('menu','hat_menu')
function hat_menu(id,title,buton)
	if title=='Hat Menu 1/2' then
		if buton==1 then
   if turehat[id]==1 then
	freeimage(hatimg[id])
end
   hatimg[id] = image('gfx/hats tiky/angel.png', 1, 1, 200 + id)
	elseif buton==2 then
   if turehat[id]==1 then
	freeimage(hatimg[id])
end
   hatimg[id] = image('gfx/hats tiky/devil.png', 1, 1, 200 + id)
	elseif buton==3 then
   if turehat[id]==1 then
	freeimage(hatimg[id])
end
      hatimg[id] = image('gfx/hats tiky/cowboy.png', 1, 1, 200 + id)
	elseif buton==4 then
   if turehat[id]==1 then
	freeimage(hatimg[id])
end
   hatimg[id] = image('gfx/hats tiky/graduate.png', 1, 1, 200 + id)
	elseif buton==5 then
   if turehat[id]==1 then
	freeimage(hatimg[id])
end
   hatimg[id] = image('gfx/hats tiky/scarlet_beret.png', 1, 1, 200 + id)
	elseif buton==6 then
   if turehat[id]==1 then
	freeimage(hatimg[id])
end
   hatimg[id] = image('gfx/hats tiky/pirate.png', 1, 1, 200 + id)
	elseif buton==7 then
   if turehat[id]==1 then
	freeimage(hatimg[id])
end
   hatimg[id] = image('gfx/hats tiky/pumpkin.png', 1, 1, 200 + id)
	elseif buton==8 then
   if turehat[id]==1 then
	freeimage(hatimg[id])
end
   hatimg[id] = image('gfx/hats tiky/santa.png', 1, 1, 200 + id)
	elseif buton==9 then
	    menu(id,'Hat Menu 2/2,Snowman,Black,Phoenix,Skull,Smile,Tyrans,No Hat,Back Page')
end
	if buton~=0 then
		turehat[id]=1
	end
end

alt Re: How to save hats?

Cure Pikachu
User Off Offline

Zitieren
I don't know if you would want this, done from scratch.
Mehr >
2× editiert, zuletzt 05.05.21 20:51:59
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht