Forum

> > CS2D > Scripts > Alcohol Script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Alcohol Script

5 replies
To the start Previous 1 Next To the start

old Alcohol Script

Marcell
Super User Off Offline

Quote
Please help
when i start the map i get access violation

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- Alcohol Effects [MOD] by Csendes Marcell // facebook.com/sqpp15 //

addhook("menu","alc_menu")
addhook("serveraction","alc_serveraction")
addhook("buy","alc_buy")

 function alc_serveraction(id,title,key) 
	if(act==1) then
	menu(id, "Drink, Absinthe 80%")
end	
end

function alc_menu(id, tit, sel)
  if(tit=="Drink") then
       if(sel==1) then
alc-effect_t = image("gfx/alceffect.png",0,0,132+id,id)
imagecolor(alc-effect_t,255,0,0)
imageblend(alc-effect_t,1)
parse"setarmor "..id.." 100"
end
end

end

old Re: Alcohol Script

Avo
User Off Offline

Quote
Maybe I'm wrong, but can name contain "-" ?
1
2
3
alc-effect_t = image("gfx/alceffect.png",0,0,132+id,id)
imagecolor(alc-effect_t,255,0,0)
imageblend(alc-effect_t,1)

old Re: Alcohol Script

Apache uwu
User Off Offline

Quote
Like this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
addhook("menu","alc_menu")
addhook("serveraction","alc_serveraction")

function alc_serveraction(id,act)
	if act==1 then
		menu(id,"Drink,Absinthe 80%")
	end     
end

function alc_menu(id,tit,sel)
	if tit=="Drink" then
		if sel==1 then
			alc_effect_t=image("gfx/alceffect.png",0,0,132+id,id)
			imagecolor(alc_effect_t,255,0,0)
			imageblend(alc_effect_t,1)
			parse("setarmor "..id.." 100")
		end
	end
end

Still I have no idea what this does exactly.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview