At reload start the script create a gfx on the ground that disappeard after 30 sec (for all playing players).
Forum
CS2D Scripts Reload ScriptReload Script
6 replies 1
At reload start the script create a gfx on the ground that disappeard after 30 sec (for all playing players).
1
2
3
2
3
addhook("reload","clip.drop")					function reload(id,1) image("weapons/clip_d.bmp",x<=0,y>0,id+100,0)	 end
Maybe can someone fix this?
(Sorry my TAB key doesnt work)
image("weapons/clip_d.bmp",x<=0,y>0,id+100,0) <-- now the image will follow and rotating with the player.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
clip = {} clipcounter = {} counter = 0 addhook("reload","reloadimg") function reloadimg(id,1) counter = counter + 1 clip[counter] = image("weapons/clip_d.bmp",player(id,"x"),player(id,"y"),0) timer(100,"dissapear",counter,-1) end function dissapear(counter) clipcounter[counter] = clipcounter[counter] + 1 if (clipcounter[counter]==100) then clipcounter[counter] = 0 freeimage(clip[counter]) freetimer("dissapear",counter) end end
this should work...
Can anybody help me?
The image must stay on the ground not following the player!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
clip = {} clipcounter = {} counter = 0 addhook("reload","reloadimg") function reloadimg(id,1) counter = counter + 1 clip[counter] = image("weapons/clip_d.bmp",0,1,0) imagepos(clip[counter],player(id,"x"),player(id,"y"),player(id,"rot") timer(100,"dissapear",counter,-1) end function dissapear(counter) clipcounter[counter] = clipcounter[counter] + 1 if (clipcounter[counter]==100) then clipcounter[counter] = 0 freeimage(clip[counter]) freetimer("dissapear",counter) end end
I repeat my question:
When reload START create a gfx (loading it from this directory: gfx/weapon/clip/example.bmp so include this in the script) ON THE GROUND that disappeard after 30 sec.
If it's possible i'd like a gfx for each weapon, for example if you grab M4A1 and you reload it load another gfx (for example in this case clip_m4a1.bmp).
1