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 a967835 commit a52d3a1
Show file tree
Hide file tree
Showing 15 changed files with 255 additions and 140 deletions.
331 changes: 192 additions & 139 deletions sa/sa.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sa/snippets/SAMPFUNCS/0B7C.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int ptr = SAMP_GET_RAKCLIENT_FUNC_BY_INDEX 0
5 changes: 5 additions & 0 deletions sa/snippets/SAMPFUNCS/0B7D.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int ptr
if ptr = SAMP_GET_RPC_FUNC_BY_INDEX {index} 0
then // do something
else // index is invalid
end
5 changes: 5 additions & 0 deletions sa/snippets/SAMPFUNCS/0B7E.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int ptr
if ptr = SAMP_GET_RPC_NODE_BY_INDEX {index} 0
then // do something
else // index is invalid
end
1 change: 1 addition & 0 deletions sa/snippets/SAMPFUNCS/0B7F.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int ptr = SAMP_GET_SAMP_INFO_POINTER
8 changes: 8 additions & 0 deletions sa/snippets/SAMPFUNCS/0B81.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"

// somewhere in the code
int eventID, controlID
if eventID, controlID = SAMP_DIALOG_POP clientSidedDialog
then // do something to eventID, controlID
else // clientSidedDialog is invalid
end
3 changes: 3 additions & 0 deletions sa/snippets/SAMPFUNCS/0B82.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"
SF_DXUT_DIALOG_ADD_BUTTON clientSidedDialog {id} 0 {text} "Cancel" {relcoordx} 25 {relcoordy} 200 {width} 50 {height} 10
SF_DXUT_DIALOG_ADD_BUTTON clientSidedDialog {id} 1 {text} "Submit" {relcoordx} 85 {relcoordy} 200 {width} 50 {height} 10
3 changes: 3 additions & 0 deletions sa/snippets/SAMPFUNCS/0B83.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"
SF_DXUT_DIALOG_ADD_CHECKBOX clientSidedDialog {id} 40 {text} "God Mode" {relcoordx} 10 {relcoordy} 80 {width} 50 {height} 10
SF_DXUT_DIALOG_ADD_CHECKBOX clientSidedDialog {id} 41 {text} "No Collision" {relcoordx} 10 {relcoordy} 140 {width} 50 {height} 10
2 changes: 2 additions & 0 deletions sa/snippets/SAMPFUNCS/0B84.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"
SF_DXUT_DIALOG_SET_COORDS_AND_DIMS clientSidedDialog {coordx} 900 {coordy} 500 {width} 500 {height} 300
2 changes: 2 additions & 0 deletions sa/snippets/SAMPFUNCS/0B85.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"
int dialogCoordX, dialogCoordY, dialogWidth, dialogHeight = SF_DXUT_DIALOG_GET_COORDS_AND_DIMS clientSidedDialog
5 changes: 5 additions & 0 deletions sa/snippets/SAMPFUNCS/0B86.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"

SF_DXUT_DIALOG_SET_VISIBILITY clientSidedDialog {isvisible} true // show dialog

SF_DXUT_DIALOG_SET_VISIBILITY clientSidedDialog {isvisible} false // hide dialog
13 changes: 13 additions & 0 deletions sa/snippets/SAMPFUNCS/0B87.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"

SF_DXUT_DIALOG_SET_VISIBILITY clientSidedDialog {isvisible} true // show dialog
if SF_DXUT_DIALOG_IS_VISIBLE clientSidedDialog
then // expected
else // will not reach this section
end

SF_DXUT_DIALOG_SET_VISIBILITY clientSidedDialog {isvisible} false // hide dialog
if SF_DXUT_DIALOG_IS_VISIBLE clientSidedDialog
then // will not reach this section
else // expected
end
2 changes: 2 additions & 0 deletions sa/snippets/SAMPFUNCS/0B88.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"
SF_DXUT_DIALOG_ADD_EDITBOX clientSidedDialog {id} 60 {initialtext} "Password" {relcoordx} 10 {relcoordy} 200 {width} 100 {height} 10
12 changes: 12 additions & 0 deletions sa/snippets/SAMPFUNCS/0B89.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
int clientSidedDialog = SF_DXUT_CREATE_DIALOG {title} "SF Dialog"
SF_DXUT_DIALOG_ADD_CHECKBOX clientSidedDialog {id} 40 {text} "God Mode" {relcoordx} 10 {relcoordy} 80 {width} 50 {height} 10

int controlText
if controlText = SF_DXUT_DIALOG_GET_TEXT_OF_CONTROL clientSidedDialog {id} 14
then // this section will not be be executed
else // clientSidedDialog has no control with ID = 14
end
if controlText = SF_DXUT_DIALOG_GET_TEXT_OF_CONTROL clientSidedDialog {id} 40
then // expected controlText = "God Mode"
else // this section will not be be executed
end
2 changes: 1 addition & 1 deletion sa/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.872
0.873

0 comments on commit a52d3a1

Please sign in to comment.