[CLEO] Some snippets

Status
Not open for further replies.

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
0.3.7 - R1
PHP:
:ShowDialog
{
    0.3.7 - R1
    0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 1
    0A8E: 11@ = 10@ + 0x6B9C0 //SAMP_DIALOG_SHOW
    0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0

:SetDialogInputEditBoxText
{
    0.3.7 - R1
    0AB1: @SetDialogInputEditBoxText 2 => text 0@ selected 0
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0B8            // SAMP_DIALOG_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
 
    0A8E: 5@ = 2@ + 0x80F60 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
 
    // CDXUTEditBox::SetText takes 2 params
    // 1 - pointer to zero terminated string
    // 2 - bool, if text is to be selected or not
 
    0AA8: call_function_method 5@ struct 4@ num_params 2 pop 0 _bSelected 1@ _pszText 0@ _retVal 6@
end
0AB2: 0


:GetDialogInputEditBoxText
{
    0.3.7 - R1
    0AB1: @GetDialogInputEditBoxText 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0B8            // SAMP_DIALOG_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
 
    0A8E: 5@ = 2@ + 0x81030 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
 
    0AA8: call_function_method 5@ struct 4@ num_params 0 pop 0 _Return: 0@
end
0AB2: 1 0@

:GetCurrentDialogListItem
{
    0.3.7 - R1
    0AB1: @GetCurrentDialogListItem 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0B8       
    0A8D: 3@ = readMem 3@ sz 4 vp 0   
    0A8E: 4@ = 3@ + 0x20              
    0A8D: 4@ = readMem 4@ sz 4 vp 0   
 
    0A8E: 5@ = 2@ + 0x84850
 
    0AA8: call_function_method 5@ struct 4@ num_params 1 pop 0 -1 _Return: 0@
end
0AB2: 1 0@

:CloseCurrentDialogWithButton
{
    0.3.7 - R1
    0AB1: @CloseCurrentDialogWithButton 1 Button 0 // 1 = Left , 0 = Right
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    0A8E: 11@ = 10@ +  0x6C040 //SAMP_DIALOG_CLOSE
    0AA8: call_function_method 11@ struct 12@ num_params 1 pop 0 Button 0@ _retVal 6@
END
0AB2: 0

0.3.7 - R2
PHP:
:ShowDialog
{
    0.3.7 - R2
    0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 1
    0A8E: 11@ = 10@ + 0x6BA70 //SAMP_DIALOG_SHOW
    0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0

:SetDialogInputEditBoxText
{
    0.3.7 - R2
    0AB1: @SetChatInputEditBoxText 2 => text 0@ selected 0
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0C0            // SAMP_DIALOG_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
 
    0A8E: 5@ = 2@ + 0x81000 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
 
    // CDXUTEditBox::SetText takes 2 params
    // 1 - pointer to zero terminated string
    // 2 - bool, if text is to be selected or not
 
    0AA8: call_function_method 5@ struct 4@ num_params 2 pop 0 _bSelected 1@ _pszText 0@ _retVal 6@
end
0AB2: 0


:GetDialogInputEditBoxText
{
    0.3.7 - R2
    0AB1: @GetDialogInputText 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0C0            // SAMP_DIALOG_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
 
    0A8E: 5@ = 2@ + 0x810D0 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
 
    0AA8: call_function_method 5@ struct 4@ num_params 0 pop 0 _Return: 0@
end
0AB2: 1 0@

:CloseCurrentDialogWithButton
{
    0.3.7 - R2
    0AB1: @CloseCurrentDialogWithButton 1 Button 0 // 1 = Left , 0 = Right
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x21A0C0 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    0A8E: 11@ = 10@ +  0x6C0F0 //SAMP_DIALOG_CLOSE
    0AA8: call_function_method 11@ struct 12@ num_params 1 pop 0 0@ $NOT_USED
END
0AB2: 0

:GetCurrentDialogListItem
{
    0.3.7 - R2
    0AB1: @GetCurrentDialogListItem 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0C0       
    0A8D: 3@ = readMem 3@ sz 4 vp 0   
    0A8E: 4@ = 3@ + 0x20              
    0A8D: 4@ = readMem 4@ sz 4 vp 0   
 
    0A8E: 5@ = 2@ + 0x848F0
 
    0AA8: call_function_method 5@ struct 4@ num_params 1 pop 0 -1 _Return: 0@
end
0AB2: 1 0@


0.3.7 - R3
PHP:
:ShowDialog
{
    0.3.7 - R3
    0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 1
    0A8E: 11@ = 10@ + 0x6F8C0 //SAMP_DIALOG_SHOW
    0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0

:SetDialogInputEditBoxText
{
    0.3.7 - R3
    0AB1: @SetChatInputEditBoxText 2 => text 0@ selected 0
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x26E898            // SAMP_DIALOG_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
 
    0A8E: 5@ = 2@ + 0x84E70 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
 
    // CDXUTEditBox::SetText takes 2 params
    // 1 - pointer to zero terminated string
    // 2 - bool, if text is to be selected or not
 
    0AA8: call_function_method 5@ struct 4@ num_params 2 pop 0 _bSelected 1@ _pszText 0@ _retVal 6@
end
0AB2: 0


:GetDialogInputEditBoxText
{
    0.3.7 - R3
    0AB1: @GetDialogInputText 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x26E898            // SAMP_DIALOG_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
 
    0A8E: 5@ = 2@ + 0x84F40 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
 
    0AA8: call_function_method 5@ struct 4@ num_params 0 pop 0 _Return: 0@
end
0AB2: 1 0@

:CloseCurrentDialogWithButton
{
    0.3.7 - R3
    0AB1: @CloseCurrentDialogWithButton 1 Button 0 // 1 = Left , 0 = Right
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x26E898 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    0A8E: 11@ = 10@ +  0x6FF40 //SAMP_DIALOG_CLOSE
    0AA8: call_function_method 11@ struct 12@ num_params 1 pop 0 0@ $NOT_USED
END
0AB2: 0

:GetCurrentDialogListItem
{
    0.3.7 - R3
    0AB1: @GetCurrentDialogListItem 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x26E898       
    0A8D: 3@ = readMem 3@ sz 4 vp 0   
    0A8E: 4@ = 3@ + 0x20              
    0A8D: 4@ = readMem 4@ sz 4 vp 0   
 
    0A8E: 5@ = 2@ + 0x88760
 
    0AA8: call_function_method 5@ struct 4@ num_params 1 pop 0 -1 _Return: 0@
end
0AB2: 1 0@


0.3.DL
PHP:
:ShowDialog
{
    0.3.DL
    0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 1
    0A8E: 11@ = 10@ + 0x6FA50 //SAMP_DIALOG_SHOW
    0AA6: call_method 11@ struct 12@ num_params 7 pop 0 params 0 RightButton 4@ LeftButton 3@ dText 2@ Caption 1@ dType 5@ dID 0@ bServerside 0 _retVal 6@
END
0AB2: 0

:SetDialogInputEditBoxText
{
    0.3.DL
    0AB1: @SetChatInputEditBoxText 2 => text 0@ selected 0
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x2AC9E0            // SAMP_DIALOG_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
 
    0A8E: 5@ = 2@ + 0x85000 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
 
    // CDXUTEditBox::SetText takes 2 params
    // 1 - pointer to zero terminated string
    // 2 - bool, if text is to be selected or not
 
    0AA8: call_function_method 5@ struct 4@ num_params 2 pop 0 _bSelected 1@ _pszText 0@ _retVal 6@
end
0AB2: 0


:GetDialogInputEditBoxText
{
    0.3.DL
    0AB1: @GetDialogInputText 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x2AC9E0            // SAMP_DIALOG_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
 
    0A8E: 5@ = 2@ + 0x850D0 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
 
    0AA8: call_function_method 5@ struct 4@ num_params 0 pop 0 _Return: 0@
end
0AB2: 1 0@

:CloseCurrentDialogWithButton
{
    0.3.DL
    0AB1: @CloseCurrentDialogWithButton 1 Button 0 // 1 = Left , 0 = Right
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x2AC9E0 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    0A8E: 11@ = 10@ + 0x700D0 //SAMP_DIALOG_CLOSE
    0AA8: call_function_method 11@ struct 12@ num_params 1 pop 0 0@ $NOT_USED
END
0AB2: 0

:GetCurrentDialogListItem
{
    0.3.DL
    0AB1: @GetCurrentDialogListItem 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x2AC9E0       
    0A8D: 3@ = readMem 3@ sz 4 vp 0   
    0A8E: 4@ = 3@ + 0x20              
    0A8D: 4@ = readMem 4@ sz 4 vp 0   
 
    0A8E: 5@ = 2@ + 0x888F0
 
    0AA8: call_function_method 5@ struct 4@ num_params 1 pop 0 -1 _Return: 0@
end
0AB2: 1 0@

0.3.7 - R4
PHP:
:CloseCurrentDialogWithButton
{
    0.3.7 - R4
    0AB1: @CloseCurrentDialogWithButton 1 Button 0 // 1 = Left , 0 = Right
}
IF 0AA2: 10@ = "samp.dll"
THEN 
    0A8E: 11@ = 10@ + 0x26E9C8 // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    0A8E: 11@ = 10@ + 0x70660 //SAMP_DIALOG_CLOSE
    0AA8: call_function_method 11@ struct 12@ num_params 1 pop 0 0@ $NOT_USED
END
0AB2: 0

:GetCurrentDialogListItem
{
    0.3.7 - R4
    0AB1: @GetCurrentDialogListItem 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x26E9C8        
    0A8D: 3@ = readMem 3@ sz 4 vp 0    
    0A8E: 4@ = 3@ + 0x20               
    0A8D: 4@ = readMem 4@ sz 4 vp 0    
  
    0A8E: 5@ = 2@ + 0x88EA0
  
    0AA8: call_function_method 5@ struct 4@ num_params 1 pop 0 -1 _Return: 0@
end
0AB2: 1 0@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
PHP:
:GetChatInputEditBoxText
{
    0.3.7 - R1
    0AB1: @GetChatInputEditBoxText 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0E8            // SAMP_CHAT_INPUT_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pChatInput;
    0A8E: 4@ = 3@ + 0x8                // pChatInput->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
   
    0A8E: 5@ = 2@ + 0x81030 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
   
    0AA8: call_function_method 5@ struct 4@ num_params 0 pop 0  _Return: 0@
end
0AB2: 1 0@
PHP:
:PROCESS_CHAT_INPUT
{
    0.3.7 - R1
    Ex.:
    0AB1: @PROCESS_CHAT_INPUT 1 InputText 0@
}
IF 0AA2: 20@ = "samp.dll"
THEN
    0A8E: 21@ = 20@ + 0x21A0E8            // SAMP_CHAT_INPUT_INFO_OFFSET
    0A8D: 22@ = readMem 21@ sz 4 vp 0     // pChatInput;
    0A8E: 26@ = 22@ + 0x8                // pChatInput->pEditBox;
    0A8D: 27@ = readMem 26@ sz 4 vp 0     // pEditBox;
  
    0A8E: 24@ = 20@ + 0x80F60 // CDXUTEditBox::SetText
 
    0AA8: call_function_method 24@ struct 27@ num_params 2 pop 0 _bSelected 0 _pszText 0@ _retVal 6@
  
    0A8E: 25@ = 20@ + 0x65D30 // PROCESS_INPUT
    0AA8: call_function_method 25@ struct 22@ num_params 0 pop 0 _retVal 7@
END
0AB2: 0

PHP:
:PROCESS_CHAT_INPUT
{
    0.3.DL
    Ex.:
    0AB1: @PROCESS_CHAT_INPUT 1 InputText 0@
}
IF 0AA2: 20@ = "samp.dll"
THEN
    0A8E: 21@ = 20@ + 0x2ACA14            // SAMP_CHAT_INPUT_INFO_OFFSET
    0A8D: 22@ = readMem 21@ sz 4 vp 0     // pChatInput;
    0A8E: 26@ = 22@ + 0x8                // pChatInput->pEditBox;
    0A8D: 27@ = readMem 26@ sz 4 vp 0     // pEditBox;
   
    0A8E: 24@ = 20@ + 0x85000 // CDXUTEditBox::SetText
  
    0AA8: call_function_method 24@ struct 27@ num_params 2 pop 0 _bSelected 0 _pszText 0@ _retVal 6@
   
    0A8E: 25@ = 20@ + 0x69410 // PROCESS_INPUT
    0AA8: call_function_method 25@ struct 22@ num_params 0 pop 0 _retVal 7@
END
0AB2: 0
 

Fr0z3n

Well-known member
Joined
Nov 20, 2019
Messages
300
Reaction score
36
Location
Srbija
PHP:
:GetChatInputEditBoxText
{
    0.3.7 - R1
    0AB1: @GetChatInputEditBoxText 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0E8            // SAMP_CHAT_INPUT_INFO_OFFSET (R1)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pChatInput;
    0A8E: 4@ = 3@ + 0x8                // pChatInput->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
   
    0A8E: 5@ = 2@ + 0x81030 // CDXUTEditBox::GetText (offset for 0.3.7 R1)
   
    0AA8: call_function_method 5@ struct 4@ num_params 0 pop 0  _Return: 0@
end
0AB2: 1 0@
PHP:
:PROCESS_CHAT_INPUT
{
    0.3.7 - R1
    Ex.:
    0AB1: @PROCESS_CHAT_INPUT 1 InputText 0@
}
IF 0AA2: 20@ = "samp.dll"
THEN
    0A8E: 21@ = 20@ + 0x21A0E8            // SAMP_CHAT_INPUT_INFO_OFFSET
    0A8D: 22@ = readMem 21@ sz 4 vp 0     // pChatInput;
    0A8E: 26@ = 22@ + 0x8                // pChatInput->pEditBox;
    0A8D: 27@ = readMem 26@ sz 4 vp 0     // pEditBox;
  
    0A8E: 24@ = 20@ + 0x80F60 // CDXUTEditBox::SetText
 
    0AA8: call_function_method 24@ struct 27@ num_params 2 pop 0 _bSelected 0 _pszText 0@ _retVal 6@
  
    0A8E: 25@ = 20@ + 0x65D30 // PROCESS_INPUT
    0AA8: call_function_method 25@ struct 22@ num_params 0 pop 0 _retVal 7@
END
0AB2: 0

PHP:
:PROCESS_CHAT_INPUT
{
    0.3.DL
    Ex.:
    0AB1: @PROCESS_CHAT_INPUT 1 InputText 0@
}
IF 0AA2: 20@ = "samp.dll"
THEN
    0A8E: 21@ = 20@ + 0x2ACA14            // SAMP_CHAT_INPUT_INFO_OFFSET
    0A8D: 22@ = readMem 21@ sz 4 vp 0     // pChatInput;
    0A8E: 26@ = 22@ + 0x8                // pChatInput->pEditBox;
    0A8D: 27@ = readMem 26@ sz 4 vp 0     // pEditBox;
   
    0A8E: 24@ = 20@ + 0x85000 // CDXUTEditBox::SetText
  
    0AA8: call_function_method 24@ struct 27@ num_params 2 pop 0 _bSelected 0 _pszText 0@ _retVal 6@
   
    0A8E: 25@ = 20@ + 0x69410 // PROCESS_INPUT
    0AA8: call_function_method 25@ struct 22@ num_params 0 pop 0 _retVal 7@
END
0AB2: 0
Something for r2?
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Maybe this?
GetDialogInputEditBoxText
PHP:
:GetDialogInputEditBoxText
{
    0.3.7 - R2
    0AB1: @GetDialogInputText 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0C0            // SAMP_DIALOG_INFO_OFFSET (R2)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pDialog;
    0A8E: 4@ = 3@ + 0x24                // pDialog->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
  
    0A8E: 5@ = 2@ + 0x810D0 // CDXUTEditBox::GetText (offset for 0.3.7 R2)
  
    0AA8: call_function_method 5@ struct 4@ num_params 0 pop 0 _Return: 0@
end
0AB2: 1 0@

:GetChatInputEditBoxText
{
    0.3.7 - R2
    0AB1: @GetChatInputEditBoxText 0 _Return: 0@
}
if 0AA2: 2@ = "samp.dll"
then
    0A8E: 3@ = 2@ + 0x21A0F0            // SAMP_CHAT_INPUT_INFO_OFFSET (R2)
    0A8D: 3@ = readMem 3@ sz 4 vp 0     // pChatInput;
    0A8E: 4@ = 3@ + 0x8                // pChatInput->pEditBox;
    0A8D: 4@ = readMem 4@ sz 4 vp 0     // pEditBox;
  
    0A8E: 5@ = 2@ + 0x810D0 // CDXUTEditBox::GetText (offset for 0.3.7 R2)
  
    0AA8: call_function_method 5@ struct 4@ num_params 0 pop 0  _Return: 0@
end
0AB2: 1 0@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
DIALOG HOOK 0.3.7 - R1
PHP:
{$CLEO}

0000:

wait 8500

0AB1: @dialog_hook 1 buttonId: 1@
1@ = -1


while true
    wait 0
    if 1@ <> -1
    then
        0AD1: "You pressed dialog button id: %d" 1337 1@
        1@ = -1
    end
end

:dialog_hook
{
    call @dialog_hook 1 buttonId: 1@
}
0AA2: 0@ = "samp.dll"
0@ += 0x6C04D

0AC6: 2@ = label @function offset

2@ += 0x5

0AC7: 3@ = var 1@ offset
0A8C: write_memory 2@ size 4 value 3@ virtual_protect 1

2@ -= 0x5
0AB1: @asm_call_hook 3 offset 0@ function 2@ virtual_protect 1

0@ += 0x5
0A8C: write_memory 0@ size 1 value 0x90 virtual_protect 1 //NOP
ret 0    

:asm_call_hook
{
    call @asm_call_hook 3 offset 1@ function 2@ virtual_protect 1
}
0A8C: write_memory 0@ size 1 value 0xE8 virtual_protect 2@
0062: 1@ -= 0@ // (int)
000E: 1@ -= 5
0@ += 1
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 2@
ret 0  
         
:function
hex
50                // push eax
8B 45 08          // mov eax,[ebp+08]
A3 00 00 00 00    // mov [00000000],eax
58                // pop eax
64 A1 00 00 00 00 // mov eax,fs:[00000000]
C3                // ret  
end

DIALOG HOOK 0.3.7 - R2
PHP:
{$CLEO}

0000:

wait 8500

0AB1: @dialog_hook 1 buttonId: 1@
1@ = -1


while true
    wait 0
    if 1@ <> -1
    then
        0AD1: "You pressed dialog button id: %d" 1337 1@
        1@ = -1
    end
end

:dialog_hook
{
    call @dialog_hook 1 buttonId: 1@
}
0AA2: 0@ = "samp.dll"
0@ += 0x6C0FD

0AC6: 2@ = label @function offset

2@ += 0x5

0AC7: 3@ = var 1@ offset
0A8C: write_memory 2@ size 4 value 3@ virtual_protect 1

2@ -= 0x5
0AB1: @asm_call_hook 3 offset 0@ function 2@ virtual_protect 1

0@ += 0x5
0A8C: write_memory 0@ size 1 value 0x90 virtual_protect 1 //NOP
ret 0    

:asm_call_hook
{
    call @asm_call_hook 3 offset 1@ function 2@ virtual_protect 1
}
0A8C: write_memory 0@ size 1 value 0xE8 virtual_protect 2@
0062: 1@ -= 0@ // (int)
000E: 1@ -= 5
0@ += 1
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 2@
ret 0  
         
:function
hex
50                // push eax
8B 45 08          // mov eax,[ebp+08]
A3 00 00 00 00    // mov [00000000],eax
58                // pop eax
64 A1 00 00 00 00 // mov eax,fs:[00000000]
C3                // ret  
end

DIALOG HOOK 0.3.7 - R4
PHP:
{$CLEO}

0000:

wait 8500

0AB1: @dialog_hook 1 buttonId: 1@
1@ = -1


while true
    wait 0
    
if 1@ <> -1
then
    0AD1: "You pressed dialog button id: %d" 1337 1@
    1@ = -1
end
    
end

:dialog_hook
{
    call @dialog_hook 1 buttonId: 1@
}
0AA2: 0@ = "samp.dll"
0@ += 0x7066D
        
0AC6: 2@ = label @function offset

2@ += 0x5

0AC7: 3@ = var 1@ offset
0A8C: write_memory 2@ size 4 value 3@ virtual_protect 1

2@ -= 0x5
0AB1: @asm_call_hook 3 offset 0@ function 2@ virtual_protect 1

0@ += 0x5
0A8C: write_memory 0@ size 1 value 0x90 virtual_protect 1 //NOP
ret 0      

:asm_call_hook
{
    call @asm_call_hook 3 offset 1@ function 2@ virtual_protect 1
}
0A8C: write_memory 0@ size 1 value 0xE8 virtual_protect 2@
0062: 1@ -= 0@ // (int)
000E: 1@ -= 5
0@ += 1
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 2@
ret 0    
           
:function
hex
50                // push eax
8B 45 08          // mov eax,[ebp+08]
A3 00 00 00 00    // mov [00000000],eax
58                // pop eax
64 A1 00 00 00 00 // mov eax,fs:[00000000]
C3                // ret    
end

DIALOG HOOK 0.3.DL
PHP:
{$CLEO}

0000:

wait 8500

0AB1: @dialog_hook 1 buttonId: 1@
1@ = -1


while true
    wait 0
   
if 1@ <> -1
then
    0AD1: "You pressed dialog button id: %d" 1337 1@
    1@ = -1
end
   
end

:dialog_hook
{
    call @dialog_hook 1 buttonId: 1@
}
0AA2: 0@ = "samp.dll"
0@ += 0x700DD
       
0AC6: 2@ = label @function offset

2@ += 0x5

0AC7: 3@ = var 1@ offset
0A8C: write_memory 2@ size 4 value 3@ virtual_protect 1

2@ -= 0x5
0AB1: @asm_call_hook 3 offset 0@ function 2@ virtual_protect 1

0@ += 0x5
0A8C: write_memory 0@ size 1 value 0x90 virtual_protect 1 //NOP
ret 0     

:asm_call_hook
{
    call @asm_call_hook 3 offset 1@ function 2@ virtual_protect 1
}
0A8C: write_memory 0@ size 1 value 0xE8 virtual_protect 2@
0062: 1@ -= 0@ // (int)
000E: 1@ -= 5
0@ += 1
0A8C: write_memory 0@ size 4 value 1@ virtual_protect 2@
ret 0   
          
:function
hex
50                // push eax
8B 45 08          // mov eax,[ebp+08]
A3 00 00 00 00    // mov [00000000],eax
58                // pop eax
64 A1 00 00 00 00 // mov eax,fs:[00000000]
C3                // ret   
end
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
SAMPFUNCS
RPC GameText

PHP:
{$CLEO .cs}
{$INCLUDE SF}

0000:

wait 8500

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
wait 0
end

:in_rpc
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
IF 0@ == RPC_SCRDISPLAYGAMETEXT // GameText, ID - 73
THEN
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT  // style
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // time
    0BE7: raknet 4@ = bit_stream_read 1@ type BS_TYPE_INT // message len
    0AC8: 5@ = allocate_memory_size 256
    0BE8: raknet bit_stream 1@ read_array 5@ size 4@ // read message
    0C1E: array 5@ element 4@ el_size 1 = 0 // \0
    CHATMSG "GameText: %s" -1 5@
    CHATMSG "Style: %d" -1  2@
    CHATMSG "Time: %d" -1  3@
    // do something...
    0AC9: free_allocated_memory 5@
END
0BE0: raknet hook_ret true


SAMPFUNCS
RPC ClientMessage

PHP:
{$CLEO .cs}
{$INCLUDE SF}

0000:

wait 8500

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
wait 0
end

:in_rpc
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE // Chat Message, ID - 93
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len

    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    chatmsg "Text: %s" -1 4@
    chatmsg "Color: %x" -1 2@
    // do something...
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true


SAMPFUNCS
RPC TextDraw

PHP:
{$CLEO .cs}
{$INCLUDE SF}

0000:

wait 8500

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
wait 0
end

:in_rpc
0BE5: raknet 10@ = get_hook_param PARAM_PACKETID
if
10@ == RPC_SCRSHOWTEXTDRAW // Textdraw, ID - 134
then
    0BE9: raknet bit_stream 11@ reset_read_pointer
    0BE5: raknet 11@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 14@ = bit_stream_read 11@ type BS_TYPE_SHORT // UINT16 wTextDrawID
    0BE7: raknet 15@ = bit_stream_read 11@ type BS_TYPE_BYTE // UINT8 Flags
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fLetterWidth
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fLetterHeight
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_INT // UINT32 dwLetterColor
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fLineWidth
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fLineHeight
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_INT // UINT32 dwBoxColor
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_BYTE // UINT8 Shadow
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_BYTE // UINT8 Outline
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_INT // UINT32 dwBackgroundColor
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_BYTE // UINT8 Style
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_BYTE // UINT8 Selectable
    0BE7: raknet 20@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fX
    0BE7: raknet 21@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fY
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_SHORT // UINT16 wModelID
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fRotX
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fRotY
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fRotZ
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_FLOAT // float fZoom
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_SHORT // UINT16 wColor1
    0BE7: raknet 0@ = bit_stream_read 11@ type BS_TYPE_SHORT // UINT16 wColor2
    0BE7: raknet 12@ = bit_stream_read 11@ type BS_TYPE_SHORT // WORD szTextLen
    0AC8: 13@ = allocate_memory_size 512
    0BE8: raknet bit_stream 11@ read_array 13@ size 12@ // read message
    0C1E: array 13@ element 12@ el_size 1 = 0 // \0
    chatmsg "%d %s" -1 12@ 13@
    0AC9: free_allocated_memory 13@
end
0BE0: raknet hook_ret true


SAMPFUNCS
RPC 3DText

PHP:
:3DTextHOOK
0BE5: raknet 0@ = get_hook_param PARAM_BITSTREAM
0BE5: raknet 1@ = get_hook_param PARAM_PACKETID
0BEF: raknet 6@ = bit_stream 0@ get_number_of_bytes_used
if
1@ == RPC_SCRCREATE3DTEXTLABEL
then
//msg "%d" -1 6@
6@ -= 31
0BE7: raknet 10@ = bit_stream_read 0@ type BS_TYPE_SHORT  // ID  2
//0BE7: raknet 11@ = bit_stream_read 0@ type BS_TYPE_INT  // model  4
0BE7: raknet 12@ = bit_stream_read 0@ type BS_TYPE_INT  // color  4
0BE7: raknet 13@ = bit_stream_read 0@ type BS_TYPE_FLOAT  // X  4  +
0BE7: raknet 14@ = bit_stream_read 0@ type BS_TYPE_FLOAT  // Y  4  +
0BE7: raknet 15@ = bit_stream_read 0@ type BS_TYPE_FLOAT  // Z  4  +
0BE7: raknet 16@ = bit_stream_read 0@ type BS_TYPE_FLOAT  // ViewDistance  4  +
0BE7: raknet 17@ = bit_stream_read 0@ type BS_TYPE_BOOL  // ShowBehindWalls  1
0BE7: raknet 18@ = bit_stream_read 0@ type BS_TYPE_SHORT  // AttachedToPlayer  2 - 
0BE7: raknet 19@ = bit_stream_read 0@ type BS_TYPE_SHORT  // AttachedToVehicle  2 -
memset 11@ 0 1024
memset 20@ 0 1024
//0BE7: raknet 11@ = bit_stream_read 0@ type BS_TYPE_ARRAY  // model  4
0BE8: raknet bit_stream 0@ read_array 11@ size 6@ // Text
0C0F: array 11@ element 6@ = 0x00
0BF4: raknet bit_stream 0@ decode_string 11@ size 6@
log "%d [%x %f %f %f %f %d %d %d] %s" 10@ 12@ 13@ 14@ 15@ 16@ 17@ 18@ 19@ 11@
end 
0BE0: raknet hook_ret true
PHP:
:AnimHook
0BE5: raknet 1@ = get_hook_param PARAM_PACKETID
if 1@ == RPC_SCRAPPLYANIMATION
then
    0BE5: raknet 2@ = get_hook_param PARAM_BITSTREAM

    0BE7: raknet 3@ = bit_stream_read 2@ type BS_TYPE_SHORT
    4@ = SAMP.GetSAMPPlayerIDByActorHandle($PLAYER_ACTOR)
    if 003B: 3@ == 4@
    then
        alloc 6@ 48
        alloc 7@ 48

        0BE7: raknet 5@ = bit_stream_read 2@ type BS_TYPE_BYTE // lib len
        0BE8: raknet bit_stream 2@ read_array 6@ size 5@ // lib string
        0C1E: array 6@ element 5@ el_size 1 = 0x0
      
        0BE7: raknet 5@ = bit_stream_read 2@ type BS_TYPE_BYTE // anim len
        0BE8: raknet bit_stream 2@ read_array 7@ size 5@ // anim string
        0C1E: array 7@ element 5@ el_size 1 = 0x0

        chatmsg "AnimLib: %s AnimName: %s" 0xffcc00 6@ 7@
       

        free 6@
        free 7@
    end
end
0BE0: raknet hook_ret true
 
Last edited:

Fr0z3n

Well-known member
Joined
Nov 20, 2019
Messages
300
Reaction score
36
Location
Srbija
RPC GameText
PHP:
{$CLEO}
{$INCLUDE SF}

0000:

wait 8500

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
wait 0
end

:in_rpc
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
IF 0@ == RPC_SCRDISPLAYGAMETEXT // GameText, ID - 73
THEN
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT  // style
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // time
    0BE7: raknet 4@ = bit_stream_read 1@ type BS_TYPE_INT // message len
    0AC8: 5@ = allocate_memory_size 256
    0BE8: raknet bit_stream 1@ read_array 5@ size 4@ // read message
    0C1E: array 5@ element 4@ el_size 1 = 0 // \0
    CHATMSG "GameText: %s" -1  5@
    CHATMSG "Style: %d" -1  2@
    CHATMSG "Time: %d" -1  3@
    // do something...  
    0AC9: free_allocated_memory 5@
END
0BE0: raknet hook_ret true

RPC ChatMessage
PHP:
{$CLEO}
{$INCLUDE SF}

0000:

wait 8500

0BE3: raknet setup_incoming_rpc_hook @in_rpc

while true
wait 0
end

:in_rpc
0BE5: raknet 0@ = get_hook_param PARAM_PACKETID
if 0@ == RPC_SCRCLIENTMESSAGE // chat message, ID - 93
then
    0BE5: raknet 1@ = get_hook_param PARAM_BITSTREAM
    0BE7: raknet 2@ = bit_stream_read 1@ type BS_TYPE_INT // color
    0BE7: raknet 3@ = bit_stream_read 1@ type BS_TYPE_INT // message len
  
    0AC8: 4@ = allocate_memory_size 144
    0BE8: raknet bit_stream 1@ read_array 4@ size 3@ // read message
    0C1E: array 4@ element 3@ el_size 1 = 0x0 // \0
    chatmsg "Text: %s" -1 4@
    chatmsg "Color: %x" -1 2@
    // do something...
    0AC9: free_allocated_memory 4@
end
0BE0: raknet hook_ret true
mmmm nice
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Restore Camera
PHP:
0@ readMem 5310892 sz 1 vp 1 // Read only one time to get default value
0@ readMem 5310917 sz 1 vp 1 // Read only one time to get default value 
0@ readMem 5386662 sz 1 vp 1 // Read only one time to get default value 
0@ readMem 5386797 sz 1 vp 1 // Read only one time to get default value 
0@ readMem 5387194 sz 1 vp 1 // Read only one time to get default value 

// Write to restore camera
writeMem 5310892 sz 1 vl 235 vp 1
writeMem 5310917 sz 1 vl 235 vp 1
writeMem 5386662 sz 1 vl 235 vp 1
writeMem 5386797 sz 1 vl 235 vp 1
writeMem 5387194 sz 1 vl 235 vp 1

// Write to set default value
writeMem 5310892 sz 1 vl 0@ vp 1
writeMem 5310917 sz 1 vl 0@ vp 1
writeMem 5386662 sz 1 vl 0@ vp 1
writeMem 5386797 sz 1 vl 0@ vp 1
writeMem 5387194 sz 1 vl 0@ vp 1

Show crosshair instantly, normally you need wait one sec until you see crosshair when aiming , this code make it show instantly!
PHP:
0@ readMem 0x58E1D9 sz 1 // Read only one time to get default value
 

// Write to set show crosshair instantly
writeMem 0x58E1D9 sz 1 vl 235 vp 1

// Write to set default value
writeMem 0x58E1D9 sz 1 vl 0@ vp 1

No spread with crosshair expanding
PHP:
0@ readMem 0x740460 sz 1 vp 1 // Read only one time to get default value
 

// Write to make no spread with crosshair expanding
writeMem 0x740460 sz 1 vl 144 vp 1

// Write to set default value
writeMem 0x740460 sz 1 vl 0@ vp 1
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
OPCODE:
0B2D: write_samp_memory offset 1@ value 2@ size 3@
0B2E: 3@ = read_samp_memory offset 1@ size 2@
Without SAMPFUNCS


PHP:
:WRITE_SAMP_MEMORY
{
0AB1: @WRITE_SAMP_MEMORY 3 offset 0x6310 value 0xC390 size 2
}
IF 0AA2: 10@ = "samp.dll"
THEN  
    0A8E: 11@ = 10@ + 0@ // SAMP_DIALOG_INFO_OFFSET
    0A8C: write_memory 11@ size 2@ value 1@ virtual_protect 1
END
0AB2: 0
PHP:
:READ_SAMP_MEMORY
{
0AB1: @READ_SAMP_MEMORY 2 offset 0x615FB size 5 _Retrun: 0@
}
IF 0AA2: 10@ = "samp.dll"
THEN   
    0A8E: 11@ = 10@ + 0@ // SAMP_DIALOG_INFO_OFFSET
    0A8D: 12@ = read_memory 11@ size 1@ virtual_protect 1
END
0AB2: 1 12@
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Code was made special only for SAMP CHAT INPUTING.
This code press letters like you do letter by letter, so you can video self and say " I'm not cheater... "

PHP:
:WriteTextLetterByLetter
// 0AB1: @WriteTextLetterByLetter 2 Text 0@ WritingSpeed 100 ms
0C28: strlwr in 0@ out 0@
0C17: 2@ = strlen 0@                               
for 3@ = 0 to 2@
    0A8D: 4@ = read_memory 0@ size 1 virtual_protect 1
    if 4@ == 47 // 47 = /
    then
        wait 1@
        0AB1: @keyPress 1 key 0xBF
    end
    if 4@ == 32 // 32 = space
    then
        wait 1@
        0AB1: @keyPress 1 key 0x20
    end
    if 4@ == 97
    then
        wait 1@
        0AB1: @keyPress 1 key 0x41 
    end
    if 4@ == 98
    then
        wait 1@
        0AB1: @keyPress 1 key 0x42
    end 
    if 4@ == 99
    then
        wait 1@
        0AB1: @keyPress 1 key 0x43
    end
    if 4@ == 100
    then
        wait 1@
        0AB1: @keyPress 1 key 0x44
    end
    if 4@ == 101
    then
        wait 1@
        0AB1: @keyPress 1 key 0x45
    end
    if 4@ == 102
    then
        wait 1@
        0AB1: @keyPress 1 key 0x46
    end
    if 4@ == 103
    then
        wait 1@
        0AB1: @keyPress 1 key 0x47
    end
    if 4@ == 104
    then
        wait 1@
        0AB1: @keyPress 1 key 0x48
    end
    if 4@ == 105
    then
        wait 1@
        0AB1: @keyPress 1 key 0x49
    end
    if 4@ == 106
    then
        wait 1@
        0AB1: @keyPress 1 key 0x4A
    end
    if 4@ == 107
    then
        wait 1@
        0AB1: @keyPress 1 key 0x4B
    end
    if 4@ == 108
    then
        wait 1@
        0AB1: @keyPress 1 key 0x4C
    end
    if 4@ == 109
    then
        wait 1@
        0AB1: @keyPress 1 key 0x4D
    end
    if 4@ == 110
    then
        wait 1@
        0AB1: @keyPress 1 key 0x4E
    end
    if 4@ == 111
    then
        wait 1@
        0AB1: @keyPress 1 key 0x4F
    end
    if 4@ == 112
    then
        wait 1@
        0AB1: @keyPress 1 key 0x50
    end
    if 4@ == 113
    then
        wait 1@
        0AB1: @keyPress 1 key 0x51
    end
    if 4@ == 114
    then
        wait 1@
        0AB1: @keyPress 1 key 0x52
    end
    if 4@ == 115
    then
        wait 1@
        0AB1: @keyPress 1 key 0x53
    end
    if 4@ == 116
    then
        wait 1@
        0AB1: @keyPress 1 key 0x54
    end
    if 4@ == 117
    then
        wait 1@
        0AB1: @keyPress 1 key 0x55
    end
    if 4@ == 118
    then
        wait 1@
        0AB1: @keyPress 1 key 0x56
    end
    if 4@ == 119
    then
        wait 1@
        0AB1: @keyPress 1 key 0x57
    end
    if 4@ == 120
    then
        wait 1@
        0AB1: @keyPress 1 key 0x58
    end
    if 4@ == 121
    then
        wait 1@
        0AB1: @keyPress 1 key 0x59
    end
    if 4@ == 122
    then
        wait 1@
        0AB1: @keyPress 1 key 0x5A
    end   
0@++ // procceed
end    
0AB2: ret 0

:keyPress
if 0AA2: 2@ = load_library "User32.dll"
then
    if 0AA4: 2@ = get_proc_address "keybd_event" library 2@
    then
        0AA5: call 2@ num_params 4 pop 0 0 0 0 0@
        wait 0
        0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@
    end
end
0AB2: ret 0
[php]
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Snippet checks is actor in driver seat or not..

PLAYER_ACTOR
PHP:
:IsActorInDriverSeat
{
    USE WITH >> IF STATEMENT:
    0AB1: @IsActorInDriverSeat 0
}
if
00DF:   actor $PLAYER_ACTOR in_car
then
    03C0: 0@ = actor $PLAYER_ACTOR car
    046C: 1@ = car 0@ driver
    if
    003B: 1@ == $PLAYER_ACTOR
    then
        0485:  return_true
    else
        059A:  return_false
    end
end
0AB2: ret 0

ANY ACTOR
PHP:
:IsActorInDriverSeat
{
    USE WITH >> IF STATEMENT:
    0AB1: @IsActorInDriverSeat 1 ActorHandle 0@
}
if
00DF:   actor 0@ in_car
then
    03C0: 2@ = actor 0@ car
    046C: 1@ = car 2@ driver
    if
    003B: 1@ == 0@
    then
        0485:  return_true
    else
        059A:  return_false
    end
end
0AB2: ret 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
OPCODE:
0B79: samp set_chat_input_enabled 1@
Without SAMPFUNCS


PHP:
:SET_CHAT_INPUT_ENABLED
{
    0.3.DL
    0AB1: @SET_CHAT_INPUT_ENABLED 1 Status 0 // 1 = Enable, 0 = Disable
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x2ACA14 // SAMP_CHAT_INPUT_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    if
    0@ == 1
    then
        0A8E: 11@ = 10@ + 0x68EC0 //SAMP_CHAT_INPUT_OPEN
    else
        0A8E: 11@ = 10@ + 0x68FC0 //SAMP_CHAT_INPUT_CLOSE
    end
    0AA8: call_function_method 11@ struct 12@ num_params 0 pop 0 _retVal 6@
END
0AB2: 0
PHP:
:SET_CHAT_INPUT_ENABLED
{
    0.3.7 - R1
    0AB1: @SET_CHAT_INPUT_ENABLED 1 Status 0 // 1 = Enable, 0 = Disable
}
IF 0AA2: 10@ = "samp.dll"
THEN
    0A8E: 11@ = 10@ + 0x21A0E8 // SAMP_CHAT_INPUT_INFO_OFFSET
    0A8D: 12@ = readMem 11@ sz 4 vp 0
    if
    0@ == 1
    then
        0A8E: 11@ = 10@ + 0x657E0 //SAMP_CHAT_INPUT_OPEN
    else
        0A8E: 11@ = 10@ + 0x658E0 //SAMP_CHAT_INPUT_CLOSE
    end
    0AA8: call_function_method 11@ struct 12@ num_params 0 pop 0 _retVal 6@
END
0AB2: 0
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
OPCODE:
0B49: samp set_current_dialog_list_item 1@
Without SAMPFUNCS


PHP:
:Set_current_dialog_list_item
{
    0.3.7 - R1
    0AB1: @Set_current_dialog_list_item 1 item 5
}
0AA2: 31@ = "samp.dll"
31@ += 0x21A0B8
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x20
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x143
0A8C: write_memory 31@ size 1 value 0@ virtual_protect 0
0AB2: ret 0

:Set_current_dialog_list_item
{
    0.3.7 - R2
    0AB1: @Set_current_dialog_list_item 1 item 5
}
0AA2: 31@ = "samp.dll"
31@ += 0x21A0C0
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x20
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x143
0A8C: write_memory 31@ size 1 value 0@ virtual_protect 0
0AB2: ret 0

:Set_current_dialog_list_item
{
    0.3.7 - R3
    0AB1: @Set_current_dialog_list_item 1 item 5
}
0AA2: 31@ = "samp.dll"
31@ += 0x26E898
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x20
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x143
0A8C: write_memory 31@ size 1 value 0@ virtual_protect 0
0AB2: ret 0

:Set_current_dialog_list_item
{
    0.3.7 - R4
    0AB1: @Set_current_dialog_list_item 1 item 5
}
0AA2: 31@ = "samp.dll"
31@ += 0x26E9C8
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x20
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x143
0A8C: write_memory 31@ size 1 value 0@ virtual_protect 0
0AB2: ret 0

:Set_current_dialog_list_item
{
    0.3.DL
    0AB1: @Set_current_dialog_list_item 1 item 5
}
0AA2: 31@ = "samp.dll"
31@ += 0x2AC9E0
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x20
0A8D: 31@ = read_memory 31@ size 4 virtual_protect 0
31@ += 0x143
0A8C: write_memory 31@ size 1 value 0@ virtual_protect 0
0AB2: ret 0
 
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Weapon WallHack
If someone somehow change weapon color and combine with this code.., you can get powerful shit xD

PHP:
0@ readMem 0x732F40 sz 1 vp 0 // Read only one time to get default value


// Write to make weapon skin / wall thru
writeMem 0x732F40 sz 1 vl 1 vp 0

// Write to set default value
writeMem 0x732F40 sz 1 vl 0@ vp 0
 

Attachments

  • WP WH.png
    WP WH.png
    98.7 KB · Views: 107
  • WP WH2.png
    WP WH2.png
    343.9 KB · Views: 108
Last edited:

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Count Down Timer
PHP:
{$CLEO .cs}

0000: NOP

wait 8500

0AA8: call_function_method 0x6A0050 0xC1B340 num_params 1 pop 0 'CRED098' 30@
0AA5: call 0x718600 2 pop 2 30@ "Time left: ~1~ seconds"

32@ = 0 // keep timer active

while true
wait 0

if 
0AB0: 76 // L
then 
    repeat
    wait 0
    until 8AB0: 76 // L
    32@ = 0   // start count only when activated
    30@ = true // enable draw text
end

if
30@ == true 
then    
    03F0: enable_text_draw 1
    0342: set_text_draw_centered 1
    03E0: draw_text_behind_textures 0
    0349: set_text_draw_font 1
    0340: set_text_draw_RGBA 255 255 255 255
    033F: set_text_draw_letter_size width 0.255 height 0.955 
    081C: draw_text_outline 1 RGBA 10 10 10 255
    0AB1: @Timer 2 Seconds 60 TimingVariable 32@ _Return: TimeLeft 29@ SeTimeCountEndStatus 30@  // 30@ returns false
    //045A: draw_text_1number 320.0 390.0 GXT 'CRED098' numbers 29@  // You can deliver after: ~1~ ms
    045A: draw_text_1number 550.0 110.0 GXT 'CRED098' numbers 29@  // You can deliver after: ~1~ ms
end

end

:Timer
2@ = TRUE
IF
2@ == TRUE
THEN
    0@ *= 1000
    0085: 4@ = 0@ // (int)
    0085: 3@ = 1@ // (int)
    0062: 3@ -= 4@  // (int)
    3@ /= 1000
    3@ *= -1
END

IF AND
2@ == TRUE
001D:   1@ > 0@  // (int)
THEN
    2@ = FALSE  
END
0AB2: ret 2 3@ 2@
 
Status
Not open for further replies.
Top