Snippets

4@ - text :LowerCase_To_Uppercase 0@ = 0x40 repeat     wait 0            0@ += 0x01     if 0C2A: 2@ = strchr 4@ char 0@     then         0085: 1@ = 0@ // (int)         1@ -= 0x20         repeat             wait 0             0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0         until 8C2A: 2@ = strchr 4@ char 0@     end until 0@ == 0x7A ret 0 :Uppercase_To_Lowercase 0@ = 0x40 repeat     wait 0            0@ += 0x01     if 0C2A: 2@ = strchr 4@ char 0@     then         0085: 1@ = 0@ // (int)         1@ += 0x20         repeat             wait 0             0A8C: write_memory 2@ size 1 value 1@ virtual_protect 0         until 8C2A: 2@ = strchr 4@ char 0@     end until 0@ == 0x5A ret 0
Lets you read a string from a list by id. Useful for advanced shit. 0AB1: @ReadStrFromList 2 at @STRINGS with_id 3 save_into 0@ :ReadStrFromList 0AC6: 0@ = label 0@ offset 000A: 0@ += 0x4    0006: 2@ = 0 WHILE 001D:   1@ > 2@     0006: 3@ = 1     WHILE 3@ <> 0            0A8D: 3@ = read_memory 0@ size 1 virtual_protect 0         0@++     END     000A: 0@ += 0x3     2@++ END 0AB2: 1 0@ :STRINGS 0900: "This string has id 0" 0900: "This one has id 1" 0900: "And this one 2" 0900: "and so on.. 3" 0000: Example source code: {$CLEO .cs} 0000: REPEAT     WAIT 0 UNTIL 0AFA:  SAMP_IS_READY FOR 31@ = 0 TO 5     // 0@ = you dont need to allocate memory to store the string.     0AB1: @ReadStrFromList 2 at @WELCOME_MESSAGES with_id 31@...
With this two snippets you can get Cursor Position. Explane.: {$CLEO .cs} 0000: REPEAT WAIT 0 UNTIL 0AFA: SAMP_IS_READY WHILE TRUE wait 0 IF 0B8C: samp is_cursor_active THEN 0AB1: @GetCursorPos 0 0@ 1@ 0AB1: @getFullScreenXY 2 FullScreen_And_CursorX 0@ FullScreen_And_CursorY 1@ conver to 0@ 1@ 0093: 0@ = integer 0@ to_float 0093: 1@ = integer 1@ to_float printf "%0.1f %0.1f" 2000 0@ 1@ END END :getFullScreenXY 2@ = 640.0 // screen X 0A8D: 4@ = read_memory 0xC17044 size 4 virtual_protect 0 // full screen X 0093: 4@ = integer 4@ to_float 0073: 2@ /= 4@ 006B: 0@ *= 2@ 3@ = 448.0 // screen Y 0A8D: 5@ = read_memory 0xC17048 size 4 virtual_protect 0 // full screen Y 0093: 5@ = integer 5@ to_float 0073: 3@...
{   Change's the Weapon.dat value of Weapon ID to your custom one.   0AB1: @WEAPON_DAT 4 | -> Change Weapon 24 DAT 0x20 VALUE_TO 45 SIZE_OF_DAT 4 // MaxAmmo in Clip   Get DAT'S from http://hotmist.ddo.jp/struct.html } :WEAPON_DAT 0@ += 0x24 //+0x0 - no skill +0x19 - 50% skill +0x24 - 100% skill 0@ *= 0x70 // BLOCK SIZE 0@ += 0xC8AAB8 // BASE 005A: 0@ += 1@  // (int) 0A8C: write_memory 0@ size 3@ value 2@ virtual_protect 0 0AB2: ret 0
Wanna make a iTroll mod without using "put_actor_in_car"? Wanna make Car Teleport hacks so everyone can see it? Here you go: const PACKET_VEHICLE_SYNC = 219 BS_TYPE_BYTE = 0 BS_TYPE_ARRAY = 5 end //0AB1: @SYNC_VEHICLE 1 HANDLE 0@ :SYNC_VEHICLE IF 0B2C: 1@ = get_vehicle_id_by_car_handle 0@ THEN      0AC8: 31@ = allocate_memory_size 63 // struct stInCarData ( size = 63 )     0C0D: struct 31@ offset 0 size 2 = 1@ // sVehicleID;     0C0D: struct 31@ offset 2 size 2 = 0 // sLeftRightKeys;     0C0D: struct 31@ offset 4 size 2 = 0 // sUpDownKeys;     0C0D: struct 31@ offset 6 size 2 = 0 // sKeys;            0A97: 17@ = car 0@ struct      17@ += 0x14     0A8D: 17@ = read_memory 17@ size 4 virtual_protect 0     0AB1: call_scm_func...
:DistanceBetweenTwoPoints 0063: 0@ -= 3@  // (float) 0063: 1@ -= 4@  // (float) 0063: 2@ -= 5@  // (float)    006B: 0@ *= 0@  // (float) 006B: 1@ *= 1@  // (float) 006B: 2@ *= 2@  // (float)        005B: 0@ += 1@  // (float) 005B: 0@ += 2@  // (float)    01FB: 0@ = square_root 0@ ret 1 0@ Usage: 0AB1: call_scm_func @DistanceBetweenTwoPoints 6 Point_1 5@ 6@ 7@  Point_2 8@ 9@ 10@ RetTo 11@ :sadpepe: For no SF users
A set of functions that make it easy to loop through colors and create rainbow effect. After copying all the functions from the snippet below the user can implement 2 simple function calls that will take care of the complex process behind it. These functions are: 1. "ShiftColorHue" which changes the color with variable speed, it has the following parameters:     0@ - speed_step - how fast the color change occurs (from 1 to ~30)     1@ - direction (1-rgb order, 2-reversed order)     2@ - hue variable which needs to be dedicated for this snippet (from 1 to 359, it's actually the only variable that is required in external code for this snippet) 2. "GetCLRfromHSV" which converts Hue (the actual color of the color ;p), Saturation, and Value...
Explain.: {$CLEO .cs} 0000: wait 10000 WHILE TRUE wait 0 if 0ab0: 87 {W Key} then Printf "You now runing" 1337 0AB1: call @CHAR_SPRINT 1 Sprint_Status true // true - start CHAR run , false - start CHAR walk normal end end Snippet.: :CHAR_SPRINT if 3@ == false then 4@ = 0xB73458 4@ += 0x20 0A8C: write_memory 4@ size 1 value 0 virtual_protect 0 else 4@ = 0xB73458 4@ += 0x20 0A8C: write_memory 4@ size 1 value 255 virtual_protect 0 end 0AB2: ret 0
:keyPress // 0@ - key, 1@ - time // Example: 0AB1: call @keyPress 2 key 0@ time 1@ 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 1@         0AA5: call 2@ num_params 4 pop 0 0 0x02 0 0@     end end 0AB2: ret 0
This gets the closest player to your crosshair instandly, not like the old version. example:         IF         0AB1: @GET_TARGET_ACTOR 0 0@         THEN             04C4: store_coords_to 1@ 2@ 3@ from_actor 0@ with_offset 0.0 0.0 0.0                                    END :GET_TARGET_ACTOR 28@ = 640.0  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@         if         056D:  actor 31@ defined         then             if             803C: ...
with this method you l reach the middle of the box Dialog.AddCheckBox(dialog_id 0@, checkbox_id 0, checkbox_caption "", XY: 200, 5, SIZE: 25, 25) while true     wait 0     if Dialog.IsVisible(0@)     then         if Dialog.CheckBoxIsChecked(0@, 0)         then             0B5E: get_cursor_pos 3@ 4@             //////////////////////////////////////             {checkbox_x_pos = checkbox_x_pos + 10}             {checkbox_y_pos = checkbox_y_pos + 25}             //////////////////////////////////////             3@ -= 210             4@ -= 30             //////////////////////////////////////             {3@ = 3@ - checkbox_x_pos}             {4@ = 4@ - checkbox_y_pos}             Dialog.GetRECT(0@, -1, -1, 1@, 2@)              ...
Function useful for measuring time (cleo timers are not accurate when the game is lagging, for example when the car speed is very high). It returns time since PC was started (in milliseconds). //0AB1: call_scm_func @GetTickCount 0 _returnedTickCount 31@ :GetTickCount 0AA2: 2@ = load_library "kernel32.dll" // IF and SET 31@ = 0   if 0AA4: 3@ = get_proc_address "GetTickCount" library 2@ // http://www.geoffchappell.com/studies/windows/win32/kernel32/api/index.htm   https://msdn.microsoft.com/en-us/library/windows/desktop/ms724408(v=vs.85).aspx   then       0AA7: call_function 3@ num_params 0 pop 0 31@       end 0AA3: free_library 2@ 0AB2: ret 1 31@
Took some time but manage to make it: // Take target actor or anyone position and set their x,y,z coords with 1@,2@ and 3@ variable 0073: 1@ /= 3@ 0073: 2@ /= 3@     // negative value 0AD1: "%f %f" 2000 1@ 2@ wait 2000 0092: 21@ = float 2@ to_integer  04AF: 5@ = 21@ 0A8F: 6@ = 21@ - 21@ // empty 0A8F: 7@ = 6@ - 5@ 0093: 22@ = integer 7@ to_float  0AD1: "%f %f" 2000 1@ 22@ Example is included: It first declare some coords from actor (1@, 2@, 3@). Now for converting it in 2d coords, we shall divide 1@, 2@ coords from actor Z coord. 0AD1 will exactly show the actor coords into 2d screen coords.  Now one problem is that Y Coord of actor (2@) is negative which is out of screen. Generally, if you are making a text draw then it will not...
{$CLEO .cs} thread 'SlidoorL' 0000: NOP :SR_start wait 0 if Actor.DrivingVehicleType($PLAYER_ACTOR, #CABBIE) jf @SR_start 03C0: 0@ = actor $PLAYER_ACTOR car 095F: get_car 0@ door 4 angle_to 12@ wait 0 if   not 12@ == 0.0 else_jump @SR_start :SR_open_enter1 095F: get_car 0@ door 4 angle_to 12@ 12@ *= 10 0085: 13@ = 12@ // (int) wait 0 if   13@ > 8 else_jump @SR_open_enter1 073C: car 0@ damage_component 4 :SR_open_enter2 095F: get_car 0@ door 4 angle_to 12@ wait 0 if   0.8 > 12@ else_jump @SR_open_enter2 :SR_open_enter3 095F: get_car 0@ door 4 angle_to 12@ wait 0 if   12@ == 0.0 else_jump @SR_open_enter3 068A: set_car 0@ repair_componentA 4 jump @SR_start 0A93: end_custom_thread {$CLEO .cs} thread...
This was long and kinda complicated but still somehow manage...: {$CLEO} 0000: :isSampAvailable 0001: 0 0AFA: 004D: @isSampAvailable 0002: @BaseAimLoop :BaseAimLoop 0001: 0 const    pTarget = 0xB6F3B8  //DWORD* pTarget = (DWORD*)0xB6F3B8;//pointer of target object.    pActor = 0xB6F5F0   //DWORD* pActor = (DWORD*)0xB6F5F0;//pointer of player actor    pCamera = 0xB6F99C  //DWORD* pCamera = (DWORD*)0xB6F99C;//camera pointer    camXpos = 0xB6F258  //float* camXpos = (float*)0xB6F258;//writeable camera Z angle end 0A8D: 1@ = read_memory pActor size 4 virtual_protect 0 if 1@ > 0 jf @BaseAimLoop 0A8D: 33@ = read_memory pActor size 4 virtual_protect 0 0A8E: 33@ = 0x46C + 33@ const    pVehicle = 33@  //char* pVehicle = (char*)((*pActor)...
:SCM_MessageBox // 0AB1: /* [SP/MP] */ call_scm_func @SCM_MessageBox params 4 | hWnd 0@ lpText 1@ lpCaption 2@ uType 3@ | _errorCode 31@ | 0AA2: 25@ = load_library "User32.DLL" 0AA4: 26@ = get_proc_address "MessageBoxA" library 25@ 0AA7: call_function 26@ num_params 4 pop FALSE | uType 3@ lpCaption 2@ lpText 1@ hWnd 0@ | _errorCode 27@ | 0AA3: free_library 25@ 0AB2: RET 1 | _errorCode 27@ | Example: {$CLEO} 0AC6: 0@ = label @lpText offset 0AC6: 1@ = label @lpCaption offset WHILE TRUE 0001: WAIT FALSE    IF 0ADC:   test_cheat "1"    THEN    0AB1: /* [SP/MP] */ call_scm_func @SCM_GetForegroundWindow params FALSE || HWND 2@ |    0AB1: /* [SP/MP] */ call_scm_func @SCM_MessageBox params 4 | hWnd 2@ lpText 0@ lpCaption 1@ uType...
(Get Display resolution) call @GetResolution 0 1@ 2@ :GetResolution 0A8D: 0@ = read_memory 0xC9C040 size 4 virtual_protect 0 //X 0A8D: 1@ = read_memory 0xC9C044 size 4 virtual_protect 0 //Y ret 2 0@ 1@   Getting display inches: call @DisplayInch 0 1@ :DisplayInch 0A8D: 0@ = read_memory 0xC9C048 size 4 virtual_protect 0 ret 1 0@ (DisplayRefresh) call @DisplayRefresh 0 1@ :DisplayRefresh 0A8D: 0@ = read_memory 0xC9C070 size 4 virtual_protect 0 ret 1 0@ (To verify if the game running in window or not) call @isWindowMode 0 :isWindowMode 0A8D: 0@ = read_memory 0xC9C060 size 4 virtual_protect 0 if 0@ == 1    then ret 0 1 end ret 0 0 [hr] (Turn the game into windowed) 0ab1: call @SetWinMode 0 :SetWinMode 0A8C: 0xc9c060 4...
Some things you could know: SA:MP has NO HDD BAN there is just a simple hash which can be changed w/o problems (gpci) Ways to change it: http://ugbase.eu/forum47.html SA:MP trusts the client in almost every situation. The SA:MP Version check consists of a string which is changeable and will allow you to connect to servers with this check enabled. You can't hack users accounts w/o any script/web based vuln. You can't bake cakes with SA:MP it can't even do the simplest thing for you (objects are pre-baked! not by sa-mp tho). Some things you absolutely should know: Stop, oh please stop it in the name of all developers ask for "player/server crashers" finding one of them is hard and no they are not just made THEY ARE ACTUALLY >worked<...
call @SendUnOccupiedVehicleSync 4 1@ 2@ 3@ 4@  // 1@ = vehicleid                                                                                                         // 2@, 3@,  4@ = victim's coords :SendUnOccupiedVehicleSync 7@ = SAMP.GetSAMPVehicleIDByCarHandle(0@) Car.PutAt(0@, 1@, 2@, 3@) alloc 4@ 67 0C0D: struct 4@ offset 0 size 2 = 7@ 0C0D: struct 4@ offset 2 size 1 = 1 0C0D: struct 4@ offset 3 size 4 = -1.0 0C0D: struct 4@ offset 7 size 4 = -0.01 0C0D: struct 4@ offset 11 size 4 = 0.05 0C0D: struct 4@ offset 15 size 4 = 0.09 0C0D: struct 4@ offset 19 size 4 = -1.0 0C0D: struct 4@ offset 23 size 4 = 0.02 0C0D: struct 4@ offset 27 size 4 = 1@ 0C0D: struct 4@ offset 31 size 4 = 2@ 0C0D: struct 4@ offset 35 size 4 =...
Originally posted\made by this sweetie -> @0x688 http://ugbase.eu/Thread-Perfect-crosshair-pos?pid=98743 Output parameters are float Usage : call @crosshair_coords 0 x_out 0@ y_out 1@ :crosshair_coords 0A8D: 23@ = read_memory 0xC9C040 size 4 virtual_protect 0 //x screen 0A8D: 24@ = read_memory 0xC9C044 size 4 virtual_protect 0 //y screen 0A8D: 25@ = read_memory 0xB6EC14 size 4 virtual_protect 0  0A8D: 26@ = read_memory 0xB6EC10 size 4 virtual_protect 0  0093: 22@ = integer 23@ to_float@ 006F: 22@ *= 25@ 0093: 29@ = integer 23@ to_float 29@ *= 0.0015625 29@ *= 64.0 29@ *= 0.2                             29@ *= 0.1 0063: 22@ -= 29@  // (float) /////// 0093: 10@ = integer 24@ to_float 006F: 10@ *= 26@ 0093: 11@ = integer 24@ to_float...
So you wanna edit a vehicle's handling value? Like make a car go faster? With these two snippets you can do it! 0AB1: @GET_HANDLING 3 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 _TO: 0@ //0AB1: @GET_HANDLING 3 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 _TO: 0@ :GET_HANDLING 0@ *= 4 0@ += 0xA9B0C8 0A8D: 0@ 0@ 4 0 0@ += 0x4A 0A8D: 0@ 0@ 2 0 0@ *= 0xE0 0@ += 0xC2B9DC 005A: 0@ 1@ 0A8D: 3@ 0@ 2@ 0 0AB2: 1 3@ 0AB1: @SET_HANDLING 4 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 INTO: -1.0 //0AB1: @SET_HANDLING 4 FROM_VEHICLE_MODEL #SULTAN OFFSET 0x1C SIZE 4 INTO: -1.0 :SET_HANDLING 0@ *= 4 0@ += 0xA9B0C8 0A8D: 0@ 0@ 4 0 0@ += 0x4A 0A8D: 0@ 0@ 2 0 0@ *= 0xE0 0@ += 0xC2B9DC 005A: 0@ 1@ 0A8C: 0@ 2@ 3@ 0 0AB2: 0 Here is a list of all the...
With this snippet you can read out the positions of bones in an actor! Here are the bone-ids: (picture not by me) and heres the function: { GET BONE POSITION: 0AB1: call_scm_func @GET_BONE_POS 2 FROM_ACTOR $PLAYER_ACTOR BONE 6 _STORE_TO 1@ 2@ 3@  // HEAD }    :GET_BONE_POS 0085: 10@ = 0@ // (int) 0085: 15@ = 1@ // (int) 1@ = 0.0 // X offset 2@ = 0.0 // Y offset {THX TO: WESSER} 3@ = 0.0 // Z offset 0A96: 0@ = actor 10@ struct 0AC7: 4@ = var 1@ offset 0AA6: call_method 0x5E01C0 struct 0@ num_params 3 pop 0 bIncludeAnim 1 iBoneID 15@ vOffset 4@ // CPed__getBonePositionWithOffset 0AB2: retn 3 1@ 2@ 3@ Its useful for lot of shits.. like making an Head Aimbot, Esp Hacks, and blabla.. Drawing a line from Head to foot: ok bye
Hey, just dumpin'. float fWindowW = 1024.0f; // input your window width here float fWindowH = 768.0f; // input your window height here float fX = ((fWindowW*(*(float*)0xB6EC14))) - ((fWindowW * 0.0015625f * 64.0f * 0.2f)) * 0.1f; float fY = ((fWindowH*(*(float*)0xB6EC10))) - ((fWindowH * 0.002232143f * 64.0f * 0.2f)) * 0.1f; Sniper is just w/2, h/2. @springfield @monday @€verycleoguy : Could convert this to CLEO and post in the respective section.
Simply, read your chatlog with google translator's voice, it was made by Opcode ! I just release it ! Snippet: :VOICE_SAY_TEXT IF 0AAB:  file_exists "CLEO\downloads\voice.mp3" THEN    0B00: delete_file "CLEO\downloads\voice.mp3" END     0AC8: 2@ = allocate_memory_size 260 0ad3: 2@ = "http:%c%ctranslate.google.com/translate_tts?tl=%s&q=%s" 47 47 1@ 0@ 0D92: 3@ = download_query url 2@ local_file "voice.mp3" REPEAT    WAIT 0        0D93: download_query 3@ get_state_to 4@ UNTIL 4@ == 0 0AAC: 4@ = load_audiostream "CLEO\downloads\voice.mp3" 0AAD: set_mp3 4@ perform_action 1 0AC0: audiostream 4@ loop 0 0ABC: set_audiostream 4@ volume 1.0 REPEAT WAIT 0    0AB9: get_audio_stream_state 4@ store_to 5@ UNTIL 5@ == -1 0AAE: release_mp3 4@...
Top