Difference between revisions of "Drawing Shapes via Script"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with " Back to: Scripts Database ---- :'''script name:''' Just DrawCircle Function :'''original author:''' autor :'''core version:''' NoMatter ---- ;Description :Just draws a...")
 
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
 
----
 
----
 
:'''script name:''' Just DrawCircle Function  
 
:'''script name:''' Just DrawCircle Function  
:'''original author:''' autor
+
:'''original author:''' NoMatter
:'''core version:''' NoMatter
+
:'''core version:''' 2.7.5
 
----
 
----
  
Line 15: Line 15:
  
 
;Parameter Info
 
;Parameter Info
:ID (Byte): Player ID to draw the circle to. Set to 0 to drawto all players.
+
:'''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)
+
:'''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.
+
:'''Delay (Integer)''': Time in milliseconds for the circle to remain on screen.
:Colour (Longint): Colour the circle should be when drawn to the screen.
+
:'''Colour (Longint)''': Colour the circle should be when drawn to the screen.
:Scale (Single): Scale to use for drawing, line width.
+
:'''Scale (Single)''': Scale to use for drawing, line width.
:x (Integer): X position for the text. 1 -> 640
+
:'''x (Integer)''': X position for the text. 1 -> 640
:y (Integer): Y position for the text. 1 -> 480
+
:'''y (Integer)''': Y position for the text. 1 -> 480
:radius (integer): Radius of the circle.
+
:'''radius (integer)''': Radius of the circle.
  
  

Latest revision as of 11:52, 2 April 2014

Back to: Scripts Database

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

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