PHP:
:get_samp_version_id
// 0AB1: @get_samp_version_id 0 _returned: ID 0@
30@ = 0
IF 0AA2: 31@ = "samp.dll" // IF and SET
THEN
31@ += 0x128
0A8D: 29@ = read_memory 31@ size 4 virtual_protect 1
IF 29@ == 0x5542F47A
THEN // 0.3.7 R1
30@ = 1
END
IF 29@ == 0x59C30C94
THEN // 0.3.7 R2
30@ = 2
END
IF 29@ == 0x5A6A3130
THEN // 0.3.DL
30@ = 3
END
31@ -= 8 // reading samp.dll + 0x120
0A8D: 29@ = read_memory 31@ size 4 virtual_protect 1
IF 29@ == 0x5C0B4243
THEN // 0.3.7 R3
30@ = 4
END
IF 29@ == 0x5DD606CD
THEN // 0.3.7 R4
30@ = 5
END
IF 29@ == 0x6094ACAB
THEN // 0.3.7 R4 - v2
30@ = 6
END
IF 29@ == 0x6372C39E
THEN // 0.3.7 R5
30@ = 7
END
0AA3: freelib 31@
END
0AB2: ret 1 30@
PHP:
:registerClientCommand
{
Credits:
Parazitas - UGBASE
kawa_operand - BlastHack
ajom - UGBASE
Usage:
0AC8: 31@ = allocate_memory_size 1024
0AD3: 31@ = string_format "vr"
0AC7: 30@ = var 30@ pointer
0AC7: 29@ = var 29@ pointer
0AB1: @registerClientCommand 3 _CommandName 31@ _TogglingVar 30@ _ParamsPtrToVar 29@
30@ = 0 // default disabled
29@ = 0 // null ptr
Note:
The Reference Pointers passed at _TogglingVar and _ParamPtrToVar are required to be treated as ReadOnly. Which means that the value of those two Reference Pointers should not be manually overwritten/changed.
I am having a problem with opcode 0AB1, it permanently writes on the main thread's local variables. Maybe its because I directly writes on the passed variable's memory pointer. An example case:
Passing _ParamPtrToVar = 31@ , _TogglingVar = 30@
Opcode 0AB1 31@ == Main Thread's 31@
Opcode 0AB1 30@ == Main Thread's 30@
Thats why I decided to use global variables since they aren't that exposed on scripts.
}
CONST
// WARNING:
// Do not use Local Variables
// Do not recycle/use the three variables on any operation inside the script because these variables will always be used by this function and doesn't override outside the function. I promise you that even if you replace this with a local variable, It will cause overwriting mistakes that will mess the operation
// You can Replace any of these variables into any UNIQUE GLOBAL VARIABLES
VAR1 = $2AFD
VAR2 = $2BEC
VAR3 = $2CDE
VAR4 = $2DCB
VAR5 = $2EBF
VAR6 = $2FAA
END
IF 0AA2: VAR4 = "samp.dll"
THEN
// ~~~~~~~~~~~~~ Create a New Callback Structure
{
51 // push ecx
56 // push esi
8B 74 24 0C // mov esi, [esp+0Ch]
89 34 25 11 11 11 11 // mov [11111111], esi // later: [11111111] becomes 1@
83 35 11 11 11 11 01 // xor [11111111], 01 // later: [11111111] becomes 2@
5E // pop esi
59 // pop ecx
C3 // retn
}
// Avoid using local variables by saving the values inside a global variables
008A: VAR1 = 0@
008A: VAR2 = 2@
008A: VAR3 = 1@
//
0AC8: VAR5 = allocate_memory_size 23 // undeleteable memory region
0084: VAR6 = VAR5
0A8C: write_memory VAR6 size 4 value 0x748B5651 virtual_protect 1
VAR6 += 4
0A8C: write_memory VAR6 size 4 value 0x34890C24 virtual_protect 1
VAR6 += 4
0A8C: write_memory VAR6 size 1 value 0x25 virtual_protect 1
VAR6++
// 0A8C: write_memory VAR2 size 4 value 0 virtual_protect 0 // null string // NOT WORKING due to this function's varibles overriding
0A8C: write_memory VAR6 size 4 value VAR2 virtual_protect 1
VAR6 += 4
0A8C: write_memory VAR6 size 2 value 0x3583 virtual_protect 1
VAR6 += 2
// 0A8C: write_memory VAR3 size 4 value 0 virtual_protect 0 // Zeroing TogglingVar // NOT WORKING due to this function's varibles overriding
0A8C: write_memory VAR6 size 4 value VAR3 virtual_protect 1
VAR6 += 4
0A8C: write_memory VAR6 size 4 value 0xC3595E01 virtual_protect 1
// ~~~~~~~~~~~~~ now callback struct VAR5 is ready
0AB1: @get_samp_version_id 0 _returned: ID 17@
IF 17@ > 0
THEN
IF 17@ == 1 // 0.3.7 R1
THEN
0A8E: VAR6 = VAR4 + 0x21A0E8 // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
VAR4 += 0x65AD0 // SAMP_REGISTER_CLIENT_CMD_OFFSET
END
IF 17@ == 2 // 0.3.7 R2
THEN
0A8E: VAR6 = VAR4 + 0x21A0F0 // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
VAR4 += 0x65BA0 // SAMP_REGISTER_CLIENT_CMD_OFFSET
END
IF 17@ == 3 // 0.3.DL
THEN
0A8E: VAR6 = VAR4 + 0x2ACA14 // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
VAR4 += 0x691B0 // SAMP_REGISTER_CLIENT_CMD_OFFSET
END
IF 17@ == 4 // 0.3.7 R3
THEN
0A8E: VAR6 = VAR4 + 0x26E8CC // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
VAR4 += 0x69000 // SAMP_REGISTER_CLIENT_CMD_OFFSET
END
IF 17@ == 5 // 0.3.7 R4
THEN
0A8E: VAR6 = VAR4 + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
VAR4 += 0x69730 // SAMP_REGISTER_CLIENT_CMD_OFFSET
END
IF 17@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: VAR6 = VAR4 + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
VAR4 += 0x69770 // SAMP_REGISTER_CLIENT_CMD_OFFSET
END
IF 17@ == 7 // 0.3.7 R5
THEN
0A8E: VAR6 = VAR4 + 0x26EB84 // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: VAR6 = read_memory VAR6 size 4 virtual_protect 1
VAR4 += 0x69770 // SAMP_REGISTER_CLIENT_CMD_OFFSET
END
0AA6: call_method VAR4 struct VAR6 num_params 2 pop 0 VAR5 VAR1
END
0AA3: freelib 31@
END
0AB2: ret 0
PHP:
:is_chat_opened
{
Set TRUE if you wanna check when chat is opened
Set FALSE if you wanna check when chat is closed
Usage:
IF 0AB1: @is_chat_opened 1 CheckingState FALSE // State: TRUE = opened ; FALSE = closed
}
IF 0AA2: 31@ = "samp.dll"
THEN
0AB1: @get_samp_version_id 0 _returned: ID 17@
IF 17@ > 0
THEN
IF 17@ == 1 // 0.3.7 R1
THEN
0A8E: 30@ = 31@ + 0x21A0E8 // SAMP_CHAT_INPUT_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 2 // 0.3.7 R2
THEN
0A8E: 30@ = 31@ + 0x21A0F0 // SAMP_CHAT_INPUT_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 3 // 0.3.DL
THEN
0A8E: 30@ = 31@ + 0x2ACA14 // SAMP_CHAT_INPUT_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 4 // 0.3.7 R3
THEN
0A8E: 30@ = 31@ + 0x26E8CC // SAMP_CHAT_INPUT_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 5 // 0.3.7 R4
THEN
0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 7 // 0.3.7 R5
THEN
0A8E: 30@ = 31@ + 0x26EB84 // SAMP_CHAT_INPUT_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x14E0 // SAMP_CHAT_OPENED_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 0@ == TRUE
THEN
IF 29@ == TRUE
THEN 0485: return_true
ELSE 059A: return_false
END
ELSE
IF 29@ == FALSE
THEN 0485: return_true
ELSE 059A: return_false
END
END
END
0AA3: freelib 31@
END
0AB2: ret 0
PHP:
:is_dialog_active
{
Set TRUE if you wanna check when dialog is active
Set FALSE if you wanna check when dialog is closed
Usage:
IF 0AB1: @is_dialog_active 1 CheckingState FALSE // State: TRUE = active ; FALSE = closed
}
IF 0AA2: 31@ = "samp.dll"
THEN
0AB1: @get_samp_version_id 0 _returned: ID 17@
IF 17@ > 0
THEN
IF 17@ == 1 // 0.3.7 R1
THEN
0A8E: 30@ = 31@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 2 // 0.3.7 R2
THEN
0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 3 // 0.3.DL
THEN
0A8E: 30@ = 31@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 4 // 0.3.7 R3
THEN
0A8E: 30@ = 31@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 5 // 0.3.7 R4
THEN
0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 7 // 0.3.7 R5
THEN
0A8E: 30@ = 31@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 0@ == TRUE
THEN
IF 29@ == TRUE
THEN 0485: return_true
ELSE 059A: return_false
END
ELSE
IF 29@ == FALSE
THEN 0485: return_true
ELSE 059A: return_false
END
END
END
0AA3: freelib 31@
END
0AB2: ret 0
Map Icon Style - SA-MP Wiki
team.sa-mp.com
Map icons - SA-MP Wiki
team.sa-mp.com
PHP:
:CreateMarker
{
0.3.7 - R1
0AB1: @CreateMarker 7 ID 2 XYZ 1@ 2@ 3@ Icon 23 Color 0xFF0000FF Style 1
}
IF 0AA2: 31@ = "samp.dll"
THEN
0AB1: @get_samp_version_id 0 _returned: ID 27@
IF 27@ > 0
THEN
IF 27@ == 1 // 0.3.7 R1
THEN
0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x9E20 // SAMP_CREATE_MARKER_OFFSET
END
IF 27@ == 2 // 0.3.7 R2
THEN
0A8E: 30@ = 31@ + 0x21A100 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x9E10 // SAMP_CREATE_MARKER_OFFSET
END
IF 27@ == 3 // 0.3.DL
THEN
0A8E: 30@ = 31@ + 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x9FF0 // SAMP_CREATE_MARKER_OFFSET
END
IF 27@ == 4 // 0.3.7 R3
THEN
0A8E: 30@ = 31@ + 0x26E8DC // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x9F90 // SAMP_CREATE_MARKER_OFFSET
END
IF 27@ == 5 // 0.3.7 R4
THEN
0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0xA2F0 // SAMP_CREATE_MARKER_OFFSET
END
IF 27@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0xA300 // SAMP_CREATE_MARKER_OFFSET
END
IF 27@ == 7 // 0.3.7 R5
THEN
0A8E: 30@ = 31@ + 0x26EB94 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0xA300 // SAMP_CREATE_MARKER_OFFSET
END
0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@
END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:DeleteMarker
{
0.3.7 - R1
0AB1: @DeleteMarker 1 ID 2
}
IF 0AA2: 31@ = "samp.dll"
THEN
0AB1: @get_samp_version_id 0 _returned: ID 27@
IF 27@ > 0
THEN
IF 27@ == 1 // 0.3.7 R1
THEN
0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x8AB0 // SAMP_DELETE_MARKER_OFFSET
END
IF 27@ == 2 // 0.3.7 R2
THEN
0A8E: 30@ = 31@ + 0x21A100 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x8AC0 // SAMP_DELETE_MARKER_OFFSET
END
IF 27@ == 3 // 0.3.DL
THEN
0A8E: 30@ = 31@ + 0x2ACA24 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x8CA0 // SAMP_DELETE_MARKER_OFFSET
END
IF 27@ == 4 // 0.3.7 R3
THEN
0A8E: 30@ = 31@ + 0x26E8DC // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x8C40 // SAMP_DELETE_MARKER_OFFSET
END
IF 27@ == 5 // 0.3.7 R4
THEN
0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x8FA0 // SAMP_DELETE_MARKER_OFFSET
END
IF 27@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: 30@ = 31@ + 0x26EA0C // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x8FB0 // SAMP_DELETE_MARKER_OFFSET
END
IF 27@ == 7 // 0.3.7 R5
THEN
0A8E: 30@ = 31@ + 0x26EB94 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 31@ + 0x8FB0 // SAMP_DELETE_MARKER_OFFSET
END
0AA8: call_function_method 29@ struct 30@ num_params 1 pop 0 Index 0@ _retVal 28@
END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:get_dialog_caption
{
0AB1: @get_dialog_caption 0 _Returned: Caption 1@
}
IF 0AA2: 31@ = "samp.dll"
THEN
0AB1: @get_samp_version_id 0 _returned: ID 17@
IF 17@ > 0
THEN
IF 17@ == 1 // 0.3.7 R1
THEN
0A8E: 30@ = 31@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 2 // 0.3.7 R2
THEN
0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 3 // 0.3.DL
THEN
0A8E: 30@ = 31@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 4 // 0.3.7 R3
THEN
0A8E: 30@ = 31@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 5 // 0.3.7 R4
THEN
0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 17@ == 7 // 0.3.7 R5
THEN
0A8E: 30@ = 31@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0
0A8E: 29@ = 30@ + 0x28 // SAMP_DIALOG_ACTIVE_OFFSET
0A8D: 29@ = readMem 29@ sz 4 vp 0
END
IF 29@ == TRUE
THEN
0A8E: 28@ = 30@ + 0x40 // SAMP_DIALOG_CAPTION_OFFSET
0485: dialog_open
0AB2: ret 1 28@
ELSE 059A: dialog closed
END
END
0AA3: freelib 31@
END
0AB2: ret 0
PHP:
:process_chat_input
/*
0AC8: 1@ = allocate_memory_size 144
0AD3: 1@ = format "text or /command"
0AB1: @process_chat_input 1 InputText 1@
0AC9: free_allocated_memory 1@
*/
IF 0AA2: 31@ = "samp.dll"
THEN
0AB1: @get_samp_version_id 0 _returned: ID 17@
IF 17@ > 0
THEN
IF 17@ == 1 // 0.3.7 R1
THEN
0A8E: 30@ = 31@ + 0x21A0E8 // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0 // pChatInput;
0A8E: 28@ = 29@ + 0x8 // pChatInput->pEditBox;
0A8D: 27@ = readMem 28@ sz 4 vp 0 // pEditBox;
0A8E: 26@ = 31@ + 0x80F60 // CDXUTEditBox::SetText
0A8E: 25@ = 31@ + 0x65D30 // PROCESS_INPUT
END
IF 17@ == 2 // 0.3.7 R2
THEN
0A8E: 30@ = 31@ + 0x21A0F0 // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0 // pChatInput;
0A8E: 28@ = 29@ + 0x8 // pChatInput->pEditBox;
0A8D: 27@ = readMem 28@ sz 4 vp 0 // pEditBox;
0A8E: 26@ = 31@ + 0x81000 // CDXUTEditBox::SetText
0A8E: 25@ = 31@ + 0x65E00 // PROCESS_INPUT
END
IF 17@ == 3 // 0.3.DL
THEN
0A8E: 30@ = 31@ + 0x2ACA14 // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0 // pChatInput;
0A8E: 28@ = 29@ + 0x8 // pChatInput->pEditBox;
0A8D: 27@ = readMem 28@ sz 4 vp 0 // pEditBox;
0A8E: 26@ = 31@ + 0x85000 // CDXUTEditBox::SetText
0A8E: 25@ = 31@ + 0x69410 // PROCESS_INPUT
END
IF 17@ == 4 // 0.3.7 R3
THEN
0A8E: 30@ = 31@ + 0x26E8CC // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0 // pChatInput;
0A8E: 28@ = 29@ + 0x8 // pChatInput->pEditBox;
0A8D: 27@ = readMem 28@ sz 4 vp 0 // pEditBox;
0A8E: 26@ = 31@ + 0x84E70 // CDXUTEditBox::SetText
0A8E: 25@ = 31@ + 0x69260 // PROCESS_INPUT
END
IF 17@ == 5 // 0.3.7 R4
THEN
0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0 // pChatInput;
0A8E: 28@ = 29@ + 0x8 // pChatInput->pEditBox;
0A8D: 27@ = readMem 28@ sz 4 vp 0 // pEditBox;
0A8E: 26@ = 31@ + 0x855B0 // CDXUTEditBox::SetText
0A8E: 25@ = 31@ + 0x69990 // PROCESS_INPUT
END
IF 17@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: 30@ = 31@ + 0x26E9FC // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0 // pChatInput;
0A8E: 28@ = 29@ + 0x8 // pChatInput->pEditBox;
0A8D: 27@ = readMem 28@ sz 4 vp 0 // pEditBox;
0A8E: 26@ = 31@ + 0x855E0 // CDXUTEditBox::SetText
0A8E: 25@ = 31@ + 0x699D0 // PROCESS_INPUT
END
IF 17@ == 7 // 0.3.7 R5
THEN
0A8E: 30@ = 31@ + 0x26EB84 // SAMP_CHAT_INPUT_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0 // pChatInput;
0A8E: 28@ = 29@ + 0x8 // pChatInput->pEditBox;
0A8D: 27@ = readMem 28@ sz 4 vp 0 // pEditBox;
0A8E: 26@ = 31@ + 0x85580 // CDXUTEditBox::SetText
0A8E: 25@ = 31@ + 0x699D0 // PROCESS_INPUT
END
0AA8: call_function_method 26@ struct 27@ num_params 2 pop 0 _bSelected 0 _pszText 0@ _retVal 6@
0AA8: call_function_method 25@ struct 29@ num_params 0 pop 0 _retVal 7@
END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:set_current_dialog_list_item
{
0AB1: @set_current_dialog_list_item 2 SampVersionID 0@ Item 1
}
IF 0AA2: 2@ = "samp.dll"
THEN
IF 0@ > 0
THEN
IF 0@ == 1 // 0.3.7 R1
THEN
0A8E: 3@ = 2@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 3@ = readMem 3@ sz 4 vp 0
0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 4@ = readMem 4@ sz 4 vp 0
0A8E: 5@ = 2@ + 0x863C0 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
END
IF 0@ == 2 // 0.3.7 R2
THEN
0A8E: 3@ = 2@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 3@ = readMem 3@ sz 4 vp 0
0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 4@ = readMem 4@ sz 4 vp 0
0A8E: 5@ = 2@ + 0x86460 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
END
IF 0@ == 3 // 0.3.DL
THEN
0A8E: 3@ = 2@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 3@ = readMem 3@ sz 4 vp 0
0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 4@ = readMem 4@ sz 4 vp 0
0A8E: 5@ = 2@ + 0x8A470 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
END
IF 0@ == 4 // 0.3.7 R3
THEN
0A8E: 3@ = 2@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
0A8D: 3@ = readMem 3@ sz 4 vp 0
0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 4@ = readMem 4@ sz 4 vp 0
0A8E: 5@ = 2@ + 0x8A2E0 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
END
IF 0@ == 5 // 0.3.7 R4
THEN
0A8E: 3@ = 2@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 3@ = readMem 3@ sz 4 vp 0
0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 4@ = readMem 4@ sz 4 vp 0
0A8E: 5@ = 2@ + 0x8AA20 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
END
IF 0@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: 3@ = 2@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 3@ = readMem 3@ sz 4 vp 0
0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 4@ = readMem 4@ sz 4 vp 0
0A8E: 5@ = 2@ + 0x8AA50 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
END
IF 0@ == 7 // 0.3.7 R5
THEN
0A8E: 3@ = 2@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
0A8D: 3@ = readMem 3@ sz 4 vp 0
0A8E: 4@ = 3@ + 0x20 // SAMP_DIALOG_LIST_BOX_OFFSET
0A8D: 4@ = readMem 4@ sz 4 vp 0
0A8E: 5@ = 2@ + 0x8A9F0 // SAMP_SET_DIALOG_LIST_ITEM_OFFSET
END
0AA8: call_function_method 5@ struct 4@ num_params 1 pop 0 Item 1@ _Return: 31@
END
0AA3: freelib 31@
END
0AB2: 0
PHP:
:CloseCurrentDialogWithButton
{
0AB1: @CloseCurrentDialogWithButton 1 Button 1 // 1 = Left , 0 = Right
}
IF 0AA2: 31@ = "samp.dll"
THEN
0AB1: @get_samp_version_id 0 _returned: ID 17@
IF 17@ > 0
THEN
IF 17@ == 1 // 0.3.7 R1
THEN
0A8E: 30@ = 31@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0
0A8E: 28@ = 31@ + 0x6C040 //SAMP_DIALOG_CLOSE
END
IF 17@ == 2 // 0.3.7 R2
THEN
0A8E: 30@ = 31@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0
0A8E: 28@ = 31@ + 0x6C0F0 //SAMP_DIALOG_CLOSE
END
IF 17@ == 3 // 0.3.DL
THEN
0A8E: 30@ = 31@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0
0A8E: 28@ = 31@ + 0x700D0 //SAMP_DIALOG_CLOSE
END
IF 17@ == 4 // 0.3.7 R3
THEN
0A8E: 30@ = 31@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0
0A8E: 28@ = 31@ + 0x6FF40 //SAMP_DIALOG_CLOSE
END
IF 17@ == 5 // 0.3.7 R4
THEN
0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0
0A8E: 28@ = 31@ + 0x70660 //SAMP_DIALOG_CLOSE
END
IF 17@ == 6 // 0.3.7 R4 - v2
THEN
0A8E: 30@ = 31@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0
0A8E: 28@ = 31@ + 0x70690 //SAMP_DIALOG_CLOSE
END
IF 17@ == 7 // 0.3.7 R5
THEN
0A8E: 30@ = 31@ + 0x26EB50 // SAMP_DIALOG_INFO_OFFSET
0A8D: 29@ = readMem 30@ sz 4 vp 0
0A8E: 28@ = 31@ + 0x70630 //SAMP_DIALOG_CLOSE
END
0AA8: call_function_method 28@ struct 29@ num_params 1 pop 0 Button 0@ _retVal 27@
END
0AA3: freelib 31@
END
0AB2: 0
Last edited: