DrawSprite(SprIndex,ScreenX,ScreenY,SpriteX,SpriteY,SpriteWidth,SpriteHeight,COLOR); --draws a sprite on a specific location on your screen (X,Y) with a specific portion of it (X,Y,WIDTH,HEIGHT) and a possible COLOR (yes, ALPHA and all other colors are possible); Returns a boolean true if draw is success, false if failure (DirectX issue or SpriteIndex incorrect)
SCRIPT_PATH - a constant value pushed into the lua stack, holding the folder, where lua files are stored.
Small code example:
-- Used sprite: http://i.stack.imgur.com/ipKrd.png local mysprite = CreateSpriteFromFile("ipKrd.png"); --make sure you call this ONLY ONCE, else you will flood your RAM and crash GoS. OnDraw(function(myHero) if mysprite > 0 then DrawSprite(mysprite,200,200,112,1,367,73,ARGB(255,255,255,255)) DrawText("Look! A Button!", 35, 225, 215, ARGB(255,255,255,255)) DrawSprite(mysprite,200,300,0,0,1000,1000,ARGB(255,255,255,255)) end end)How it looks like: