Snippets

This section is only for CLEO Snippet threads. This section is mainly for posting snippets which users can use to develop their own cleo, for example "Draw line snippet". Do not post any releases, help, requests or tutorials&guides threads in this section. If you would like to release a new cleo, visit: >> https://ugbase.eu/releases-6/ If you need to ask for help or help other users about something to do with cleo, visit >> https://ugbase.eu/help-7/ If you would like to request or help to develop a cleo, visit: >> https://ugbase.eu/requests-10/ If you would like to post any Tutorials&Guides threads or learn new things about cleo, visit: >> https://ugbase.eu/tutorials/ Posting different threads which do not have anything to do with...
I want to know what a snippet clearly means. What does it stand for ? Can we use it ?
Here you can send files and they will be decrypted(cleo/lua/ahk) ! CLEO / LUA / AHK files can have their encryption removed In full / in part The SF / ASI / DLL file will be mainly tested It is not possible to extract code in an orderly manner from files programmed in C ++ Here you will find out if a file is safe and what it does.
:hex_to_r_g_b_a //call @hex_to_r_g_b_a 1 color 0xC0FF01FF to R 0@ G 1@ B 2@ A 3@ 0B15: 1@ = 0@ 24 0B10: 1@ = 1@ 0xFF 0B15: 2@ = 0@ 16 0B10: 2@ = 2@ 0xFF 0B15: 3@ = 0@ 8 0B10: 3@ = 3@ 0xFF 0B10: 4@ = 0@ 0xFF 0ab2: ret 4 1@ 2@ 3@ 4@ :r_g_b_a_to_hex //call @r_g_b_a_to_hex 4 R 1@ G 2@ B 3@ A 4@ to_color 5@ 0B16: 5@ = 0@ 24 0B10: 0@ = 5@ 0xFF000000 0B16: 6@ = 1@ 16 0B10: 1@ = 6@ 0x00FF0000 0B16: 7@ = 2@ 8 0B10: 2@ = 7@ 0x0000FF00 0B10: 8@ = 3@ 0x000000FF 005A: 5@ += 6@ 005A: 5@ += 7@ 005a: 5@ += 8@ 0AB2: ret 1 5@
This Snippet Gets the Pedestrian / Car / Object / Building / Particle XYZ Offsets That is Relative to the World XYZ Coordinates. :worldCoordsToEntityOffsets { By Wesser modernized by ajom Description: Convert world coordinates to entity's relative offsets. Passed: 0@ - entity pointer 1@ - position X 2@ - position Y 3@ - position Z Result: 7@ - relative offset X 8@ - relative offset Y 9@ - relative offset Z Example: 0AB1: @worldCoordsToEntityOffsets 4 _entity 0x00000000 _coords_XYZ 0.0 0.0 0.0 _storeoffsets_XYZ 1@ 2@ 3@ } 0@ += 0x14 // CEntity.m_clPlaceable.m_pclMatrix 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 0A8E: 4@ = 0@ + 0x30 // CMatrix.m_clOrigin 0AA5: call 0x40FE60 num_params 3 pop 3...
Hi guys, Some camera rotation function by me to get camera rotation because CLEO dosent have it, With this you can make a aim slapper hax :) With set you can do soething IDK but it is currently having problems the set camera rot one and it will eventually change ur keys layout to something like ADSW if u set it like 99.98 Get Camera Rotation :GetCameraRotation 0A8D: 0@ = read_memory 0xB6F178 size 4 virtual_protect 0 0AB2: ret 1 0@ // Call like call @GetCameraRotation 0 4@ Set Camera Rotation :SetCameraRotation 0A8C: write_memory 0xB6F178 size 4 value 0@ virtual_protect 0 0AB2: ret 0 // Call like call @SetCameraRotation 1 4@ + 99.98 Special Weed Effects made by me using this snippet {$CLEO .cs} {$INCLUDE SF} thread "0x32789" 0000...
Snippet deleting files from directory with specified name.. Opcode 0B00: delete_file "CLEO\log.txt" doesn't work with formated text directory. To delete file you can use this snippet.: :DeleteFile { 0AC8: 0@ = allocate_memory_size 1024 0AD3: 0@ = format "cleo\Stop.ini" 0AB1: @DeleteFile 1 File 0@ } if 0AA2: 31@ = load_dynamic_library "Kernel32.dll" then if 0AA4: 30@ = get_dynamic_library_procedure "DeleteFileA" library 31@ then 0AA7: call_function_return 30@ num_params 1 pop 0 0@ _StoreBooleanTo 29@ end 0AA3: free_dynamic_library 31@ end 0AB2: cleo_return 0
i need script "abcdefg hijklmn" divided by space i need "abcdefg" return as 0@ "hijklmn" as 1@ is it possible ?
0C17: 1@ = strlen 0@ 1@ -= 1 0C24: strncpy destination 0@ source 0@ size 1@ This was post by @supahdupahnubah All credits to him. 
100% - Working without SAMPFUNCS Example.: {$CLEO .cs} 0000: NOP WAIT 10000 WHILE TRUE WAIT 0 IF 0AB0: key_pressed 90 {Z} THEN 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255 WAIT 30 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 0 END END :Set_Virtual_Key { 255 = true 0 = false 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255 } 2@ = 0xB72CC8 0@ *= 2 005A: 2@ += 0@ // (int) 0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0 0AB2: ret 0 Virtual Game key Snippets.: :Set_Virtual_Key { 255 = true 0 = false 0AB1: @Set_Virtual_Key 2 KeyOffSet 0x57 state 255 } 2@ = 0xB72CC8 0@ *= 2 005A: 2@ += 0@ // (int) 0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0 0AB2: ret 0...
Important: from 7/09/2020 update, "HTTP_GET" and "HTTP_POST" have additional parameter called "is_https", which allow it to use https (secure) protocol. So number of parameters in HTTP_GET and HTTP_POST "0AB1: call_scm_func" opcode calls must be updated (now it's 4 for HTTP_GET instead of 3, and it's 5 instead of 4 for HTTP_POST). If you never used this snippet in the past, please ignore this message (because examples below are updated). Code to put inside "Gta/cleo/includes/http_requests.txt": /* Based on the work of: - legend2360 from BlastHack forum https://blast.hk/threads/13410/page-214#post-54339 - AhnMo from github https://gist.github.com/AhnMo/5cf37bbd9a6fa2567f99ac0528eaa185 */ // 0AB1...
Like before on the 0.3z version, here you can share updated offset's / structures / infos about samp 0.3.7 RC's. SAMP_INFO_OFFSET - Tested (0.3.7-RC1) (0x688) "samp.dll"+0x215B40 SAMP_INFO_OFFSET + 0x3C8 = RakClientInterface PTR SAMP_CHAT_INFO_OFFSET - Tested (0.3.7-RC1) (0x688) "samp.dll"+0x215B2C "samp.dll"+0x62C10 = FUNC_ADDTOCHATWND cmon kye i'm tired :( Packet ID's (by 0x688): ID_AUTH_KEY = 12 ID_PLAYER_SYNC = 207 ID_AIM_SYNC = 203 ID_VEHICLE_SYNC = 200 ID_STATS_UPDATE = 205 ID_BULLET_SYNC = 206 Structures / Structs SAMP_INFO - Tested (0.3.7-RC1) (povargek) struct stSAMP { #pragma pack( 1 )   uint8_t              byteUnk[0x20];   char              szIP[257];   char              szHostname[255];   void             ...
Not enough cleo timers? Create/use unlimited number of precise timers with this snippet! Difference between cleo built-in TIMERA/TIMERB and this Snippet: Cleo timers depend on ingame tick, unstable FPS leads to unprecise timer measurements on both TIMERA and TIMERB. This snippets uses your Operating System's Tick Timer as reference to do precise timing measurements. To Increase the number of custom timers, Find(CTRL+F) CustomTimerRegion and add 4 bytes of hex for each new index you create. :GetLapseOfCustomTimer // 0AB1: @GetLapseOfCustomTimer 1 _TimerIndex 0@ _ReturnLapseOfTime 30@ 0AC6: 31@ = label @CustomTimerRegion pointer 0@ *= 4 // 4 bytes for each index 005A: 31@ += 0@ // custom timer index pointer 0A8D: 31@...
Simple copychat with autoresponse Dictionary from which to find word elements = { "Calcium": "Ca", "Hydrogen": "H", "Helium": "He" } most credits to a russian guy, russian are always crazy import pymem, re, example from pymem import Pymem FUNC_SAMP_SENDSAY = 0x57F0 SAMP_FIRST_CHAT_MESSAGE_OFFSET = 0x152 SAMP_CHAT_MESSAGE_SIZE = 0xFC ADDR_SAMP_CHATMSG_PTR = 0x21A0E4 SAMP_MAX_CHAT_MESSAGES = 99 class findproc: def __init__(self) -> None: self.process = Pymem("gta_sa.exe") self.module = pymem.process.module_from_name( self.process.process_handle, "samp.dll" ).lpBaseOfDll def close(self) -> None: self.process.close_process() class API: def __init__(self...
Snippet which allows you to call mouse events. With these functions you can move the Gta Sa Camera. Usually these snippet is used for aimbots and other things.. Originally made by @Opcode.eXe and lost after forum updates.. :MouseMOVE_RIGHT // 0AB1: @MouseMOVE_RIGHT 0 0AA2: 31@ = load_library "user32.dll" 0AA4: 30@ = get_proc_address "mouse_event" library 31@ IF 0A4C: mouse_not_inverted_vertically THEN 0AA5: call 30@ num_params 5 pop 0 0 0 0 -2 0 ELSE 0AA5: call 30@ num_params 5 pop 0 0 0 0 2 0 END 0AA3: free_library 31@ 0AB2: 0 :MouseMOVE_LEFT // 0AB1: @MouseMOVE_LEFT 0 0AA2: 31@ = load_library "user32.dll" 0AA4: 30@ = get_proc_address "mouse_event" library 31@ IF 0A4C: mouse_not_inverted_vertically THEN 0AA5...
This can be used to create scripts that work with various samp versions. In order to use it, I suggest to create "includes" folder inside the "gta_sa/cleo" folder. Then create "get_samp_version.txt" file inside it and paste the code below into it. The code below contains 2 functions: - get_samp_version_id (returning arbitrary number so you can easily compare it in your scripts) - get_samp_version_name /* get_samp_version_id function is reading the "IMAGE_FILE_HEADER" of samp.dll (TimeDateStamp to be specific) That TimeDateStamp is based on compilation time. See this for more info: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#file-headers "TimeDateStamp = The low 32 bits of the number of seconds...
Example without SAMPFUNCS. For 0.3.DL, works everywhere and easy to change. {$CLEO .cs} {$USE bitwise} 0000: WHILE TRUE WAIT 0 IF 0AB0: is_key_pressed 99 // Numpad 3 THEN 0B12: 31@ = 31@ XOR 1 IF 0039: 31@ == 1 THEN 0AD1: show_formatted_text_highpriority "~r~PBS: ~y~Auta~n~~g~Wlaczone" time 1000 ELSE 0AD1: show_formatted_text_highpriority "~r~PBS: ~y~Auta~n~~r~Wylaczone" time 1000 END WAIT 1000 END IF 31@ == 1 THEN IF 0256: player $PLAYER_CHAR defined THEN 0AC8: 1@ = allocate_memory_size 1024 0AC8: 2@ = allocate_memory_size 1024 0AB1: @getChatString 2 SampVersionID 3 ChatID 99 _Returned: Text 1@ PrefixText 2@ Color 3@ PrefixColor 4@ 0AC8...
Piece of code which allows you to save more numbers without storing them in external files. Edit: Tested and changed into simpler and actually working code alloc 0@ 512 //array pointer 1@ = 0 //buffer 0AB1: @IntArray_Write 3 arrayPointer 0@ index 0 val 123 0AB1: @IntArray_Write 3 arrayPointer 0@ index 1 val 9919 0AB1: @IntArray_Write 3 arrayPointer 0@ index 2 val 77 0AB1: @IntArray_Write 3 arrayPointer 0@ index 3 val 5 0AB1: @IntArray_Write 3 arrayPointer 0@ index 4 val 3661 0AB1: @IntArray_Write 3 arrayPointer 0@ index 5 val 91 0AB1: @IntArray_Write 3 arrayPointer 0@ index 6 val 7255 0AB1: @IntArray_Write 3 arrayPointer 0@ index 7 val 525 0AB1: @IntArray_Read arrayPointer 0@ index 0 _returned 1@ //do something with 1@ which becomes...
You all might not know that this Opcodes actually has a problem modifying the three rotations 0175: set_car 22@ Z_angle_to 315.0 // sets Z-angle to 315.0.... BUT ALSO SETS X-ANGLE AND Y-ANGLE TO 0.0 0731: set_car 34@ y_angle_to 73@ // sets Y-angle to 73@.... BUT ALSO SETS X-ANGLE AND Z-ANGLE TO 0.0 That is why I advise those who are dealing with changing the Car Rotations to use this snippet. This Snippet sets the Car Rotations in XYZ, the original source was posted by woksonal at blast.hk website. But I improved it to becoming more flexible when changing specific plane angle: // Format: // call @SetCarAngles 4 {CarHandle} 0@ {angleX} 1@ {angleY} 2@ {angleZ} 3@ // Usage: // call @SetCarAngles 4 {CarHandle} 15@ {angleX} -1 {angleY} -1...
I noticed that using these Opcodes gives inaccurate rotation values: // Objects: no opcode to get X and Y rotation values 0176: 13@ = object 0@ Z_angle // // Vehicles 077D: 1@ = car 0@ x_angle 06BE: 2@ = car 0@ y_angle 0174: 3@ = car 0@ Z_angle // Luckily, there are Quaternion Opcodes in cleo which gives accurate results: // objects 07C3: get_object 0@ quaternion_to 1@ 2@ 3@ 4@ 07C4: set_object 0@ quaternion_to 1@ 2@ 3@ 4@ // // vehicles 07C5: get_car 0@ quaternion_to 1@ 2@ 3@ 4@ 07C6: set_car 0@ quaternion_to 1@ 2@ 3@ 4@ // So a convertion between Quaternion and 3D-Angles is possible with:
Hello, does anyone have the Gta Sa Keep Window Running memory address? I have found this one on the forum, but it isn't working: 0x747FB6 size 1 value 0x1010101 I am looking for this, but updated:
This Snippet will instantly make your Camera Look on a specific 3D location. This Snippet actually has many uses like: Make our Camera Follow/Lock-on a certain Actor by feeding this snippet with its Position. Can be Used as an Aimbot, just feed this with a specified Camera XZ-Offsets for the Crosshair positions. Can be used for Debugging purposes like "Offset Visualizer" Tool? // 0AB1: @camatpos 5 _XYZ 0@ 1@ 2@ _withCamOffsetAngleX 3@ _andCamOffsetAngleZ 4@ :camatpos // ~~~~~~~~~~anti auto-vehicle cam movement if and TIMERA>=400 Actor.Driving($PLAYER_ACTOR) then 0A8C: write_memory 0xB70118 size 4 value 50.0 virtual_protect 0 // reset camera stabalizer timer, credit to Parazitas TIMERA = 0 end // ~~~~~~~~~~...
Computes the Vehicle's XYZ Rotation Velocity relative to its own X(Pitch), Y(Roll), and Z(Yaw) Axes. [/SPOILER] [/SPOILER] Computes the Vehicle's XYZ Rotation Velocity Relative to its own z(Roll) Axis. The Computation uses a Relative x(Pitch) Axis and Y(Roll) Axes pinned at 0.0 degrees. [/SPOILER] [/SPOILER] Computes the Vehicle's XYZ Rotation Velocity relative to the TrueNorth's Axis by NS, EW, and NW. [/SPOILER] [/SPOILER]
pRakClientInterface offset of 0.3.7 is 0x3c9 . Does someone know an offset of 0.3DL?
Based on this documentary, but this time I will demonstrate how we can register/Hook multiple new CMD and recover the parameters you've inputted in chat without using SAMPFUNCS Opcodes.
:get3DXYZInFrontOf{X,Y,Z,ZA,YA,Distance} {        Return:         PosX-InFrontOf         PosY-InFrontOf         PosZ-InFrontOf             Example: 0AB1: call_scm_func @get3DXYZInFrontOf 6 XYZ 1@ 2@ 3@ Z_Angle 4@ Y_Angle 5@  Distance 7.0 Return_XYZ_To 6@ 7@ 8@ } 3@ *= -1.0 02F6: 6@ = sine 3@ 006B: 6@ *= 5@ 005B: 0@ += 6@ 02F7: 6@ = cosine 3@ 006B: 6@ *= 5@ 005B: 1@ += 6@ 02F7: 6@ = cosine 4@ 0073: 5@ /= 6@ 02F6: 6@ = sine 4@ 006B: 5@ *= 6@ 005B: 2@ += 5@ 0AB2: ret 3 0@ 1@ 2@
With this snippet you can get digits from any text ! Explain.: {$CLEO} 0000: repeat wait 50 until 0AFA: is_samp_available 0AC8: 0@ = allocate_memory_size 260 0AD3: 0@ = format "aaa:12345678910" 0AC8: 1@ = allocate_memory_size 260 0AB1: call_scm_func @get_digits_to_print param_count 2 text 0@ memory_to_store_digits_as_text 1@ chatmsg 1@ -1 0A93: end_custom_thread :get_digits_to_print { 0@ = text 1@ = pointer to memory where digits will be stored as text } 0C17: 31@ = strlen 0@ for 30@ = 0 to 31@ 0085: 29@ = 0@ // copy pointer 005A: 29@ += 30@ // add offset (as the loop progresses it becomes pointers to first-last character) 0A8D: 28@ = read_memory 29@ size 1 virtual_protect 1 // 28@ is the...
With this snippet we can create samp dialog. Good luck... Explain with 0.3.7 .: {$CLEO .cs} 0000: wait 8500 WHILE TRUE WAIT 0 IF 0AB0: 49 {Key 1} THEN 0AC8: 0@ = allocate_memory_size 260 0AC8: 1@ = allocate_memory_size 260 0AC8: 2@ = allocate_memory_size 260 0AC8: 3@ = allocate_memory_size 260 0AD3: 0@ = format "This is Dialog caption" 0AD3: 1@ = format "DialogText %cDialogText" 0xA // 0xA - NEW LINE 0AD3: 2@ = format "Ok" 0AD3: 3@ = format "Close" 0AB1: @ShowDialog 6 id 1000 caption 0@ text 1@ button_1 2@ button_2 3@ style 2 wait 300 END END :ShowDialog IF 0AA2: 10@ = "samp.dll" THEN 0A8E: 11@ = 10@ + 0x21A0B8 // SAMP_DIALOG_INFO_OFFSET 0A8D: 12@ = readMem 11@ sz 4 vp 1...
IF 0ADC: test_cheat "RO" THEN 0A92: create_custom_thread "MyScriptName.cs" 0AD1: show_formatted_text_highpriority "Reloading..." time 9999 0A93: end_custom_thread END Example
:sampSendClickTextdraw { 0.3.7 - R1 0BCA: @sampSendClickTextdraw 1 TextDrawID 0@ } if 0AA2: 2@ = "samp.dll" then 0085: 3@ = 2@ 3@ += 0x21A0CC 0A8D: 3@ = readMem 3@ sz 4 vp 1 0A8E: 4@ = 3@ + 8 0A8C: writeMem 4@ sz 4 value 0@ vp 0 0A8E: 5@ = 2@ + 0x6CEA0 0AA6: call 5@ struct 3@ num_params 0 pop 0 end 0AB2: 0 :sampSendClickTextdraw { 0.3.7 - R2 0BCA: @sampSendClickTextdraw 1 TextDrawID 0@ } if 0AA2: 2@ = "samp.dll" then 0085: 3@ = 2@ 3@ += 0x21A0D4 0A8D: 3@ = readMem 3@ sz 4 vp 1 0A8E: 4@ = 3@ + 8 0A8C: writeMem 4@ sz 4 value 0@ vp 0 0A8E: 5@ = 2@ + 0x6CF40 0AA6: call 5@ struct 3@ num_params 0 pop 0 end 0AB2: 0 :sampSendClickTextdraw { 0.3.7 - R3...
const SAMP_CHAT_INFO_OFFSET = 0x212A6C SAMP_CHAT_INFO_OFFSET_R2 = 0x212AA4 FUNC_ADDTOCHATWND = 0x7A4F0 FUNC_ADDTOCHATWND_R2 = 0x61AB0 FUNC_SAY = 0x4CA0 FUNC_SAY_R2 = 0x4C30 end 0AF9(SFUNCS) Sends a message in chat //0AB1: @SAY 1 $text :SAY IF 0AA2: 1@ = "samp.dll" THEN     1@ += FUNC_SAY     0AA5: call 1@ num_param 1 pop 0 0@ END 0AB2: 0 0AF8(SFUNCS) Add a message to chat(not synched) //0AB1: @addMsgToChatWnd 2 $color $text :addMsgToChatWnd IF 0AA2: 2@ = "samp.dll" THEN     0085: 3@ = 2@     3@ += SAMP_CHAT_INFO_OFFSET     0A8D: 3@ = readMem 3@ sz 4 vp 1     0085: 4@ = 2@     4@ += FUNC_ADDTOCHATWND        0AA6: call 4@ struct 3@ num_params 5 pop 0 params 0 0@ 0 1@ 8 END 0AB2: 0 Simple example;
:RotationSpeedAngleZ { Status 1 = true Status 0 = false 0AB1: @RotationSpeedAngleZ 1 Status 1 } 0A96: 1@ = ped $PLAYER_ACTOR struct 0A8E: 2@ = 1@ + 0x560 // CPed +0x560 = [float] Rotation speed (Z angle) IF 0@ == 1 THEN 0A8C: writeMem 2@ sz 4 val 30.0 vp 1 ELSE 0A8C: writeMem 2@ sz 4 val 7.5 vp 1 END 0AB2: 0 Example
:SendLagRate { Status 1 = true Status 0 = false 0AB1: @SendLagRate 2 SampVersionID 0@ Status 1 } IF 0AA2: 10@ = "samp.dll" THEN IF 0@ == 1 // 0.3.7 R1 THEN IF 1@ == 1 THEN 0A8E: 11@ = 10@ + 0xEC0A8 0A8D: 12@ = readMem 11@ sz 4 vp 0 0A8C: writeMem 11@ sz 4 val 500 vp 0 0A8E: 11@ = 10@ + 0xEC0AC 0A8D: 13@ = readMem 11@ sz 4 vp 0 0A8C: writeMem 11@ sz 4 val 500 vp 0 0A8E: 11@ = 10@ + 0xEC0B0 0A8D: 14@ = readMem 11@ sz 4 vp 0 0A8C: writeMem 11@ sz 4 val 500 vp 0 ELSE 0A8E: 11@ = 10@ + 0xEC0A8 0A8C: writeMem 11@ sz 4 val 12@ vp 0...
Checks if there's any checkpoint active, use as condition(if) //call @is_cp_active 0 Checks if there's any race checkpoint active, use as condition(if) //call @is_racecp_active 0 Gets checkpoint position(XYZ) //call @get_cp_pos 0 X 1@ Y 2@ Z 3@ Gets racecheckpoint position(XYZ) //call @get_racecp_pos 0 X 1@ Y 2@ Z 3@
I would like to adjust the sound volume used in audio.asi(or audio.dll), does anyone know the volume offset?
Example {$CLEO .cs} 0000: NOP wait 10000 13@ = Render.CreateFont("Verdana", 8, 12) WHILE TRUE WAIT 0 if 0AB0: KEY_X 88 then 0A8D: 29@ = read_memory 0xB7449C size 4 virtual_protect 0 000A: 29@ += 0x4 0A8D: 29@ = read_memory 29@ size 4 virtual_protect 0 for 30@ = 0 to 89344 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@ if and 03CA: object 31@ exists 02CC: object 31@ bounding_sphere_visible then 01BB: store_object 31@ position_to 1@ 2@ 3@ 0B55...
This is FPSUnlocker (From 0.3.7 R1 - 0.3.7 R3 + 0.3.DL - R1). You can use it on new cleo extension Cleo Redux: https://re.cleo.li/. Resource: /* FPSUnlocker for 0.3.7 - R1, 0.3.7 - R2, 0.3.DL - R1, 0.3.7 - R3 SAMP versions. FPSUnlocker function is reading the SAMP version from memory address + Library(samp.dll) which creates an address with which we can turn off the "NO_GAME_PAUSING" function which, as you assume, excludes the fps limit... Author: Fr0z3n - https://ugbase.eu/members/frozen.57428/ --------------------------------------------------------------- get_samp_version_id - https://ugbase.eu/threads/snippet-get-samp-version-js.22844/ */ // Pre-conf. /// <reference path=".config/sa.d.ts" /> ///...
This is snippet for getting samp versions(From 0.3.7 R1 - 0.3.7 R4 - 2). You can use it on new cleo extension Cleo Redux: https://re.cleo.li/. The code contains 2 functions: - get_samp_version_id - get_samp_version_name /* get_samp_version_id function is reading the "IMAGE_FILE_HEADER" of samp.dll (TimeDateStamp to be specific) That TimeDateStamp is based on compilation time. See this for more info: https://docs.microsoft.com/en-us/windows/win32/debug/pe-format#file-headers "TimeDateStamp = The low 32 bits of the number of seconds since 00:00 January 1, 1970 (a C run-time time_t value), that indicates when the file was created. " In most versions that time stamp is located at offset 0x128 from samp.dll. In...
This snippet returns how actor was damaged. Author: @ajom Some changes by: @Parazitas Snippet :isActorDamaged { Use: IF 0AB1: @isActorDamaged 1 ActorHandle: $PLAYER_ACTOR _Returned: DamagedBy 0@ } 0A96: 31@ = actor 0@ struct 0A8E: 30@ = 31@ + 0x760 // DamageID Offset 0A8D: 29@ = read_memory 30@ size 4 virtual_protect 0 IF NOT 29@ == 255 // 255 = not Damaged THEN 0085: 28@ = 29@ // (int) 0A8C: write_memory 30@ size 4 value 255 virtual_protect 0 // clear last damage 0485: return_true 0AB2: ret 1 28@ ELSE 059A: return_false END 0AB2: ret 0 List of Damage types ID's (Slot0: No Weapon) (Slot2: Handguns) 0 – Fist 22 – Pistol 1 – Brass Knuckles...
:IsSAMPRunnedAsAdministrator if 0AA2: 31@ = load_dynamic_library "Shell32.dll" then if 0AA4: 30@ = get_dynamic_library_procedure "IsUserAnAdmin" library 31@ then 0AA7: call_function_return 30@ num_params 0 pop 0 _StoreBooleanTo 29@ end 0AA3: free_dynamic_library 31@ end if 29@ == true then 0485: return_true else 059A: return_false end 0AB2: cleo_return 0 Demonstration: {$CLEO} 0000: while true wait 0 if 0AB1: @IsSAMPRunnedAsAdministrator 0 then 0ACD: show_text_highpriority "GTA SAMP was Runned as Administrator" time 100 else 0ACD: show_text_highpriority "GTA SAMP has no Administrative Privileges" time 100 end end Notes: This Snippet only Detects...
OPCODES: 0B48: samp 1@ = get_current_dialog_list_item 0B49: samp set_current_dialog_list_item 1@ Without SAMPFUNCS Snippets.: 0.3.7 - R1 :Get_current_dialog_list_item { 0.3.7 - R1 0AB1: @Get_current_dialog_list_item 0 0@ } 0AA2: 1@ = "samp.dll" 1@ += 0x21A0B8 0A8D: 1@ = readMem 1@ sz 4 vp 0 1@ += 0x1C 0A8D: 1@ = readMem 1@ sz 4 vp 0 1@ += 0x443 0A8D: 1@ = readMem 1@ sz 1 vp 0 0AB2: 1 1@ :Set_current_dialog_list_item { 0.3.7 - R1 0AB1: @Set_current_dialog_list_item 1 ItemNumber 1 } 0AA2: 1@ = "samp.dll" 1@ += 0x21A0B8 0A8D: 1@ = readMem 1@ sz 4 vp 0 1@ += 0x1C 0A8D: 1@ = readMem 1@ sz 4 vp 0 1@ += 0x443 0A8C: write_memory 1@ size 1 value 0@ virtual_protect 0 0AB2: 0 0.3.7 - R2 :Get_current_dialog_list_item {...
:ForcePressGameKey // 0AB1: @ForcePressGameKey 2 _GTASA_Key 0@ _isalternatekey 1@ 0@ *= 2 if 1@ > 0 then 0@++ // next byte = alternate key end 0@ += 0xB734D0 // High Priority Controls 0A8C: write_memory 0@ size 1 value 255 virtual_protect 0 ret 0 :ForcePressGameKeyOffset // 0AB1: @ForcePressGameKeyOffset 1 _KeyOffset 0@ 0@ += 0xB734D0 // High Priority Controls 0A8C: write_memory 0@ size 1 value 255 virtual_protect 0 ret 0 KeyOffset , GTASA_Key , isalternatekey = OnFoot Control / InCar Control 0 , 0 , false = Move Right / Steer Right 1 , 0 , true = Move Left / Steer Left 2 , 1 , false = Move Backward / Steer Down 3 , 1 , true = Move Forward / Steer Up...
If you want to get the IP Address,Subnet Mask,Default Gateway,DHCP Server,Primary WINS Server,Secondary WINS Server then use this snippet: const // put this const at the header of the code ADAPTERCAPACITY = 4096 // ADAPTERCAPACITY >= 640 * ADAPTERSCOUNT // make sure to count the number of adapters you have at your computer. IPOFFSETIPADDRESS = 0x1B0 // Current IP Address IPOFFSETSUBNETMASK = 0x1C0 // Subnet Mask IPOFFSETGATEWAY = 0x1D8 // Default Gateway IPOFFSETDHCPSERVER = 0x1E8 // DHCP Server IPOFFSETPWINSS = 0x200 // Primary WINS Server IPOFFSETSWINSS = 0x210 // Secondary WINS Server end const // used by GetMyLocalIP ADAPTERLIBRARY = 31@...
Since, 0AB5 do not work in Multi-Player. There is a simple method of taking nearest car with specific radius! 00A0: store_actor $PLAYER_ACTOR position_to 1@ 2@ 3@ // This will store the XYZ Position in Variable 1@ 2@ 3@ (X = 1@, Y = 2@, Z = 3@) 0AE2: 4@ = random_vehicle_near_point 1@ 2@ 3@ in_radius 10.0 find_next 0 pass_wrecked 0 // random car in near point and Kinda useless but snippet is snippet! Constant radius i recommend is 9.0
Hi. I download Chat++ but it's not working for me. It's not even opening box where is Copy and other shiet. So can someone help how to use it or something. Adding file which is not working for me...
If you don't have SAMPFUNCS and needs to convert between Window Screen Coordinate System and Game Screen Coordinate System, try using these converter snippets:
:hellno: But that line will be strange when its moving  :okey: //0AB1: @DRAW_LINE 9 POS 10.0 10.0 _TO_ 200.0 310.0 RGBA 255 0 0 255 THICKNESS 1.0 :DRAW_LINE 0087: 11@ = 2@ // (float) 0087: 12@ = 3@ // (float) 0509: 10@ = distance_between_XY 0@ 1@ and_XY 2@ 3@ 10@ -= 37.0 {REMOVE STRANGE OFFSET AT END} 0063: 2@ -= 0@ // (float) 0063: 3@ -= 1@ // (float) 0604: get_Z_angle_for_point 2@ 3@  store_to 9@ 9@ += 84.0 005B: 0@ += 11@ 0@ /= 2.0    {MITTE} // get center pos 005B: 1@ += 12@ 1@ /= 2.0 03F0: enable_text_draw 1 074B: draw_texture 666 position 0@ 1@ scale 10@ 8@ angle 9@ color 4@ 5@ 6@ 7@ 0AB2: 0
With this snippet we can get nick name. Good luck... Explain with 0.3.7 .: {$CLEO .cs} 0000: repeat wait 0 until 0afa: WHILE TRUE wait 0 call @Get_LocalPlayer_Name 0 0@ chatmsg "%s" -1 0@ END :Get_LocalPlayer_Name /// 0AB1: call_scm_func @Get_My_NickName 0 0@ 0AA2: 0@ = loadLib "samp.dll" //samp base offset 0@ += 0x21A0F8 0A8D: 0@ = readmem 0@ sz 4 vp 0 //stInfo 0@ += 0x3CD 0A8D: 0@ = readmem 0@ sz 4 vp 0 //stPools 0@ += 0x18 0A8D: 0@ = readmem 0@ sz 4 vp 0 //stPlayerPools 0@ += 0xA //szLocalPlayerName 0AB2: ret 1 0@ Snippets.: 0.3.7 :Get_LocalPlayer_Name /// 0AB1: call_scm_func @Get_LocalPlayer_Name 0 0@ 0AA2: 0@ = loadLib "samp.dll" //samp base offset 0@ += 0x21A0F8 0A8D: 0@ = readmem 0@ sz 4 vp 0...
//0AB1: call_scm_func @getScreenXYFrom3DCoords 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 3@ Y_to 4@ :getScreenXYFrom3DCoords 0AC7: 14@ = var 0@ offset 0AC7: 15@ = var 3@ offset 0AC7: 16@ = var 6@ offset 0AC7: 17@ = var 9@ offset 0AA5: call 0x70CE30 num_params 6 pop 6 {18@ 18@} 0 0 17@ 16@ 15@ 14@ 0007: 12@ = 640.0 0007: 13@ = 448.0 0A8D: 14@ = read_memory 0xC17044 size 4 virtual_protect 0 0A8D: 15@ = read_memory 0xC17048 size 4 virtual_protect 0 0093: 14@ = integer 14@ to_float 0093: 15@ = integer 15@ to_float 0073: 12@ /= 14@ 0073: 13@ /= 15@ 006B: 3@ *= 12@ 006B: 4@ *= 13@ 0AB2: ret 2 3@ 4@
With this snippet, you can generate a fabricated name from a random online player in the server: Player Name Spoofing is a method where in you Pretend to be other Player's Name. This type of trick is Mostly used to deceive other players that knows the target. There are many ways to Spoof nicknames. Interchanging letter "l or small L" and "I or big i" on player names. Can you tell the difference between letters "l and I" in SAMP? The Deception percentage is 100%. The Respective list have a Deception percentage of 100(n-(1/n))% where "n" is the length on the target nickname. So having a namelength of 10 will have a deception percentage of 90% Dot(.) Name Addition - adding extra dot at the beggining or at the end of the name. Numerical...
DIALOG 0AB1: @isDialogOpen 0 ret dType 0@ dId 1@ :isDialogOpen 0AA2: 1@ = "samp.dll" 1@ += 0x212A40 0A8D: 1@ = readMem 1@ sz 4 vp 0 0A8E: 2@ = 1@ + 40 0A8D: 2@ = readMem 2@ sz 4 vp 0 if 2@ == 1 then     0A8E: 3@ = 1@ + 44 //dialogType     0A8D: 3@ = readMem 3@ sz 4 vp 0     0A8E: 4@ = 1@ + 48 //dialogId     0A8D: 4@ = readMem 4@ sz 4 vp 0     0485: dialog_open     0AB2: ret 2 3@ 4@ else 059A: dialog_closed end 0AB2: ret 2 -1 -1 ChatInput 0AB1: @isChatOpen 0 :isChatOpen 0AA2: 1@ = "samp.dll" 1@ += 0x212A70 0A8D: 1@ = readMem 1@ sz 4 vp 0 1@ += 8 0A8D: 1@ = readMem 1@ sz 4 vp 0 1@ += 4 0A8D: 1@ = readMem 1@ sz 1 vp 0 if 1@ <> 0 then 0485: chat_open else 059A: chat_closed end 0AB2: ret 0
This Snippet will get any actor that is near the specified part of the screen. This snippet is actually advanced and hard to understand by some users. But I will try to Pinpoint its use: A 2D Rectangle somewhere within the screen will bound the area of where desired actors will be fetched. the Drawing of Rectangle is from TopLeft to BottomRight Inside the 2D Rectangle, the user has an option to pin a "Base Coordinate". This Base Coordinate will be the "Center of Radius" for fetching nearby actors. The Base Coordinate(_nearscreencoordXY) shall be within the 2D Rectangle. It has a parameter to IGNORE a specific Actor that will not be processed during the actor fetching. The Actor fetching is all screen based(bounded within the...
Gets the Point from an origin to target point with a specific distance offset. { gets the point towards another point with a specific offset Usage: 0AB1: @getpointwithpolaroffset 7 _fromXYZ 0@ 1@ 2@ _offsetdistance 3@ _towardsXYZ 4@ 5@ 6@ _storeXYZ 29@ 30@ 31@ Examples: 0AB1: @getpointwithpolaroffset 7 _fromXYZ 0@ 1@ 2@ _offsetdistance 1.0 _towardsXYZ 4@ 5@ 6@ _storeXYZ 29@ 30@ 31@ // pointA towards to pointB 0AB1: @getpointwithpolaroffset 7 _fromXYZ 0@ 1@ 2@ _offsetdistance -1.0 _towardsXYZ 4@ 5@ 6@ _storeXYZ 29@ 30@ 31@ // pointA away to pointB } :getpointwithpolaroffset // ~~~~~~~~~~~get z-angle towards the target with respect to world z angle 0087: 30@ = 5@ // Y2 0063: 30@ -= 1@ // Y1 0087: 31@ = 4@...
Code return: Screen resolution with float and int format . Everything depends which one you need use in your code... :getScreenResolution //0AB1: @getScreenResolution 0 ScreenX {Float} 0@ ScreenY {Float} 1@ ScreenX {int} 2@ ScreenY {int} 3@ 0A8D: 0@ = read_memory 0xC17044 size 4 virtual_protect 0 // (int) full screen X 0085: 4@ = 0@ // copy (int) full screen X 0093: 0@ = integer 0@ to_float 7@ = 640.0 // screen X 0A8D: 1@ = read_memory 0xC17048 size 4 virtual_protect 0 // (int) full screen Y 0085: 5@ = 1@ // copy (int) full screen Y 0093: 1@ = integer 1@ to_float 8@ = 448.0 // screen Y 0087: 2@ = 0@ // copy (float) full screen X 0087: 3@ = 1@ // copy (float) full screen Y 10@ = 1280.0 // screen X * 2 11@ = 896.0 // screen Y * 2 if 0@...
It affects in only 1 frame. It means that you have to call this in every frame and you can use this to any objects. :ATTACH // 0AB1: @ATTACH 6 AS_actor $PLAYER_ACTOR attach_to_object 0@ offset 0.0 0.0 0.0 on_bone 6 0A9F: 6@ = current_thread_pointer 000A: 6@ += 0x44 0A96: 7@ = actor 0@ struct 0085: 0@ = 7@ // (int) 000A: 0@ += 0x18 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 0AA7: call_function 0x734A40 num_params 1 pop 1 0@ 0@ // _clumpGetFirstSkinAtomicHAnimHierarchy 0012: 5@ *= 0x4 000A: 5@ += 0x488 005A: 5@ += 7@ // (int) 0A8D: 5@ = read_memory 5@ size 4 virtual_protect 0 000A: 5@ += 0x14 0A8D: 5@ = read_memory 5@ size 4 virtual_protect 0 0A8D: 7@ = read_memory 0x7C51E0 size 4 virtual_protect 1 if 0039: 7@ == 0x424548B...
OK, because I always hack on servers. I use this snippet to change my name into a random/obfuscated string before I log out so that I will not get caught by admins.It is an awesome snippet for me. Idea: It can be integrated on cleo scripts that changes the player name everytime he joins a server... Interesting. { Usage: 0AC8: 0@ = allocate_memory_size 21 0AB1: call_scm_func @randomnamegenerator 2 _inoutname 0@ _charcount 20 0AD1: show_formatted_text_highpriority "%s" time 2000 0@ 0AC9: free_allocated_memory 0@ NOTICE: - THE ALLOCATED MEMORY MUST BE GREATER THAN THE CHARACTER COUNT! As you can see on the example usage the allocated is 21 and the charcount is 20, you can set more than 21 allocated...
Computes the arctangent angle in the Euclidean plane, given in radians. atan2 is far more superior because atan can only return an angle of -90 to +90 degrees or -pi/2 to pi/2. atan2 is mostly used on "Aimbots". I always use atan2 beside of atan when I am dealing with geometric computaions. Method 1 SCM-Function: { computes atan2(y,x) where y = 0@ , x = 1@ Usage: 0AB1: @atan2 2 _floatY 23@ _floatX 5@ _floatresult 14@ // 14@ = atan2(23@,5@) where 14@ is in radians format 14@ *= 57.295779817106167876798171061675 // 14@ in degrees format(optional) } :atan2 if 1@ <> 0 then 0087: 30@ = 0@ // (float) 0073: 30@ /= 1@ // (float) 0C08: math 31@ = arctangent 30@ // (float) if 1@ < 0 // a -x value then if 0@ < 0...
Requires SAMPFUNCS Detects if a samp streamed player/actor is dead/alive: // Usage: // only use as conditional statements // if 0AB1: @playerstatesamp 3 _actor 31@ _player -1 _checkifdead true // if 0AB1: @playerstatesamp 3 _actor 31@ _player -1 _checkifdead false // if 0AB1: @playerstatesamp 3 _actor -1 _player 31@ _checkifdead true // if 0AB1: @playerstatesamp 3 _actor -1 _player 31@ _checkifdead false // DO NOT USE THIS FUNCTION WIth AND/OR GATES // if or // INACCURATE RESULT! // 0AB1: @playerstatesamp 3 _actor 31@ _player -1 _checkifdead true // ..... blablabla // // if and // INACCURATE RESULT! // 0AB1: @playerstatesamp 3 _actor 31@ _player -1 _checkifdead true // ..... blablabla :playerstatesamp // this...
Dunno if made already, couldn't find it so made one what is this used for?: spamming chat sources used: LukasParazitas http://ugbase.eu/index.php?threads/help-reading-a-string.20798/#post-121582 (I dunno how to make functions in cleo so i just copy pasted his and adjusted it) //EXAMPLE alloc 0@ 256 format 0@ "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM123456789" alloc 1@ 121 // always alloc 1 more byte than length for '\0' 0AB1: call_scm_func @random_string param_count 3 string 0@ length 120 text_start_pointer 1@ :random_string { 0@ = string 1@ = length 2@ = text start pointer } 0C17: 3@ = strlen 0@ for 4@ = 0 to 1@ 0085: 5@ = 0@ 0209: 6@ = random_int_in_ranges 0 3@ 005A: 5@ += 6@ 0A8D: 7@ =...
Many of you probably C+P'ed the "addClientCommand" out of mod_sa, it's easy to use and has one annoying thing to it.. It is the internal SA:MP limit of commands, you can actually bypass this pretty easy and do your own "command handler" which will also classify you as !337 l33t hax0r. First you need to know how SA:MP handles commands, basically if the input text of the editcontrol on the chatgui contains a "/" it scans through the internal list of commands and if it can't find one it'll send the request to the server. This is where we come in, it's actually pretty easy to go between the call and do your own magic. Today I will present you how, you should have a little experience tho I won't bother explaining everything here. Step one...
Function: 0AB1: @POSITION_TO_RADAR 7 XYZ 0.0 0.0 0.0 RADAR_POS 400 400 DISTANCE_MULTIPLIER 1.5 MAX_DISTANCE 300.0 _STORE_TO 1@ 2@ This function converts 3D position to 2D Radar position like on the Minimap. You can make things like this: http://i.san-mp.de/i/26CEA9.webm Source: {$CLEO .cs} 0000: REPEAT     WAIT 0 UNTIL 0AFA:  SAMP_IS_READY 0B6D: 5@ = create_font "Arial" height 10 flags 0x4 0BFC: SET_VAR "MadeByOpcodeXe" = 5@ WHILE TRUE     WAIT 0     FOR 31@ = 0 TO 1000         IF         0B23:  samp is_player_connected 31@         THEN             IF             0B20: samp 30@ = actor_handle_by_samp_player_id 31@             THEN                 0AB1: @GET_BONE_POS 2 FROM_ACTOR $PLAYER_ACTOR BONE 6 _STORE_TO 5@ 6@...
call @SendFakeSpecSync 3 0@ 1@ 2@ :SendFakeSpecSync Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@) alloc 3@ 18 0C0D: struct 3@ offset 0 size 2 = 0 // sLeftRightKeys; 0C0D: struct 3@ offset 2 size 2 = 0 // sUpDownKeys; 0C0D: struct 3@ offset 4 size 2 = 0 // sKeys; 0C0D: struct 3@ offset 6 size 4 = 0@ //fPosition[X]; 0C0D: struct 3@ offset 10 size 4 = 1@ // fPosition[Y]; 0C0D: struct 3@ offset 14 size 4 = 2@ //fPosition[Z]; 0B3D: raknet 4@ = new_bit_stream 0B40: raknet bit_stream 4@ write 212 type 0 size 1 0B40: raknet bit_stream 4@ write 3@ type 5 size 18 0B8B: raknet send bit_stream 4@                0B3E: raknet delete_bit_stream 4@ free 3@ ret 0 Useful for trolling admins with your fake spectator mode and getting synced invisible.
Example {$CLEO .cs} 0000: wait 8500 while true wait 0 if 0256: player $PLAYER_CHAR defined then for 0@ = 0 to 175 // from 0 to max blip 0AB1: @GetRadarBlipInfo 1 BlipID 0@ _Return: ColorID 1@ RGB 2@ 3@ 4@ XYZ 5@ 6@ 7@ IconID 8@ if 8@ == 0 // Square/Triangle - mostly used to mark checkpoint or any place in server by owner then if 00DF: actor $PLAYER_ACTOR driving then 03C0: 9@ = actor $PLAYER_ACTOR car 00AE: set_car 9@ traffic_behaviour_to 2 00A7: car 9@ drive_to 5@ 6@ 7@ end end end end end :GetRadarBlipInfo { 0AB1: @GetRadarBlipInfo 1 BlipID 0@ _Return: ColorID 1@ RGB 2@ 3@ 4@...
Code remove all string between characters.. Example.: You have text like: {0000FF}123456{FF00FF}78 You wanna get only: 12345678 So you need use like: {$CLEO} 0000: repeat wait 0 until 0AFA: 0AC8: 0@ = allocate_memory_size 1024 0AD3: 0@ = format "{0000FF}123456{FF00FF}78" 0AC8: 1@ = allocate_memory_size 1024 0AB1: call_scm_func @changeString param_count 4 text 0@ FirstCharacter 123 SecondCharacter 125 memory_to_store_characters_as_text 1@ chatmsg 1@ -1 0A93: end_custom_thread :changeString { 0AB1: call_scm_func @changeString param_count 4 text 0@ FirstCharacter 91 SecondCharacter 93 memory_to_store_characters_as_text 1@ In: 0@ = text , FirstCharacter , SecondCharacter Out: 1@ = pointer to memory where characters...
OPCODE: 0B47: samp close_current_dialog_with_button 1@ Without SAMPFUNCS :CLOSE_DIALOG { 0.3.7 - R3 0AB1: @CLOSE_DIALOG 1 Button 0 // 0 = Left , 1 = 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 :CLOSE_DIALOG { 0.3.DL 0AB1: @CLOSE_DIALOG 1 Button 0 // 0 = Left , 1 = 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@...
const SAMP_CHAT_INFO_OFFSET = 0x212A6C //0.3z end :getChatEntryText // 0AB1: call @getChatEntryText 1 id 0@ to 1@ { In 0@ - number of chat line. 99 line is last. Out 1@ - line text } 0AB1: call @GetSampBase 0 1@ 1@ += SAMP_CHAT_INFO_OFFSET 0A8D: 1@ = read_memory 1@ size 4 virtual_protect 0 1@ += 0x136 0@ *= 252 // size of stChatEntry 005A: 1@ += 0@ // (int) 1@ += 28 0AB2: ret 1 1@ :GetSampBase 0AA2: 31@ = load_library "kernel32.dll" // IF and SET 0AA4: 30@ = get_proc_address "GetModuleHandleA" library 31@ // IF and SET 0AA7: call_function 30@ num_params 1 pop 0 "samp.dll" 0@ 0ab2: ret 1 0@ 0.3.7 :getChatEntryText IF 0AA2: 1@ = "samp.dll" THEN     1@ += 0x21A0E4     0A8D: 1@ readMem 1@ sz 4 vp 0     1@ += 0x132     0@ *= 0xFC    ...
Example: if or 044B: actor $PLAYER_ACTOR on_foot 00DF: actor $PLAYER_ACTOR driving then 0AB1: @GetClosestPickup 0 XYZ 0@ 1@ 2@ 06D5: 29@ = create_racing_checkpoint_at 0@ 1@ 2@ point_to 0@ 1@ 2@ type 2 radius 1.0 wait 1000 06D6: disable_racing_checkpoint 29@ end 0AB1: @GetClosestPickup 0 XYZ 0@ 1@ 2@ :GetClosestPickup 20@ = 9999.0 for 30@ = 0x9788C0 to 0x97D620 step 0x20 if 30@ > 0 then 0A8E: 31@ = 30@ + 0x1A 0A8D: 31@ = read_memory 31@ size 2 virtual_protect 0 31@ *= 0x10000 0A8F: 29@ = 30@ - 0x9788C0 29@ /= 0x20 005A: 31@ += 29@ 065B: store_pickup 31@ position_to 4@ 5@ 6@ 04C4: store_coords_to 7@ 8@ 9@ from_actor $PLAYER_ACTOR...
So.. you're making a CLEO and hate it to restart your Gta Sa all the time to test the new .cs? Well, here's the solution: 0AB1: @RESTART 1 WITH_KEY 88 // KEY_X Paste that function in the main loop of your cleo, now when u press X ingame, the new .cs gets loaded. ++ RENAME YOUR CLEO MOD TO: TEST.CS :RESTART IF 0AB0: 0@ THEN     REPEAT         WAIT 0         PRINT "~R~RESTART: ~w~TEST.CS" 100     UNTIL 8AB0: 0@ 0A92: RESTART "TEST.CS" 004E: STOP THIS CLEO END 0AB2: 0
I can't post this in "reuqest" since i "don't have privileges". I'm looking for a directx keypress so i can type 0xA and send the A key (not actually), does anybody have the address?
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@
Sup Boys, I coded a small CLEO and made that people wont take any damage from my bullets (returning the 206 packet false). It works very well for Lagcompon (Skinshot) but for some reason I can't explain to myself my bullets still do damage on lagcompoff servers. Am I forgetting any important packets that I also need to interrupt for lagcompoff? e: just realized that there is no bullet sync for lagcompoff, im retarded. greetz
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