Drawing Shapes via Script

From Soldat Community Wiki
Revision as of 10:52, 2 April 2014 by Akinaro (talk | contribs)
Jump to: navigation, search
Back to: Scripts Database

script name: Just DrawCircle Function
original author: autor
core version: NoMatter

Description
Just draws a circle...

DrawCircle.png


procedure DrawCircle(ID, Num: byte; Delay: integer; Colour: longint; Scale: single; x, y, radius: integer);

Parameter Info
ID (Byte): Player ID to draw the circle to. Set to 0 to drawto all players.
Num (Byte): Function will use DrawTextEx layers starting from this number. (If you are using layers until 99, assign this Num 100 to make it use free layers)
Delay (Integer): Time in milliseconds for the circle to remain on screen.
Colour (Longint): Colour the circle should be when drawn to the screen.
Scale (Single): Scale to use for drawing, line width.
x (Integer): X position for the text. 1 -> 640
y (Integer): Y position for the text. 1 -> 480
radius (integer): Radius of the circle.



Additional Info
When i tried to draw a circle by just writing "o" with DrawText but it didnt work. "o" is actually a square in soldat's font :D
So i decided to make this function. I converted an algorithm that i use in c. And then i realized we can draw all the shapes in soldat screen.
I mean, DrawTriangle and DrawEllipse etc. will be here if you guys want :)
But there are some bugs with DrawCircle. Since there is 255 layers to use, it can draw limited-size circle.
The biggest circle you can draw must be at maximum 47 radius.


Download Links

Forum Download Link


Back to: Scripts Database