-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update SAMP_REGISTER_CLIENT_SIDED_COMMAND.md
- Loading branch information
1 parent
f19283a
commit 42c1222
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
* When a callback is hooked on a chatcommand, then everytime we type this chatcommand, it will not be sent to the server. To reverse this behavior, call Opcode 0B63 for the affected chatcommand. | ||
* When a callback is hooked on a chatcommand, then everytime we type this chatcommand, it will not be sent to the server. To reverse this behavior, execute SAMP_UNREGISTER_CLIENT_SIDED_COMMAND for the affected chatcommand. | ||
* The chat command trigger text will be **/\<chatcommand\>** . For example: | ||
* if chatcommand = **"killme"** then you need to type **/killme** in chat | ||
* if chatcommand = **"/killme"** then you need to type **//killme** in chat | ||
* You must pass an offset label to callbacklabel. Like For example, **@ChatCallback_KillMe** | ||
* Construct the callback's flow of execution with caution. | ||
* Remember that callbacks have higher priority than the custom script's main thread. Meaning, eveytime the script encounters the **WAIT(Opcode 0001)** command at the main thread, the script will execute all callbacks first(if interrupt flag was fired by a callback), then continues to execute the main thread's commands after where the **WAIT** command was encountered. | ||
* Remember that callbacks have higher priority than the custom script's main thread. Meaning, eveytime the script encounters the WAIT command at the main thread, the script will execute all callbacks first(if interrupt flag was fired by a callback), then continues to execute the main thread's commands after where the command WAIT was encountered. | ||
* Avoid executing too much commands inside the callback. Doing so would lead to undersirable script behavior, like failing to detect interrupts from other registered callbacks. | ||
* **WAIT(Opcode 0001)** command inside a Callback **WILL NOT WORK!** Because callbacks are designed to finish as soon as possible. | ||
* Take note that all callbacks created by this command must use **SAMP_CMD_RET(Opcode 0B43)** command as returning statement, indicating the end of callback. | ||
* **WAIT** command inside a Callback **WILL NOT WORK!** Because callbacks are designed to finish as soon as possible. | ||
* Take note that all callbacks created by this command must use **SAMP_CMD_RET** command as returning statement, indicating the end of callback. |