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 3, 2025
1 parent 8250cd0 commit 0af4794
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 77 deletions.
178 changes: 102 additions & 76 deletions sa/sa.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"meta": {
"last_update": 1740928903870,
"version": "0.871",
"last_update": 1740992885346,
"version": "0.872",
"url": "https://library.sannybuilder.com/#/sa"
},
"extensions": [
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions sa/snippets/SAMPFUNCS/0B74.txt
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions sa/snippets/SAMPFUNCS/0B75.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions sa/snippets/SAMPFUNCS/0B76.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SAMP_SET_CHAT_INPUT_TEXT "This message can be found at the input chat box"
6 changes: 6 additions & 0 deletions sa/snippets/SAMPFUNCS/0B77.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions sa/snippets/SAMPFUNCS/0B78.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SF_CONSOLE_LOG "Logging My Script has been loaded"
2 changes: 2 additions & 0 deletions sa/snippets/SAMPFUNCS/0B79.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SAMP_SET_CHAT_INPUT_VISIBILITY {isvisible} true // visible
SAMP_SET_CHAT_INPUT_VISIBILITY {isvisible} false // hidden
1 change: 1 addition & 0 deletions sa/snippets/SAMPFUNCS/0B7A.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int RCIPtr = SAMP_GET_RAKCLIENT_INTERFACE
1 change: 1 addition & 0 deletions sa/snippets/SAMPFUNCS/0B7B.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int RakPeekPtr = SAMP_GET_RAKPEER
1 change: 1 addition & 0 deletions sa/snippets/SAMPFUNCS/0B80.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"
2 changes: 1 addition & 1 deletion sa/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.871
0.872

0 comments on commit 0af4794

Please sign in to comment.