From 0af47949c69646ab58880f5bd3276b4854e8dc6b Mon Sep 17 00:00:00 2001 From: Aldrin John Olaer Manalansan <39627255+Aldrin-John-Olaer-Manalansan@users.noreply.github.com> Date: Mon, 3 Mar 2025 17:08:39 +0800 Subject: [PATCH] :memo: update commands --- sa/sa.json | 178 +++++++++++++++++++-------------- sa/snippets/SAMPFUNCS/0B74.txt | 4 + sa/snippets/SAMPFUNCS/0B75.txt | 16 +++ sa/snippets/SAMPFUNCS/0B76.txt | 1 + sa/snippets/SAMPFUNCS/0B77.txt | 6 ++ sa/snippets/SAMPFUNCS/0B78.txt | 1 + sa/snippets/SAMPFUNCS/0B79.txt | 2 + sa/snippets/SAMPFUNCS/0B7A.txt | 1 + sa/snippets/SAMPFUNCS/0B7B.txt | 1 + sa/snippets/SAMPFUNCS/0B80.txt | 1 + sa/version.txt | 2 +- 11 files changed, 136 insertions(+), 77 deletions(-) create mode 100644 sa/snippets/SAMPFUNCS/0B74.txt create mode 100644 sa/snippets/SAMPFUNCS/0B75.txt create mode 100644 sa/snippets/SAMPFUNCS/0B76.txt create mode 100644 sa/snippets/SAMPFUNCS/0B77.txt create mode 100644 sa/snippets/SAMPFUNCS/0B78.txt create mode 100644 sa/snippets/SAMPFUNCS/0B79.txt create mode 100644 sa/snippets/SAMPFUNCS/0B7A.txt create mode 100644 sa/snippets/SAMPFUNCS/0B7B.txt create mode 100644 sa/snippets/SAMPFUNCS/0B80.txt diff --git a/sa/sa.json b/sa/sa.json index 03806ab1..8ddb1e3f 100644 --- a/sa/sa.json +++ b/sa/sa.json @@ -1,7 +1,7 @@ { "meta": { - "last_update": 1740928903870, - "version": "0.871", + "last_update": 1740992885346, + "version": "0.872", "url": "https://library.sannybuilder.com/#/sa" }, "extensions": [ @@ -61781,133 +61781,150 @@ "short_desc": "Draws the texture on the screen" }, { - "id": "0B74", - "name": "SAMP_SET_CHAT_STRING", - "num_params": 5, - "attrs": { - "is_condition": true - }, "input": [ { - "name": "_p1", + "name": "chatlineid", "type": "int" }, { - "name": "_p2", - "type": "int" + "name": "text", + "type": "string" }, { - "name": "_p3", - "type": "int" + "name": "prefix", + "type": "string" }, { - "name": "_p4", + "name": "textcolor", "type": "int" }, { - "name": "_p5", + "name": "prefixcolor", "type": "int" } - ] - }, - { - "id": "0B75", - "name": "SAMP_GET_CHAT_STRING", + ], + "id": "0B74", + "name": "SAMP_SET_CHAT_LINE_PARAMS", "num_params": 5, "attrs": { "is_condition": true }, + "short_desc": "Changes the chat line parameters to custom ones" + }, + { "input": [ { - "name": "_p1", + "name": "chatlineid", "type": "int" - }, + } + ], + "output": [ { - "name": "_p2", - "type": "int" + "name": "stringbuffertext", + "type": "int", + "source": "var_any" }, { - "name": "_p3", - "type": "int" + "name": "stringbufferprefix", + "type": "int", + "source": "var_any" }, { - "name": "_p4", - "type": "int" + "name": "textcolor", + "type": "int", + "source": "var_any" }, { - "name": "_p5", - "type": "int" + "name": "prefixcolor", + "type": "int", + "source": "var_any" } - ] + ], + "id": "0B75", + "name": "SAMP_GET_CHAT_LINE_PARAMS", + "num_params": 5, + "attrs": { + "is_condition": true + }, + "short_desc": "Returns the chat string parameters" }, { - "id": "0B76", - "name": "SAMP_SET_CHAT_INPUT_TEXT", - "num_params": 1, "input": [ { - "name": "_p1", - "type": "int" + "name": "text", + "type": "string" } - ] + ], + "id": "0B76", + "name": "SAMP_SET_CHAT_INPUT_TEXT", + "num_params": 1, + "short_desc": "Overwrites the content written at the chat input box" }, { + "output": [ + { + "name": "stringbuffertext", + "type": "int", + "source": "var_any" + } + ], "id": "0B77", "name": "SAMP_GET_CHAT_INPUT_TEXT", "num_params": 1, "attrs": { "is_condition": true }, - "input": [ - { - "name": "_p1", - "type": "int" - } - ] + "short_desc": "Returns the current text in the chat input box" }, { - "id": "0B78", - "name": "SAMP_LOG", - "num_params": 1, "input": [ { - "name": "_p1", - "type": "arguments" + "name": "text", + "type": "string" } - ] + ], + "id": "0B78", + "name": "SF_CONSOLE_LOG", + "num_params": 1, + "short_desc": "Adds a line to the SAMPFUNCS console and logs it" }, { - "id": "0B79", - "name": "SAMP_ENABLE_CHAT_INPUT", - "num_params": 1, "input": [ { - "name": "_p1", - "type": "int" + "name": "isvisible", + "type": "bool" } - ] + ], + "id": "0B79", + "name": "SAMP_SET_CHAT_INPUT_VISIBILITY", + "num_params": 1, + "short_desc": "Sets the visibility status (open/closed) of the chat input box" }, { + "output": [ + { + "name": "pointer", + "type": "int", + "source": "var_any" + } + ], "id": "0B7A", "name": "SAMP_GET_RAKCLIENT_INTERFACE", "num_params": 1, - "input": [ - { - "name": "_p1", - "type": "int" - } - ] + "short_desc": "Returns a pointer to a RakClientInterface object" }, { + "output": [ + { + "name": "pointer", + "type": "int", + "source": "var_any" + } + ], "id": "0B7B", "name": "SAMP_GET_RAKPEER", "num_params": 1, - "input": [ - { - "name": "_p1", - "type": "int" - } - ] + "short_desc": "Returns a pointer to RakPeer" }, { "id": "0B7C", @@ -61972,19 +61989,28 @@ ] }, { - "id": "0B80", - "name": "SAMP_DIALOG_CREATE", - "num_params": 2, "input": [ { - "name": "_p1", - "type": "int" - }, + "name": "title", + "type": "string" + } + ], + "output": [ { - "name": "_p2", - "type": "int" + "name": "handle", + "type": "DxutDialog", + "source": "var_any" } - ] + ], + "id": "0B80", + "name": "SF_DXUT_CREATE_DIALOG", + "num_params": 2, + "class": "DxutDialog", + "member": "Create", + "attrs": { + "is_constructor": true + }, + "short_desc": "Creates a DXUTDialog Object with Title" }, { "id": "0B81", diff --git a/sa/snippets/SAMPFUNCS/0B74.txt b/sa/snippets/SAMPFUNCS/0B74.txt new file mode 100644 index 00000000..06fb2d1c --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B74.txt @@ -0,0 +1,4 @@ +if SAMP_SET_CHAT_LINE_PARAMS {chatlineid} 0 {text} "I changed the Latest Message!" {prefix} "01:13:41.293" {textcolor} 0xFFFFFF00 {prefixcolor} 0xFF00FFFF +then // do something +else // chatlineid is invalid +end \ No newline at end of file diff --git a/sa/snippets/SAMPFUNCS/0B75.txt b/sa/snippets/SAMPFUNCS/0B75.txt new file mode 100644 index 00000000..cdc76f60 --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B75.txt @@ -0,0 +1,16 @@ +strBufText = ALLOCATE_MEMORY {size} 256 +strBufPrefix = ALLOCATE_MEMORY {size} 256 +if int strBufText, strBufPrefix, textColor, prefixColor = SAMP_GET_CHAT_LINE_PARAMS {chatlineid} 0 // test a valid chatlineid +then + // do something to strBufText, strBufPrefix, textColor, prefixColor +else + // this section will not execute +end +if int strBufText, strBufPrefix, textColor, prefixColor = SAMP_GET_CHAT_LINE_PARAMS {chatlineid} 100 // test an invalid chatlineid +then + // this section will not execute +else + // chatlineid is not valid +end +FREE_MEMORY {address} strBufText +FREE_MEMORY {address} strBufPrefix \ No newline at end of file diff --git a/sa/snippets/SAMPFUNCS/0B76.txt b/sa/snippets/SAMPFUNCS/0B76.txt new file mode 100644 index 00000000..2ae3c5cc --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B76.txt @@ -0,0 +1 @@ +SAMP_SET_CHAT_INPUT_TEXT "This message can be found at the input chat box" \ No newline at end of file diff --git a/sa/snippets/SAMPFUNCS/0B77.txt b/sa/snippets/SAMPFUNCS/0B77.txt new file mode 100644 index 00000000..2803f372 --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B77.txt @@ -0,0 +1,6 @@ +int strBufText = ALLOCATE_MEMORY {size} 256 +if strBufText = SAMP_GET_CHAT_INPUT_TEXT +then // do something to strBufText +else // strBufText is unwritable +end +FREE_MEMORY {address} strBufText \ No newline at end of file diff --git a/sa/snippets/SAMPFUNCS/0B78.txt b/sa/snippets/SAMPFUNCS/0B78.txt new file mode 100644 index 00000000..06370558 --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B78.txt @@ -0,0 +1 @@ +SF_CONSOLE_LOG "Logging My Script has been loaded" \ No newline at end of file diff --git a/sa/snippets/SAMPFUNCS/0B79.txt b/sa/snippets/SAMPFUNCS/0B79.txt new file mode 100644 index 00000000..a4797318 --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B79.txt @@ -0,0 +1,2 @@ +SAMP_SET_CHAT_INPUT_VISIBILITY {isvisible} true // visible +SAMP_SET_CHAT_INPUT_VISIBILITY {isvisible} false // hidden \ No newline at end of file diff --git a/sa/snippets/SAMPFUNCS/0B7A.txt b/sa/snippets/SAMPFUNCS/0B7A.txt new file mode 100644 index 00000000..cc8e9cbc --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B7A.txt @@ -0,0 +1 @@ +int RCIPtr = SAMP_GET_RAKCLIENT_INTERFACE \ No newline at end of file diff --git a/sa/snippets/SAMPFUNCS/0B7B.txt b/sa/snippets/SAMPFUNCS/0B7B.txt new file mode 100644 index 00000000..ce777acf --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B7B.txt @@ -0,0 +1 @@ +int RakPeekPtr = SAMP_GET_RAKPEER \ No newline at end of file diff --git a/sa/snippets/SAMPFUNCS/0B80.txt b/sa/snippets/SAMPFUNCS/0B80.txt new file mode 100644 index 00000000..3960e85c --- /dev/null +++ b/sa/snippets/SAMPFUNCS/0B80.txt @@ -0,0 +1 @@ +int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog" \ No newline at end of file diff --git a/sa/version.txt b/sa/version.txt index 643c34f9..56936d49 100644 --- a/sa/version.txt +++ b/sa/version.txt @@ -1 +1 @@ -0.871 \ No newline at end of file +0.872 \ No newline at end of file