Skip to content

Commit

Permalink
📝 update commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Aldrin-John-Olaer-Manalansan committed Mar 2, 2025
1 parent 59df2e5 commit 8250cd0
Show file tree
Hide file tree
Showing 12 changed files with 164 additions and 99 deletions.
237 changes: 140 additions & 97 deletions sa/sa.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"meta": {
"last_update": 1740911072455,
"version": "0.870",
"last_update": 1740928903870,
"version": "0.871",
"url": "https://library.sannybuilder.com/#/sa"
},
"extensions": [
Expand Down Expand Up @@ -61437,7 +61437,7 @@
}
],
"id": "0B67",
"name": "SAMP_ARGB_TO_HEX",
"name": "SF_ARGB_TO_HEX",
"num_params": 5,
"short_desc": "mixes color channels into 0xAARRGGBB colorcode format"
},
Expand Down Expand Up @@ -61538,204 +61538,247 @@
"short_desc": "Draws a rectangular area with border at the specified coordinates"
},
{
"id": "0B6B",
"name": "SAMP_RENDER_GET_FONT_DRAW_LENGTH",
"num_params": 3,
"input": [
{
"name": "_p1",
"type": "int"
"name": "self",
"type": "RenderFont"
},
{
"name": "_p2",
"type": "int"
},
"name": "text",
"type": "string"
}
],
"output": [
{
"name": "_p3",
"type": "int"
"name": "width",
"type": "int",
"source": "var_any"
}
]
],
"id": "0B6B",
"name": "SF_RENDER_GET_DRAW_WIDTH_OF_TEXT_WITH_FONT",
"num_params": 3,
"short_desc": "Returns the width (in pixels) that will be occupied by the text with font",
"class": "RenderFont",
"member": "GetDrawWidth"
},
{
"id": "0B6C",
"name": "SAMP_RENDER_GET_FONT_DRAW_HEIGHT",
"num_params": 2,
"input": [
{
"name": "_p1",
"type": "int"
},
"name": "self",
"type": "RenderFont"
}
],
"output": [
{
"name": "_p2",
"type": "int"
"name": "height",
"type": "int",
"source": "var_any"
}
]
],
"id": "0B6C",
"name": "SF_RENDER_GET_FONT_DRAW_HEIGHT",
"num_params": 2,
"short_desc": "Returns the height (in pixels) occupied by any text that uses the specified font",
"class": "RenderFont",
"member": "GetDrawHeight"
},
{
"id": "0B6D",
"name": "SAMP_RENDER_CREATE_FONT",
"num_params": 4,
"input": [
{
"name": "_p1",
"type": "int"
"name": "fontname",
"type": "string"
},
{
"name": "_p2",
"name": "size",
"type": "int"
},
{
"name": "_p3",
"name": "flags",
"type": "int"
},
}
],
"output": [
{
"name": "_p4",
"type": "int"
"name": "handle",
"type": "RenderFont",
"source": "var_any"
}
]
],
"id": "0B6D",
"name": "SF_RENDER_CREATE_FONT",
"num_params": 4,
"short_desc": "Creates a RenderFont Object",
"class": "RenderFont",
"member": "Create",
"attrs": {
"is_constructor": true
}
},
{
"input": [
{
"name": "self",
"type": "RenderFont"
}
],
"id": "0B6E",
"name": "SAMP_RENDER_RELEASE_FONT",
"name": "SF_RENDER_DELETE_FONT",
"num_params": 1,
"attrs": {
"is_condition": true
"is_condition": true,
"is_destructor": true
},
"input": [
{
"name": "_p1",
"type": "int"
}
]
"short_desc": "Destroys the specified font object, freeing it from memory",
"class": "RenderFont",
"member": "Delete"
},
{
"id": "0B6F",
"name": "SAMP_RENDER_FONT_DRAW_TEXT",
"num_params": 5,
"input": [
{
"name": "_p1",
"type": "int"
"name": "self",
"type": "RenderFont"
},
{
"name": "_p2",
"type": "int"
"name": "text",
"type": "string"
},
{
"name": "_p3",
"name": "coordx",
"type": "int"
},
{
"name": "_p4",
"name": "coordy",
"type": "int"
},
{
"name": "_p5",
"name": "color",
"type": "int"
}
]
],
"id": "0B6F",
"name": "SF_RENDER_DRAW_TEXT_WITH_FONT",
"num_params": 5,
"short_desc": "Draws text using the specified font",
"class": "RenderFont",
"member": "DrawText"
},
{
"id": "0B70",
"name": "SAMP_RENDER_DRAW_POLYGON",
"num_params": 7,
"input": [
{
"name": "_p1",
"name": "coordx",
"type": "int"
},
{
"name": "_p2",
"name": "coordy",
"type": "int"
},
{
"name": "_p3",
"name": "width",
"type": "int"
},
{
"name": "_p4",
"name": "height",
"type": "int"
},
{
"name": "_p5",
"name": "cornercount",
"type": "int"
},
{
"name": "_p6",
"type": "int"
"name": "heading",
"type": "float"
},
{
"name": "_p7",
"name": "color",
"type": "int"
}
]
],
"id": "0B70",
"name": "SF_RENDER_DRAW_POLYGON",
"num_params": 7,
"short_desc": "Draws a polygon with the specified parameters"
},
{
"input": [
{
"name": "filepath",
"type": "string"
}
],
"output": [
{
"name": "handle",
"type": "RenderTexture",
"source": "var_any"
}
],
"id": "0B71",
"name": "SAMP_RENDER_LOAD_TEXTURE_FROM_FILE",
"name": "SF_RENDER_LOAD_TEXTURE_FROM_FILE",
"num_params": 2,
"attrs": {
"is_condition": true
"is_condition": true,
"is_constructor": true
},
"short_desc": "Loads a file (any image, or txd) as RenderTexture Object",
"class": "RenderTexture",
"member": "Load"
},
{
"input": [
{
"name": "_p1",
"type": "int"
},
{
"name": "_p2",
"type": "int"
"name": "self",
"type": "RenderTexture"
}
]
},
{
],
"id": "0B72",
"name": "SAMP_RENDER_RELEASE_TEXTURE",
"name": "SF_RENDER_RELEASE_TEXTURE",
"num_params": 1,
"attrs": {
"is_condition": true
"is_condition": true,
"is_destructor": true
},
"input": [
{
"name": "_p1",
"type": "int"
}
]
"class": "RenderTexture",
"member": "Release",
"short_desc": "Releases the RenderTexture Object, freeing it from memory"
},
{
"id": "0B73",
"name": "SAMP_RENDER_DRAW_TEXTURE",
"num_params": 7,
"input": [
{
"name": "_p1",
"type": "int"
"name": "self",
"type": "RenderTexture"
},
{
"name": "_p2",
"name": "coordx",
"type": "int"
},
{
"name": "_p3",
"name": "coordy",
"type": "int"
},
{
"name": "_p4",
"name": "width",
"type": "int"
},
{
"name": "_p5",
"name": "height",
"type": "int"
},
{
"name": "_p6",
"type": "int"
"name": "heading",
"type": "float"
},
{
"name": "_p7",
"name": "contrast",
"type": "int"
}
]
],
"id": "0B73",
"name": "SF_RENDER_DRAW_TEXTURE",
"num_params": 7,
"class": "RenderTexture",
"member": "Draw",
"short_desc": "Draws the texture on the screen"
},
{
"id": "0B74",
Expand Down
2 changes: 1 addition & 1 deletion sa/snippets/SAMPFUNCS/0B67.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
int colorCode = SAMP_ARGB_TO_HEX {alpha} 0xFF {red} 0x5A {green} 0x14 {blue} 0xCA
int colorCode = SF_ARGB_TO_HEX {alpha} 0xFF {red} 0x5A {green} 0x14 {blue} 0xCA
// expected: colorCode = 0xFF5A14CA
3 changes: 3 additions & 0 deletions sa/snippets/SAMPFUNCS/0B6B.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int textFont = SF_RENDER_CREATE_FONT {fontname} "Calibri" {size} 9 {flags} 0x04
int textWidth = SF_RENDER_GET_DRAW_WIDTH_OF_TEXT_WITH_FONT textFont {text} "Hello World!"
// do something to textWidth
3 changes: 3 additions & 0 deletions sa/snippets/SAMPFUNCS/0B6C.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int textFont = SF_RENDER_CREATE_FONT {fontname} "Calibri" {size} 9 {flags} 0x04
int textHeight = SF_RENDER_GET_FONT_DRAW_HEIGHT textFont
// do something to textHeight
2 changes: 2 additions & 0 deletions sa/snippets/SAMPFUNCS/0B6D.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int textFont = SF_RENDER_CREATE_FONT {fontname} "Calibri" {size} 9 {flags} 0x04
// do something to textFont
3 changes: 3 additions & 0 deletions sa/snippets/SAMPFUNCS/0B6E.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int textFont = SF_RENDER_CREATE_FONT {fontname} "Calibri" {size} 9 {flags} 0x04
// do something to textFont
SF_RENDER_DELETE_FONT textFont // free renderfont object from memory
2 changes: 2 additions & 0 deletions sa/snippets/SAMPFUNCS/0B6F.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int textFont = SF_RENDER_CREATE_FONT {fontname} "Calibri" {size} 9 {flags} 0x04
SF_RENDER_DRAW_TEXT_WITH_FONT textFont {text} "Hello World" {coordx} 400 {coordy} 215 {color} 0xFFFF0000 // write a red colored "Hello World" at screen
1 change: 1 addition & 0 deletions sa/snippets/SAMPFUNCS/0B70.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SF_RENDER_DRAW_POLYGON {coordx} 500 {coordy} 308 {width} 300 {height} 218 {cornercount} 5 {heading} 60.0 {color} 0xFF00FF00 // draw a green pentagon
2 changes: 2 additions & 0 deletions sa/snippets/SAMPFUNCS/0B71.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int myTexture = SF_RENDER_LOAD_TEXTURE_FROM_FILE {filepath} "pic.png"
// do something to myTexture
Loading

0 comments on commit 8250cd0

Please sign in to comment.