Skin luaa
10 replies



08.02.19 05:56:58 pm
So if player joins the CT>2 team he automatically gets "gfx/police.bmp" HAT. could anyone give me the script if he has it? I was searching a lot but I couldnt find, but i know that some people have it
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
hatimg={}
addhook('join','_join')
function _join(id)
hatimg[id]=0
end
addhook('spawn','_spawn')
function _spawn(id)
if player(id,"team")==2 then
freeimage(hatimg[id])
hatimg[id] = image('gfx/police.bmp', 1, 1, 200 + id)
end
end
addhook('join','_join')
function _join(id)
hatimg[id]=0
end
addhook('spawn','_spawn')
function _spawn(id)
if player(id,"team")==2 then
freeimage(hatimg[id])
hatimg[id] = image('gfx/police.bmp', 1, 1, 200 + id)
end
end
@
KingShadow: doesnt work :// can anyone try to give me other code?

@
DefuseKIT:

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
hat = {}
addhook("spawn","_spawn")
function _spawn(id)
if player(id,"team") == 2 then
hat[id] = image("gfx/police.bmp",2,1,200+ id)
end
end
addhook("die","_die")
function _die(vic,id)
if hat[vic] ~= nil then
freeimage(hat[vic])
hat[vic] = nil
end
end
addhook("spawn","_spawn")
function _spawn(id)
if player(id,"team") == 2 then
hat[id] = image("gfx/police.bmp",2,1,200+ id)
end
end
addhook("die","_die")
function _die(vic,id)
if hat[vic] ~= nil then
freeimage(hat[vic])
hat[vic] = nil
end
end

@
KingShadow: doesnt work :// can anyone try to give me other code?


What the F.A.Q.?|
faqduLLAH

Shouldn't you freeimage the image when the player leaves the server?
It's hard being the best girl in the whole entire world
@
KingShadow: excuse me everythings fine now.
BTW I tried with terrorists same, gfx/inmate.bmp.
if player(id,"team") == 1 and "gfx/inmate.bmp",2,1,200+ id
and also _spawn to _spawn2 but it doesnt work

BTW I tried with terrorists same, gfx/inmate.bmp.
if player(id,"team") == 1 and "gfx/inmate.bmp",2,1,200+ id
and also _spawn to _spawn2 but it doesnt work

Don't forget to add the freeimage to the leave hook!
It's hard being the best girl in the whole entire world



