Snippets

100% - Working without SAMPFUNCS Example 0AD3: 0@ = format "Hello World" You wanna get "World" 0AB1: @GetLastCharacters 2 String 0@ Characters 5 rnt 1@ Snippet :GetLastCharacters { 0AB1: @GetLastCharacters 2 String 0@ Characters 5 rnt 1@ } 0AB1: @strlen 1 String 0@ Lenght 2@ 0062: 2@ -= 1@ 005A: 0@ += 2@ 0AB2: ret 1 0@ :strlen { Example: 0AB1: @strlen 1 string 1@ rtn 3@ In: 0@ - text; Out: 1@ - size; } for 1@ = 0 to 1024 0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0 if not 2@ == 0 jf break 0@ += 1 end 0AB2: ret 1 1@
Instead of using this shitty long function for an aimbot which was made by some russian: :AIM var 1@ :float 2@ :float 3@ :float 4@ :float 5@ :float 6@ :float 7@ :float 8@ :float 9@ :float 10@ :float 11@ :float 12@ :float 13@ :float 14@ :float 15@ :float end 0087: 4@ = 1@ // (float) 0087: 5@ = 2@ // (float) 0087: 6@ = 3@ // (float) 068D: get_camera_position_to 1@ 2@ 3@            //04C4: store_coords_to 4@ 5@ 6@ from_actor 0@ with_offset 7@ 8@ 9@ 04C4: store_coords_to 7@ 8@ 9@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 1@ -= 4@ 2@ -= 5@ 0096: make 1@ absolute_float 0096: make 2@ absolute_float 10@ = 1@ 11@ = 2@ 10@ *= 10@                                            11@ *= 11@ 10@ += 11@ 01FB: 10@ = square_root 10@ // Ac 11@ = 1@...
Function to take a simple samp screenshot. /*     call @TakeScreen 0 */ :TakeScreen IF 0AA2: 0@ = "samp.dll" THEN 0@ += 0x119CBC     0A8C: writeMem 0@ sz 1 val 1 vp 0 END /*   -SAMPFUNCS   0B2D: write_samp_memory offset 0x119CBC value 1 size 1 */ RET 0 Code snippet on how to get clean screenshots. {$CLEO} 0000: REPEAT     WAIT 0 UNTIL 0AA2: 0@ = "samp.dll" 0@ += 0x5D8C1 0A8C: writeMem 0@ sz 1 val 0 vp 1    //This disables taking screens with F8 /*   -SAMPFUNCS   0B2D: write_samp_memory offset 0x5D8C1 value 0 size 1 */ WHILE TRUE     WAIT 0     IF 0AB0: 119 //F8     THEN         /*             Disable mods before taking a screenshot             ex: call @EnableWallhack 1 FALSE         */         WAIT 1 //get clean frame         CALL...
Get surname from fullname Example: Black_Daddy Snippet return - Daddy 0AB1: @GetSurname 1 stringPointer 1@ Surname 3@ :GetSurname 0085: 28@ = 0@ // (int) 0085: 27@ = 0@ // (int) 29@ = 0 for 31@ = 0 to 200 0A8D: 30@ = read_memory 28@ size 1 virtual_protect 1 if 30@ == 0 then break else 28@++ 29@++ end if 31@ == 200 then //chatmsg "string seems to be over 200 chars" -1 end end for 31@ = 1 to 29@ 0A8D: 30@ = read_memory 0@ size 1 virtual_protect 1 if 30@ == 95 // if the character is "_" (ASCII table) then 0@++ //chatmsg 0@ -1 0AB2: ret 1 0@ else 0@++ end end 0AB2: ret 1 27@ 0AB1: @GetName 1 stringPointer 1@ // Self Return :GetName 0085: 27@ = 0@ // (int)...
With this snippet you can block Keyboard and mouse. Example {$CLEO .cs} 0000: wait 8500 while true wait 0 if and 0@ == false 044B: actor $PLAYER_ACTOR on_foot then 0AB1: @BlockInput 1 status 1 // 1 - block keyboard and mouse if 32@ > 30000 // if 30sec passed then... then 0@ = true 0AB1: @BlockInput 1 status 0 // 0 - turn off blocking. 32@ = 0 end end end :BlockInput 0AA2: 10@ = load_library "User32.DLL" 0AA4: 11@ = get_proc_address "BlockInput" library 10@ 0AA7: call_function 11@ num_params 1 pop 0 0@ 25@ 0AA3: free_library 10@ 0AB2: ret 0 Snippet 0AB1: @BlockInput 1 status 1 // 1 - block keyboard and mouse , 0 - turn off blocking :BlockInput 0AA2: 10@ = load_library...
{$CLEO} 0BE3: raknet setup_incoming_rpc_hook @iRPC 0BDE: 0 :iRPC 0BE5: raknet 0@ = get_hook_param 1 if or 0039:   0@ == 15 0039:   0@ == 157 0039:   0@ == 158 then 0BE0: raknet hook_ret 0 end 0BE0: raknet hook_ret 1 Undetectable and useful in events!
// FOR ALL PEDS    0A8D: 29@ = read_memory 0xB74490 size 4 virtual_protect 0 000A: 29@ += 0x4 0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0 for 30@ = 0 to 35584 step 0x100     0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0     000A: 29@ += 0x1     if and         0029:  31@ >= 0x00         001B:  0x80 > 31@     then         005A: 31@ += 30@         // GOT THE PED.     end end // FOR ALL PEDS END
You want to make a CarCheat but cant get Cars? Use this snippet: // FOR ALL CARS // ALL CARS WILL EXPLODE BY PRESSING X :X wait 0 if 0AB0: X jf x 0A8D: 29@ = read_memory 0xB74494 size 4 virtual_protect 0 29@ += 0x4 0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0 for 30@ = 0 to 27904 step 0x100     0A8D: 31@ = read_memory 29@ size 1 virtual_protect 0     000A: 29@ += 0x1     if and         0029: 31@ >= 0x00         001B: 0x80 > 31@     then         005A: 31@ += 30@         // GOT THE CAR.       020B: explode_car 31@     end end // FOR ALLCARS END jump x
It's an alternative to this repeat wait 0 until 0AFA: is_samp_structures_available Based on: https://github.com/Garret22/DX9Hook-SAMP/blob/master/src/DX9Hook/dllmain.cpp This part exactly while (!g_Chat) { g_Chat = *(DWORD**)(g_dwSAMP_Addr + SAMP_CHAT_INFO_OFFSET); sleep(25); } Usage {$CLEO .cs} 0000: NOP 0AB1: call_scm_func @wait_for_samp_to_load 0 0AD1: show_formatted_text_highpriority "Samp was loaded." time 5000 0A93: end_custom_thread Functions to copy at the end of your script :wait_for_samp_to_load repeat wait 0 //0AD1: show_formatted_text_highpriority "loading samp" 5000 until 0AA2: 31@ = load_library "samp.dll" // IF and SET 0085: 30@ = 31@ // (int) 30@ += 0xBABE call @get_samp_version 1 addr_to_check 30@...
Strcat :strcat // 0@ - destination, 1@ - source // Example: 0AB1: @strcat 2 destination 0@ source 1@ 0AB1: @strlen 1 string 0@ _return: 2@ 0AB1: @strlen 1 string 1@ _return: 3@ 005A: 0@ += 2@ // (int) 0AB1: @memcpy 3 destination 0@ source 1@ size 3@ 005A: 0@ += 3@ // (int) 0AB1: @memset 3 destination 0@ value 0 size 1 0AB2: ret 0 :strlen { Example: 0AB1: @strlen 1 string 1@ _return: 3@ In: 0@ - text; Out: 1@ - size; } for 1@ = 0 to 1024 0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0 if not 2@ == 0 jf break 0@ += 1 end 0AB2: ret 1 1@ Strncpy :strncpy var 0@ : integer 1@ : integer 2@ : integer 30@ : integer 31@ : integer end // 0@ - destination, 1@ - source, 2@ - size // Example: 0AB1: @strncpy 3...
Usage: alloc 2@ 100 format 2@ "CLEO/audio/*.mp3" call @load_file_names 2 max_filenames 1000 wildcard 2@ _name_array 0@ _index_of_highest_loaded_name 1@ for 31@ = 0 to 1@ call @get_nth_file_name 2 name_array 0@ n 31@ _returned_name 30@ chatmsg "%d. %s" -1 31@ 30@ end Functions to copy+paste somewhere at the end of your code: :get_nth_file_name { Input params: 0@ = pointer to array of pointers, each leading to filename 1@ = n (starting with 0) Usage: call @get_nth_file_name 2 name_array 0@ n 0 _returned_name 30@ } 1@ *= 4 // each pointer has 4 bytes 005A: 0@ += 1@ // (int) 0A8D: 31@ = read_memory 0@ size 4 virtual_protect 0 ret 1 31@ :load_file_names { Input params: 0@ = filenames limit 1@...
{ EXAMPLE:     if     0AB1: @GET_TARGET_CAR 0 _STORE_TO 0@     then         0186: 1@ = create_marker_above_car 0@         wait 500         0164: disable_marker 1@     end     by OpcodeXe }    :GET_TARGET_CAR 8@ = 0 {GOT_CAR?,FALSE} if 0AE2: 0@ = random_vehicle_near_point 0.0 0.0 0.0 in_radius 99999.0 find_next 0 pass_wrecked 0 then     REPEAT         if         00DF:  actor $PLAYER_ACTOR driving         then             03C0: 7@ = actor $PLAYER_ACTOR car             else             7@ = -1         end         0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 0.0 0.0 0.0         0AB1: @getScreenXYFrom3DCoords 3 3D_coords_X 1@ 2@ 3@ _to X 4@ Y 5@         03F0: enable_text_draw 1         //038E: draw_box_position 320.0 200.0 size...
Dialog Caption - 0.3.7 R3 0AB1: @GetDialogCaption 0 0@ :GetDialogCaption { 0.3.7 - R3 } 0AA2: 1@ = "samp.dll" 1@ += 0x26E898 0A8D: 1@ = readMem 1@ sz 4 vp 0 0A8E: 2@ = 1@ + 0x28 //DialogOpenOffset 0A8D: 2@ = readMem 2@ sz 4 vp 0 if 2@ == 1 // Dialog open then 0A8E: 3@ = 1@ + 0x40 //DialogCaptionOffset 0485: dialog_open 0AB2: ret 1 3@ else 059A: dialog closed end 0AB2: ret 0 Dialog Caption - 0.3.DL 0AB1: @GetDialogCaption 0 0@ :GetDialogCaption { 0.3.DL } 0AA2: 1@ = "samp.dll" 1@ += 0x2AC9E0 0A8D: 1@ = readMem 1@ sz 4 vp 0 0A8E: 2@ = 1@ + 0x28 //DialogOpenOffset 0A8D: 2@ = readMem 2@ sz 4 vp 0 if 2@ == 1 // Dialog open then 0A8E: 3@ = 1@ + 0x40 //DialogCaptionOffset 0485: dialog_open 0AB2...
:not_bad: Stolen from a russian website  :urtheman: :iknowwhatyoudid: :ppffh:
//0AB1: call @copy_string 4 text 0@ start 0 end 9 to_buffer 1@ :copy_string var     1@: int     2@: int     4@: int     5@: int end if 1@ < 0 then     059A: return_false     ret 0 end 0C17: 5@ = strlen 0@ if 2@ > 5@ then     2@ = 5@ end if 5@ <= 0 then     059A: return_false     ret 0 end if 2@ < 1@ then     059A: return_false     ret 0 end if 1@ >= 1 then     for 4@ = 0 to 1@     inc(0@)     end end 2@ -= 1@ inc(2@) 0C10: memcpy destination 3@ source 0@ size 2@ 0485: return_true ret 0
For example you have text like: Please enter text /code 123 Snippet return: code 123 Snippet :GetStringAfterCharacter { 0AB1: @GetStringAfterCharacter 2 StringPointer 0@ Character 47 _Return 6@ // 47 = slash } 0C17: 31@ = strlen 0@ 31@ -= 1 for 30@ = 0 to 31@ 0A8D: 29@ = read_memory 0@ size 1 virtual_protect 1 if 003B: 29@ == 1@ // (int) then 0@++ 0AB2: 1 0@ end 0@++ end 0AB2: 0 Character id's http://www.asciitable.com/index/asciifull.gif
0AB1: @GetCharPos 2 string 0@ pos 1@ to 2@ :GetCharPos 0C17: 8@ = 0@ if 801D: 1@ > 8@ then 9@ = 0 while 001D: 1@ > 9@ inc(0@) 9@+=1 end 0C2D: strrev in 0@ out 0@ 0062: 8@ -= 1@ 9@ = 0 8@ -= 1 while 001D: 8@ > 9@ inc(0@) 9@+=1 end end ret 1 0@ By @WaTTi - 2017
100% - Working without SAMPFUNCS Example 0AD3: 0@ = format "xxString" You wanna cut "xx" 0AB1: @SkipFirstCharacters 2 String 0@ Characters 2 rnt 1@ Snippet :SkipFirstCharacters 005A: 0@ += 1@ 0AB2: ret 1 0@
// 0AB1: call @search_text_in_the_text 2 0@ 1@ // 0@ - ?????, 1@ - ????? :search_text_in_the_text var     2@:int     3@:int     4@:int     5@:int     7@:int     8@:int end 7@ = 0 0C17: 4@ = strlen 0@ 0C17: 8@ = strlen 1@ if or 8@ > 4@ 8@ <= 0 then     059A: return_false     ret 0 end 0AC8: 6@ = 1024 0C11: memset destination 6@ value 0 size 1024 0C10: memcpy destination 6@ source 1@ size 8@ for 5@ = 0 to 4@ 0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0 0A8D: 3@ = read_memory 1@ size 1 virtual_protect 0     if 2@ == 3@     then         inc(1@)         inc(7@)     else         7@ = 0         0C10: memcpy destination 1@ source 6@ size 8@        end     if 7@ == 8@     then         0485: return_true         ret 0        end...
So owkay, since there's no opcode for that, posting this snippet refined a bit by @springfield even thought it's that small //Usage : 0AB1: @_get_button_text 1 left_or_right 0 output 1@ //left = 0, right = 1 xd :_get_button_text 0AA2: 13@ = load_library "samp.dll" 13@ += 0x21A0B8 0A8D: 13@ = 13@ 4 0 13@ += 0x20 0A8D: 13@ = 13@ 4 0 0@ *= 0x1168 0@ += 0x1AD 005A: 13@ += 0@ ret 1 13@
Explain.: {$CLEO .cs} 0000: NOP wait 10000 while true wait 0 if 0AB1: @isDialogOpen 1 ID -1 // -1 any then 0AC8: 0@ = allocate_memory_size 512 0AB1: @getDialogText 0 0@ end end :isDialogOpen { 0.3.7 - R3 } 0AA2: 1@ = "samp.dll" 1@ += 0x26E898 0A8D: 1@ = readMem 1@ sz 4 vp 0 0A8E: 2@ = 1@ + 0x28 0A8D: 2@ = readMem 2@ sz 4 vp 0 if 2@ == 1 // Dialog active then 0A8E: 3@ = 1@ + 0x30 //dialogTypeOffset 0A8D: 3@ = readMem 3@ sz 4 vp 0 if 0@ == -1 // Any dialog then 0485: dialog_open else if 003B: 3@ == 0@ then 0485: dialog_open else 059A: dialog_closed end end end 0AB2: ret 0 :GetDialogText { 0.3.7 - R3 }...
i found this on PC hf  :)  if you want to use the cheat,then you cant without deleting that lines which are trying to connect to my db instead of copy paste, use u r brain  :iknowwhatyoudidthere:
0@ = 0x29 repeat     wait 0     0@ += 0x01     if 0C2A: 2@ = strchr 4@ char 0@     then         repeat             wait 0             0A8C: write_memory 2@ size 1 value 0x90 virtual_protect 0         until 8C2A: 2@ = strchr 4@ char 0@     end until 0@ == 0x39  4@ - text
You can hide the chat completly with this: 0AB1: @HideSAMPChat 1 TRUE :HideSAMPChat IF 0@ == TRUE THEN     0B2D: write_samp_memory offset 0x7A710 value 0xC3 size 1 ELSE     0B2D: write_samp_memory offset 0x7A710 value 0x56 size 1 END 0AB2: 0 but you can still type into the chat^^ by 0x688(offsets) HE DOESNT MAKE CLEO'S!
0AB1: @FAKE_KEYPRESS 1 _OFFSET_KEY_ 0x3 {W} :FAKE_KEYPRESS 1@ = 0xB73458 005A: 1@ += 0@  // (int) 0A8C: write_memory 1@ size 1 value 255 virtual_protect 0 0AB2: ret 0 { Offset     Slot + 0x0 Right + 0x1 Left + 0x2 Backwards + 0x3 Forward + 0x4 Look right + 0x5 Look left + 0x6 Look down + 0x7 Look up + 0x8 Action + 0xA Previous weapon/target + 0xC Aim weapon + 0xE Next weapon/target + 0x10 Group CTRL forward + 0x12 Group CTRL back + 0x14 Conversation - NO + 0x16 Conversation - YES + 0x1A Change camera + 0x1C Jump + 0x1E Enter+exit + 0x20 Sprint + 0x22 Fire + 0x24 Crouch + 0x26 Look...
Top