Snippets

// 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...
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...
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 =...
Top