Forum

> > CS2D > Scripts > How to make free image lua?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch How to make free image lua?

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: How to make free image lua?

Ashelin
BANNED Off Offline

Zitieren
@user Apache uwu: I'm guessing he wants to make an image script with who you can make images appear. Exactly as an Env_Sprite would do. Except, you'd have a command for it. /setimage <x> <y> <image> Or something like that.
I don't really see why he would need a script, if he can just use the map editor.

@user brofistmsia: You mean the infamous kbg2d

alt Re: How to make free image lua?

Rainoth
Moderator Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
img = {}

addhook("say","makeimg")
function makeimg(id,t)
	if string.sub(1,4) == "!img" then
		img[id]=image("gfx/yourfolder/"..string.sub(6)..".png",0,0,0)
	elseif string.sub(1,4) == "!pos" then
		if img[id]~= nil then
			imagepos(img[id],player(id,"x"),player(id,"y),0)
		else
			msg2(id,"You're trying to move a non existing image")
		end
	elseif string.sub(1,5) == "!free" then
		if img[id]~= nil then
			freeimage(img[id])
		end
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht