English Skin luaa

10 replies
Goto Page
To the start Previous 1 Next To the start
08.02.19 05:56:58 pm
Up
DefuseKIT
User
Offline Off
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
08.02.19 07:16:24 pm
Up
KingShadow
User
Offline Off
Code:
1
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
08.02.19 07:59:51 pm
Up
DefuseKIT
User
Offline Off
@user KingShadow: doesnt work :// can anyone try to give me other code?
08.02.19 09:04:25 pm
Up
Mxcd2345
COMMUNITY BANNED
Offline Off
@user DefuseKIT:

Code:
1
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
08.02.19 09:14:22 pm
Up
DefuseKIT
User
Offline Off
@user Mxcd2345: still doesnt work
09.02.19 08:05:09 am
Up
zyLva okteLon
User
Offline Off
user DefuseKIT has written:
@user KingShadow: doesnt work :// can anyone try to give me other code?


user DefuseKIT I do not see any error in that code, you should check if you have the name of hat equal to the text... maybe it does not have the image in the folder "gfx / police.bmp" or maybe the image is .png
What the F.A.Q.?| zyLva okteLon ∗
09.02.19 05:21:53 pm
Up
Goo
User
Offline Off
Shouldn't you freeimage the image when the player leaves the server?
09.02.19 06:07:50 pm
Up
KingShadow
User
Offline Off
Check your Hat image path
09.02.19 06:15:51 pm
Up
DefuseKIT
User
Offline Off
@user 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
09.02.19 08:23:49 pm
Up
KingShadow
User
Offline Off
I tested it and worked for me check the hat image path
09.02.19 08:37:13 pm
Up
Goo
User
Offline Off
Don't forget to add the freeimage to the leave hook!
To the start Previous 1 Next To the start