Snippets

Like before on the 0.3x version, here you can share updated offset's (mainly for m0d-s0beit). You can find the "stSAMP / SA:MP Info" at the following Place: SAMP_INFO_OFFSET - Tested (0.3z-RC1) (0x688) "samp.dll"+0x211A58
You can hide the kills list completly with this: //0AB1: @HideSAMPChat 1 true :HideSAMPKillList 0AA2:2@ = load_library "samp.dll" // IF and SET 2@ += 0x212A74 0A8D: 1@ = read_memory 2@ size 4 virtual_protect 0 if 0@ == true then     0A8C: write_memory 1@ size 1 value 0 virtual_protect 0 else     0A8C: write_memory 1@ size 1 value 1 virtual_protect 0 end 0AB2: 0 bY M1ZG4RD (offsets & snippet) Opcud got trolled xD
0B82: dialog 1@ add_button id 3 text "Authenticate" pos_XY 115 50 size 110 25 So you created a dialog with sampfuncs opcode, but dont know howto check if button is pressed? //IF //0AB1: @BUTTON_CLICKED 1 ON_DIALOG 1@ control_id 3 //THEN //** :BUTTON_CLICKED 0B81: dialog 0@ pop_event_to 2@ control_id_to 3@ IF AND 2@ == 0x101 003B:  3@ == 1@ THEN     0485:  return_true ELSE     059A:  return_false END 0AB2: 0  NOTE: Only works for the first button in one dialog!
Well, I needed to convert the color from 0B37: samp 2@ = get_player_color 1@ to RGB...And even if I couldn't do it, I still made a progress, so here it is: :RGBfromHEX  //0AB1: call_scm_func @RGBfromHEX 1 0x00FF00 R 0@ G 1@ B 2@  0085: 1@ = 0@ 0085: 2@ = 0@ 0085: 3@ = 0@ 0016: 1@ /= 65536 0085: 4@ = 1@ //B 0012: 1@ *= 65536 0062: 2@ -= 1@ 0016: 2@ /= 256 0085: 5@ = 2@ //G 0012: 2@ *= 256 0062: 3@ -= 1@ 0062: 3@ -= 2@ 0085: 6@ = 3@ //R 0AB2: ret 3 6@ 5@ 4@ :HEXfromRGB  //0AB1: call_scm_func @HEXfromRGB 3 R 255 G 255 B 255 0@  0012: 0@ *= 65536 005A: 1@ += 0@ 0012: 2@ *= 256 005A: 1@ += 2@ 0AB2: ret 1 1@ 0B37 uses ARGB, so if anyone can make it, post it here please.
Well, whenever you want to make a HP bar or anything else, if you want to modify its position, size or even the thickness of that black line, you must rewrite the whole script...So I made this function...The only thing you must know is that the "value" must always be 100.0 when it's max. So if you have, for exemple, a car's HP that is 750.0 (at 250.0 it ignites), you must divide it by 7.5 to become 100.0. To call the function: 0AB1: call_scm_func @drawBar 6 coords_X 3@ coords_Y 4@ value 5@ size X 40.0 Y 4.0 thickness 2.0 // The value must be 100.0 (eg. max_HP = 750.0 ==> max_HP /= 7.5) The function: :drawBar 13@ = 100.0 0073: 13@ /= 3@ // (float) 0073: 2@ /= 13@ // (float) 0087: 11@ = 3@ // (float) 0087: 12@ = 4@ // (float) 005B...
Hi, because there is no opcodes to get interior by object handle, so I found interior address in object structure and made small snippet: //0AB1: @GetObjectInterior 1 OBJECT_HANDLE 0@ STORE_TO 1@ :GetObjectInterior 0A98: 1@ = object 0@ struct 1@ += 47 0A8D: 2@ = read_memory 1@ size 1 virtual_protect 1 0AB2: ret 1 2@
:cmpString1andString2 {     Example: 0AB1: call @cmpString1andString2 2 1@ 2@     In: 0@, 1@ - strings     Out: result 0/1 }     for 7@ = 0 to 1024     0A8D: 2@ = read_memory 0@ size 1 virtual_protect 0        0A8D: 3@ = read_memory 1@ size 1 virtual_protect 0     0@ += 1     1@ += 1     if 003B: 2@ == 3@     jf break     if and     2@ == 0     3@ == 0     then         0485: return_true   ret 0     end     end 059A: return_false ret 0
:get_serial //if //  0AB1: call @get_serial 0 store_to 0@ //then //  wait 0 //end */ if       0AA2: 1@ = load_library "kernel32.dll" then     0485:  return_true     if         0AA4: 2@ = get_proc_address "GetVolumeInformationA" library 1@     then         0AC7: 0@ = var 0@ offset         0AA5: call 2@ num_params 8 pop 0 0 0 0 0 0@ 0 0 0     end else     059A:  return_false    end 0AA3: free_library 1@ 0AB2: ret 0@
This is a old version. Use the new one which i will post later. This function has useless loops and lags ur game. This gets the first player, who is the closest to your crosshair. You can add your own filters to skip some players. //0AB1: @GET_AIM_TARGET_ACTOR 1 IN_RADIUS_FROM_CROSSHAIR 400.0 _STORE_TO 0@ :GET_AIM_TARGET_ACTOR FOR 28@ = 0.0 TO 0@ STEP 8.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@      ...
:dont_care: I dont know what the fuck this is.. i niggered it from gtag :OffsetDesdePuntoConAngulo {Params -OrigenX      0@ -OrigenY      1@ -OrigenZ      2@ -Distancia    3@ -AnguloZ      4@ -InclinacionY  5@ } 02F6: 33@ = sine 4@ // (float) 02F7: 32@ = cosine 4@ // (float) 02F6: 31@ = sine 5@ // (float) 006B: 33@ *= 3@ // (float) 006B: 32@ *= 3@ // (float) 006B: 31@ *= 3@ // (float) 005B: 0@ += 33@ // (float) 005B: 1@ += 32@ // (float) 005B: 2@ += 31@ // (float) 0AB2: ret 3 0@ 1@ 2@
//0AB1: @CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION 1 WITH_OFFSET 3.0 _STORE_TO 1@ 2@ 3@ //0AB1: @CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION 1 WITH_OFFSET 3.0 _STORE_TO 1@ 2@ 3@ :CREATE_CORDS_AROUND_PLAYER_IN_LOOKING_DIRECTION 0087: 13@ = 0@ // (float) Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@) 068D: get_camera_position_to 24@ 25@ 26@ 0063: 20@ -= 24@ // (float) 0063: 21@ -= 25@ // (float) 0063: 22@ -= 26@ // (float) Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@) 006B: 20@ *= 13@ // (float) 006B: 21@ *= 13@ // (float) 006B: 22@ *= 13@ // (float) 005B: 22@ += 13@ // (float) 005B: 0@ += 20@ // (float) 005B: 1@ += 21@ // (float) 005B: 2@ += 22@ // (float) 0AB2: RET 3 0@ 1@ 2@ Example: {$CLEO .cs} 0000: WHILE TRUE    ...
//0AB1: @CREATE_VELOCITY_PUSH 4 FROM ACTOR $PLAYER_ACTOR _TO_OFFSET 0.0 0.0 0.0 STORE_TO 4@ 5@ 6@ :CREATE_VELOCITY_PUSH 04C4: store_coords_to 4@ 5@ 6@ from_actor 0@ with_offset 1@ 2@ 3@ Actor.StorePos(0@, 7@, 8@, 9@) 0063: 4@ -= 7@ // (float) 0063: 5@ -= 8@ // (float) 0063: 6@ -= 9@ // (float) 0AB2: RET 3 4@ 5@ 6@
//0AB1: @DISABLE_VELOCITY_Z_LIMIT 1 FALSE //0AB1: @DISABLE_VELOCITY_Z_LIMIT 1 TRUE :DISABLE_VELOCITY_Z_LIMIT if 0@ == 1 then     0A8C: write_memory 0x5E91CE size 1 value 0x90 virtual_protect 1     0A8C: write_memory 0x5E91CF size 1 value 0x90 virtual_protect 1     0A8C: write_memory 0x5E91D0 size 1 value 0x90 virtual_protect 1     0A8C: write_memory 0x5E91D1 size 1 value 0x90 virtual_protect 1     0A8C: write_memory 0x5E91D2 size 1 value 0x90 virtual_protect 1     0A8C: write_memory 0x5E91D3 size 1 value 0x90 virtual_protect 1     0A8C: write_memory 0x5E91D4 size 1 value 0x90 virtual_protect 1 else     if     0@ == 0     then         0A8C: write_memory 0x5E91CE size 1 value 0xC7 virtual_protect 1         0A8C: write_memory...
With this you can teleport a player without resetting his velocity .etc. 0AB1: teleport 4 ACTOR $PLAYER_ACTOR TO 0.0 0.0 0.0 WITHOUT RESET :TELEPORT 0A96: 4@ = actor 0@ struct 4@ += 20 0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0 4@ += 48 // X 0A8C: write_memory 4@ size 4 value 1@ virtual_protect 0 // X 4@ += 4 // Y 0A8C: write_memory 4@ size 4 value 2@ virtual_protect 0 // Y 4@ += 4 // Z 0A8C: write_memory 4@ size 4 value 3@ virtual_protect 0 // Z ret 0
Always wanted to play SOUNDS.. but never wanted to use .mp3 files? You may know 03CF but cant find the perfect sound? Find it out now: http://ocain.kilu.de/gtasa_sasp/ :WAV_LOAD 03CF: load_wav 18407 as 1 // 18407 = Sound-ID :WAV_PRELOAD 0001: wait 0 ms 00D6: if 03D0:  wav 1 loaded 004D: jump_if_false @WAV_PRELOAD 03D1: play_wav 1 :WAV_CHECK 0001: wait 0 ms 00D6: if 03D2:  wav 1 ended 004D: jump_if_false @WAV_CHECK 040D: unload_wav 1
If you make a CLEO that uses SAMPFUNCS you should paste this sampfuncsloader into the header: if   8AF7: get_samp_base_to 0@ then     0A93: end_custom_thread end repeat     wait 400 until 0AFA: is_samp_structures_available That will LOAD sampfuncs.
So you dont want to rewrite a thread all time? {$CLEO .cs} THREAD "THREAD_BY_OPCODEXE"          // HERE PUT THREAD NAME 0662: NOP "www.youtube.com/OpcodeXe"  // HERE PUT CREDITS. LIKE ME MY CHANNEL. 0662: NOP ""                      :LOAD wait 0 if Player.Defined(0) jf @LOAD // HERE PASTE THE STUFF YOU WANT TO LOAD. EXAMPLE AN AK47: //Model.Load(#AK47) //if //Model.Available(#AK47) //jf @LOAD :START wait 0 if  0ADC:  test_cheat "on" // What to write to enable it? jf @MAIN if 31@ == 0 // ITS OFF then 31@ = 1 // ENABLE IT 018C: play_sound 1083 at 0.0 0.0 0.0 0ACD: show_text_highpriority "ON" time 1337 // ON MESSAGE else 31@ = 0 // TURN IT OFF 018C: play_sound 1084 at 0.0 0.0 0.0      0ACD: show_text_highpriority "OFF" time 1337...
Top