├── scm ├── trains │ ├── mpack.dat │ ├── scr.scm │ ├── scrot.png │ ├── text.gxt │ └── README.md ├── garages │ ├── mpack.dat │ ├── scr.scm │ ├── scrot.png │ └── README.md └── cameraexport │ ├── mpack.dat │ ├── README.md │ ├── scr.SCM │ ├── Stdafx.h │ ├── bin │ └── cameraexport.cleo │ ├── Dllmain.cpp │ ├── scr.txt │ └── cameraexport.vcxproj ├── cleo ├── helirotor │ ├── README.md │ ├── helirotor.cs │ └── helirotor.txt ├── plhud │ ├── new │ │ ├── asmcompile.bat │ │ ├── pic.png │ │ ├── plhud.cs │ │ ├── README.md │ │ └── plhud.txt │ ├── pic.png │ ├── pic2.png │ ├── plhud.cs │ ├── PLAHelper.exe │ ├── README.md │ └── PLAHelper.cs ├── plroads │ ├── asmcompile.bat │ ├── README.md │ └── plroads.asm ├── esp │ ├── esp.cs │ ├── scrot.png │ └── README.md ├── gps │ ├── gps.cs │ ├── gps250nodes.txt │ ├── README.md │ └── gps50nodes.txt ├── gamespeed │ ├── README.md │ ├── gs.cs │ └── gs.txt ├── nofallofbike │ ├── README.md │ ├── bikefall.cs │ └── bikefall.txt ├── plradar │ ├── pic.png │ ├── plradar.cs │ ├── README.md │ └── plradar.txt ├── seaways │ ├── pic.png │ ├── _pic.png │ ├── pic2.png │ ├── pic3.png │ ├── pic4.png │ ├── pic5.png │ ├── seaways.cs │ ├── README.md │ └── seaways.txt ├── elm │ ├── own elm2b.cs │ ├── readme.txt │ └── own elm2b.fxt ├── airbreak │ ├── airbreak.cs │ ├── readme.txt │ └── airbreak.txt ├── payandspray │ ├── res1.jpg │ ├── res1.png │ ├── res2.jpg │ ├── res2.png │ ├── rhino.jpg │ ├── Untitled.jpg │ └── CGarages__isVehicleAcceptedByPnS.asm ├── autopilot │ ├── autopilot.cs │ ├── autopilot-adv.cs │ ├── README.md │ ├── autopilot.txt │ └── autopilot-adv.txt ├── customcolor │ ├── scrot.png │ ├── cust color.cs │ ├── README.md │ └── cust color.txt ├── snapshots │ ├── snapshots.cs │ ├── snapshots-withplugin.cs │ ├── investig.txt │ ├── README.md │ └── weathertables.CT ├── els_simple │ ├── simple_els.cs │ ├── README.md │ └── simple_els.txt ├── objsniffer │ ├── objsniffer.cs │ ├── README.md │ ├── objs200.txt │ └── objs20.txt ├── framelimiter │ ├── framelimiter.cs │ ├── README.md │ └── framelimiter.txt ├── vcweaponpicks │ ├── vcweaponpicks.cs │ ├── vcweaponpicks-condensed.cs │ ├── vcweaponpicks-ultracondensed.cs │ └── README.md ├── objsniffer-plugin │ ├── Stdafx.h │ ├── objsniffer.cs │ ├── bin │ │ └── objsniffer.cleo │ ├── opcodes.h │ ├── README.md │ ├── Dllmain.cpp │ ├── objs200.txt │ ├── opcodes.cpp │ ├── objs20.txt │ └── objsniffer.vcxproj ├── pickuprevealer │ ├── pickuprevealer.cs │ ├── README.md │ ├── pickuprevealermoneybag.cs │ ├── pickuprevealer.txt │ └── pickuprevealermoneybag.txt ├── allcopcarsonetown │ ├── ghostcopcars.cs │ ├── allcopcarsonetown.cs │ ├── README.md │ ├── allcopcarsonetown.txt │ └── ghostcopcars.txt ├── plane-speed-limit │ ├── plane-speed-limit.cs │ ├── plane-speed-limit.txt │ └── readme.txt ├── entry-info-node-pool-stat-display │ ├── entry-info-node-pool-stat-display.cs │ ├── readme.txt │ └── entry-info-node-pool-stat-display.txt └── els_pattern_test.php ├── cleoplugins ├── plpanel │ ├── util.h │ ├── plpanel.cs │ ├── Release │ │ ├── plpanel-robin.cleo │ │ ├── plpanel-classic.cleo │ │ └── plpanel-standard.cleo │ ├── Stdafx.h │ ├── Dllmain.cpp │ ├── theme_robin.h │ ├── util.cpp │ ├── samp.cpp │ ├── build.bat │ ├── stuff.h │ ├── commonhandlers.h │ ├── SRaceCheckpoint.h │ ├── plpanel.txt │ ├── README.md │ ├── snoop.cpp │ ├── opcodes.h │ ├── commonhandlers.cpp │ ├── samp.h │ ├── theme_standard.cpp │ ├── plpanel.vcproj │ ├── forumpost.txt │ └── plpanel.vcxproj ├── signext │ ├── Stdafx.h │ ├── bin │ │ └── signext.cleo │ ├── opcodes.h │ ├── Dllmain.cpp │ ├── opcodes.cpp │ ├── signext.vcxproj.filters │ ├── README.md │ └── signext.vcxproj ├── world2hud │ ├── Stdafx.h │ ├── bin │ │ └── world2hud.cleo │ ├── opcodes.h │ ├── Dllmain.cpp │ ├── rw.h │ ├── README.md │ ├── opcodes.cpp │ └── world2hud.vcxproj └── yugecodes │ ├── Stdafx.h │ ├── bin │ └── yugecodes.cleo │ ├── text.h │ ├── transform.h │ ├── Dllmain.cpp │ ├── rw.h │ ├── opcodes.h │ ├── transform.cpp │ ├── text.cpp │ ├── README.md │ ├── opcodes.cpp │ └── yugecodes.vcxproj ├── .gitattributes ├── other └── 3DBlipsSaExclusion │ ├── 3DBlipsSA.asi │ ├── ZZ3DBlipsSARemoveHouseIcons.asi │ ├── build.bat │ ├── readme.txt │ └── ZZ3DBlipsSARemoveHouseIcons.asm ├── .gitignore ├── snippets ├── memorywithoutcleo.txt ├── textureloading.txt ├── hook.txt ├── hookdrawpoly.txt └── coronas.txt ├── README.md └── tools └── asm └── README.md /scm/trains/mpack.dat: -------------------------------------------------------------------------------- 1 | 4#TRAINTEST# -------------------------------------------------------------------------------- /scm/garages/mpack.dat: -------------------------------------------------------------------------------- 1 | 1#GARAGES# 2 | -------------------------------------------------------------------------------- /scm/cameraexport/mpack.dat: -------------------------------------------------------------------------------- 1 | 9#OSB~r~CAM# 2 | -------------------------------------------------------------------------------- /cleo/helirotor/README.md: -------------------------------------------------------------------------------- 1 | 2 | instant start heli rotors 3 | -------------------------------------------------------------------------------- /cleo/plhud/new/asmcompile.bat: -------------------------------------------------------------------------------- 1 | "..\..\..\tools\asm\bin\Debug\asm.exe" plhud.asm -------------------------------------------------------------------------------- /cleo/plroads/asmcompile.bat: -------------------------------------------------------------------------------- 1 | "..\..\tools\asm\bin\Debug\asm.exe" plroads.asm -------------------------------------------------------------------------------- /cleoplugins/plpanel/util.h: -------------------------------------------------------------------------------- 1 | 2 | int simplestrval(const char *str, int startidx); -------------------------------------------------------------------------------- /cleo/esp/esp.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/esp/esp.cs -------------------------------------------------------------------------------- /cleo/gps/gps.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/gps/gps.cs -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * -lf 2 | *.cs binary 3 | *.md eol=lf 4 | .git* eol=lf 5 | /tools/**.cs text 6 | -------------------------------------------------------------------------------- /cleo/esp/scrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/esp/scrot.png -------------------------------------------------------------------------------- /cleo/gamespeed/README.md: -------------------------------------------------------------------------------- 1 | Alters gamespeed 2 | F5: set to 0.1 3 | F6: set to 1.0 4 | 5 | -------------------------------------------------------------------------------- /cleo/gamespeed/gs.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/gamespeed/gs.cs -------------------------------------------------------------------------------- /cleo/nofallofbike/README.md: -------------------------------------------------------------------------------- 1 | Don't fall of bike when hitting walls or driving backwards 2 | 3 | -------------------------------------------------------------------------------- /cleo/plhud/pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plhud/pic.png -------------------------------------------------------------------------------- /cleo/plhud/pic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plhud/pic2.png -------------------------------------------------------------------------------- /cleo/plhud/plhud.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plhud/plhud.cs -------------------------------------------------------------------------------- /cleo/plradar/pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plradar/pic.png -------------------------------------------------------------------------------- /cleo/seaways/pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/seaways/pic.png -------------------------------------------------------------------------------- /scm/cameraexport/README.md: -------------------------------------------------------------------------------- 1 | move camera and export cameraviewmatrix to camera.txt file 2 | 3 | -------------------------------------------------------------------------------- /scm/garages/scr.scm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/scm/garages/scr.scm -------------------------------------------------------------------------------- /scm/trains/scr.scm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/scm/trains/scr.scm -------------------------------------------------------------------------------- /scm/trains/scrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/scm/trains/scrot.png -------------------------------------------------------------------------------- /scm/trains/text.gxt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/scm/trains/text.gxt -------------------------------------------------------------------------------- /cleo/elm/own elm2b.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/elm/own elm2b.cs -------------------------------------------------------------------------------- /cleo/plhud/new/pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plhud/new/pic.png -------------------------------------------------------------------------------- /cleo/seaways/_pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/seaways/_pic.png -------------------------------------------------------------------------------- /cleo/seaways/pic2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/seaways/pic2.png -------------------------------------------------------------------------------- /cleo/seaways/pic3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/seaways/pic3.png -------------------------------------------------------------------------------- /cleo/seaways/pic4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/seaways/pic4.png -------------------------------------------------------------------------------- /cleo/seaways/pic5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/seaways/pic5.png -------------------------------------------------------------------------------- /scm/garages/scrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/scm/garages/scrot.png -------------------------------------------------------------------------------- /cleo/airbreak/airbreak.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/airbreak/airbreak.cs -------------------------------------------------------------------------------- /cleo/payandspray/res1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/payandspray/res1.jpg -------------------------------------------------------------------------------- /cleo/payandspray/res1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/payandspray/res1.png -------------------------------------------------------------------------------- /cleo/payandspray/res2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/payandspray/res2.jpg -------------------------------------------------------------------------------- /cleo/payandspray/res2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/payandspray/res2.png -------------------------------------------------------------------------------- /cleo/plhud/PLAHelper.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plhud/PLAHelper.exe -------------------------------------------------------------------------------- /cleo/plhud/new/plhud.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plhud/new/plhud.cs -------------------------------------------------------------------------------- /cleo/plradar/plradar.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plradar/plradar.cs -------------------------------------------------------------------------------- /cleo/seaways/seaways.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/seaways/seaways.cs -------------------------------------------------------------------------------- /scm/cameraexport/scr.SCM: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/scm/cameraexport/scr.SCM -------------------------------------------------------------------------------- /cleo/autopilot/autopilot.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/autopilot/autopilot.cs -------------------------------------------------------------------------------- /cleo/customcolor/scrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/customcolor/scrot.png -------------------------------------------------------------------------------- /cleo/helirotor/helirotor.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/helirotor/helirotor.cs -------------------------------------------------------------------------------- /cleo/payandspray/rhino.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/payandspray/rhino.jpg -------------------------------------------------------------------------------- /cleo/snapshots/snapshots.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/snapshots/snapshots.cs -------------------------------------------------------------------------------- /cleo/customcolor/cust color.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/customcolor/cust color.cs -------------------------------------------------------------------------------- /cleo/els_simple/simple_els.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/els_simple/simple_els.cs -------------------------------------------------------------------------------- /cleo/nofallofbike/bikefall.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/nofallofbike/bikefall.cs -------------------------------------------------------------------------------- /cleo/objsniffer/objsniffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/objsniffer/objsniffer.cs -------------------------------------------------------------------------------- /cleo/payandspray/Untitled.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/payandspray/Untitled.jpg -------------------------------------------------------------------------------- /cleoplugins/plpanel/plpanel.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleoplugins/plpanel/plpanel.cs -------------------------------------------------------------------------------- /cleo/autopilot/autopilot-adv.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/autopilot/autopilot-adv.cs -------------------------------------------------------------------------------- /cleo/framelimiter/framelimiter.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/framelimiter/framelimiter.cs -------------------------------------------------------------------------------- /cleo/vcweaponpicks/vcweaponpicks.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/vcweaponpicks/vcweaponpicks.cs -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/Stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #include 5 | #include -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/objsniffer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/objsniffer-plugin/objsniffer.cs -------------------------------------------------------------------------------- /cleo/pickuprevealer/pickuprevealer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/pickuprevealer/pickuprevealer.cs -------------------------------------------------------------------------------- /cleoplugins/signext/Stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #include 5 | #include -------------------------------------------------------------------------------- /cleoplugins/signext/bin/signext.cleo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleoplugins/signext/bin/signext.cleo -------------------------------------------------------------------------------- /cleoplugins/world2hud/Stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #include 5 | #include -------------------------------------------------------------------------------- /cleoplugins/yugecodes/Stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #include 5 | #include -------------------------------------------------------------------------------- /scm/cameraexport/Stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #include 5 | #include -------------------------------------------------------------------------------- /cleo/allcopcarsonetown/ghostcopcars.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/allcopcarsonetown/ghostcopcars.cs -------------------------------------------------------------------------------- /cleo/snapshots/snapshots-withplugin.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/snapshots/snapshots-withplugin.cs -------------------------------------------------------------------------------- /cleoplugins/world2hud/bin/world2hud.cleo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleoplugins/world2hud/bin/world2hud.cleo -------------------------------------------------------------------------------- /cleoplugins/yugecodes/bin/yugecodes.cleo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleoplugins/yugecodes/bin/yugecodes.cleo -------------------------------------------------------------------------------- /other/3DBlipsSaExclusion/3DBlipsSA.asi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/other/3DBlipsSaExclusion/3DBlipsSA.asi -------------------------------------------------------------------------------- /scm/cameraexport/bin/cameraexport.cleo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/scm/cameraexport/bin/cameraexport.cleo -------------------------------------------------------------------------------- /cleo/els_simple/README.md: -------------------------------------------------------------------------------- 1 | 2 | [Demo video](https://www.youtube.com/watch?v=86nqNB_VZsg) 3 | 4 | simple ELS script 5 | F12: toggle 6 | -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/bin/objsniffer.cleo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/objsniffer-plugin/bin/objsniffer.cleo -------------------------------------------------------------------------------- /cleo/pickuprevealer/README.md: -------------------------------------------------------------------------------- 1 | 2 | shows all pickups on screen (distance) 3 | 4 | moneybag ver only shows for the moneybag model (id 1550) 5 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/text.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "CLEO.h" 3 | 4 | OpcodeResult DrawText(CScriptThread *thread, bool hudcoordinates); 5 | -------------------------------------------------------------------------------- /cleo/allcopcarsonetown/allcopcarsonetown.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/allcopcarsonetown/allcopcarsonetown.cs -------------------------------------------------------------------------------- /cleo/pickuprevealer/pickuprevealermoneybag.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/pickuprevealer/pickuprevealermoneybag.cs -------------------------------------------------------------------------------- /cleo/plane-speed-limit/plane-speed-limit.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/plane-speed-limit/plane-speed-limit.cs -------------------------------------------------------------------------------- /cleo/vcweaponpicks/vcweaponpicks-condensed.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/vcweaponpicks/vcweaponpicks-condensed.cs -------------------------------------------------------------------------------- /scm/trains/README.md: -------------------------------------------------------------------------------- 1 | ![preview](/scm/trains/scrot.png?raw=true) 2 | 3 | Testing with changing train carraiges and attaching trains together 4 | -------------------------------------------------------------------------------- /cleo/airbreak/readme.txt: -------------------------------------------------------------------------------- 1 | alt+x to activate, x to deactivate 2 | 3 | zqsd and mouse to move, space/shift for up/down 4 | hold ctrl to speed up 5 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/Release/plpanel-robin.cleo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleoplugins/plpanel/Release/plpanel-robin.cleo -------------------------------------------------------------------------------- /cleo/vcweaponpicks/vcweaponpicks-ultracondensed.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/vcweaponpicks/vcweaponpicks-ultracondensed.cs -------------------------------------------------------------------------------- /cleoplugins/plpanel/Release/plpanel-classic.cleo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleoplugins/plpanel/Release/plpanel-classic.cleo -------------------------------------------------------------------------------- /cleoplugins/plpanel/Release/plpanel-standard.cleo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleoplugins/plpanel/Release/plpanel-standard.cleo -------------------------------------------------------------------------------- /cleo/plroads/README.md: -------------------------------------------------------------------------------- 1 | ## plroads 2 | 3 | shows roads of [the pilot's life SA:MP server](http://thepilotslife.com) on the radar, similar to [../gps](gps) 4 | 5 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/Stdafx.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define _CRT_SECURE_NO_WARNINGS 4 | #define _CRT_SECURE_NO_DEPRECATE 5 | #include 6 | #include -------------------------------------------------------------------------------- /cleo/gps/gps250nodes.txt: -------------------------------------------------------------------------------- 1 | {$INCLUDE gps50nodes.txt} 2 | {$INCLUDE gps50nodes.txt} 3 | {$INCLUDE gps50nodes.txt} 4 | {$INCLUDE gps50nodes.txt} 5 | {$INCLUDE gps50nodes.txt} -------------------------------------------------------------------------------- /cleoplugins/signext/opcodes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Stdafx.h" 3 | #include "CLEO.h" 4 | 5 | BOOL InitOpcodes(); 6 | OpcodeResult WINAPI ext(CScriptThread *thread); 7 | -------------------------------------------------------------------------------- /other/3DBlipsSaExclusion/ZZ3DBlipsSARemoveHouseIcons.asi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/other/3DBlipsSaExclusion/ZZ3DBlipsSARemoveHouseIcons.asi -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/opcodes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Stdafx.h" 3 | #include "CLEO.h" 4 | 5 | BOOL InitOpcodes(); 6 | OpcodeResult WINAPI ext(CScriptThread *thread); 7 | -------------------------------------------------------------------------------- /scm/garages/README.md: -------------------------------------------------------------------------------- 1 | 2 | [Demo video](https://youtu.be/JvAY_SBS7gE) 3 | 4 | ![preview](/scm/garages/scrot.png?raw=true) 5 | 6 | Lines around garages to show the boundaries. 7 | -------------------------------------------------------------------------------- /cleo/nofallofbike/bikefall.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | 3 | 03A4: name_thread 'BIKEFALL' 4 | 5 | 0A8C: write_memory 0x5df510 size 1 value 0xC3 virtual_protect 0 // retn 6 | 7 | 0A93: end_custom_thread 8 | -------------------------------------------------------------------------------- /cleo/entry-info-node-pool-stat-display/entry-info-node-pool-stat-display.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yugecin/scmcleoscripts/HEAD/cleo/entry-info-node-pool-stat-display/entry-info-node-pool-stat-display.cs -------------------------------------------------------------------------------- /cleo/seaways/README.md: -------------------------------------------------------------------------------- 1 | Enables the 'cars drive on water' cheat, type SEAWAYS to (de)activate. 2 | Requires IntOperations.cleo (included with CLEO 4) 3 | 4 | ![preview](/cleo/seaways/_pic.png) 5 | 6 | -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/README.md: -------------------------------------------------------------------------------- 1 | Save all objects created by opcode `0107` and rotated by opcode `0453` in a file called `objz.txt` in your gtasa folder. 2 | 3 | You need both the .cs file and the .cleo plugin file. 4 | 5 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/transform.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "CLEO.h" 3 | #include "rw.h" 4 | 5 | RwV3D TransformWorldXYZ(RwV3D world); 6 | OpcodeResult TransformPointFor0C270C28(CScriptThread *thread, int width, int height); 7 | -------------------------------------------------------------------------------- /cleoplugins/world2hud/opcodes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Stdafx.h" 3 | #include "CLEO.h" 4 | 5 | BOOL InitOpcodes(); 6 | OpcodeResult WINAPI Op_0C27(CScriptThread *thread); 7 | OpcodeResult WINAPI Op_0C28(CScriptThread *thread); 8 | -------------------------------------------------------------------------------- /cleo/entry-info-node-pool-stat-display/readme.txt: -------------------------------------------------------------------------------- 1 | Displays a textdraw that shows stats about the entry info node pool. 2 | 3 | This is the pool that likes to be depleted and crash the game when 4 | spawning too many objects (in SA:MP). 5 | -------------------------------------------------------------------------------- /cleo/customcolor/README.md: -------------------------------------------------------------------------------- 1 | ![preview](/cleo/customcolor/scrot.png?raw=true) 2 | 3 | Changes money color to blue 4 | Changes sphere color to aqua 5 | Sets infinite run 6 | Enables code to draw a line at the end of the armor bar 7 | 8 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/Dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | 3 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 4 | { 5 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 6 | return InitOpcodes(); 7 | } 8 | return TRUE; 9 | } -------------------------------------------------------------------------------- /cleoplugins/signext/Dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | 3 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 4 | { 5 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 6 | return InitOpcodes(); 7 | } 8 | return TRUE; 9 | } -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/Dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | 3 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 4 | { 5 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 6 | return InitOpcodes(); 7 | } 8 | return TRUE; 9 | } -------------------------------------------------------------------------------- /cleo/objsniffer/README.md: -------------------------------------------------------------------------------- 1 | Save all objects created by opcode `0107` and rotated by `0453` in a file called `OBJSS.INI` in your gtasa folder. 2 | 3 | This method is very slow and is very noticable. Use [the plugin version](../objsniffer-plugin) for speedy stuff. 4 | -------------------------------------------------------------------------------- /cleoplugins/world2hud/Dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | 3 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 4 | { 5 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 6 | return InitOpcodes(); 7 | } 8 | return TRUE; 9 | } -------------------------------------------------------------------------------- /cleoplugins/yugecodes/Dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | 3 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 4 | { 5 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 6 | return InitOpcodes(); 7 | } 8 | return TRUE; 9 | } -------------------------------------------------------------------------------- /cleo/objsniffer/objs200.txt: -------------------------------------------------------------------------------- 1 | {$INCLUDE objs20.txt} 2 | {$INCLUDE objs20.txt} 3 | {$INCLUDE objs20.txt} 4 | {$INCLUDE objs20.txt} 5 | {$INCLUDE objs20.txt} 6 | {$INCLUDE objs20.txt} 7 | {$INCLUDE objs20.txt} 8 | {$INCLUDE objs20.txt} 9 | {$INCLUDE objs20.txt} 10 | {$INCLUDE objs20.txt} -------------------------------------------------------------------------------- /cleo/elm/readme.txt: -------------------------------------------------------------------------------- 1 | own elm 2 | ------- 3 | F12 enable/disable 4 | F11 menu 5 | F10 turn off 6 | 7 | navigating the menu happens with forward/backward key and left/right arrow keys 8 | 9 | remember to put the ftx in CLEO/CLEO_TEXT 10 | 11 | this is 2014 code, don't judge lol 12 | 13 | -------------------------------------------------------------------------------- /cleo/gamespeed/gs.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | {$NOSOURCE} 3 | 4 | 0000: 5 | :zero 6 | wait 250 7 | if 8 | 0AB0: key_pressed 116 // f5 9 | then 10 | 015D: set_gamespeed 0.1 11 | end 12 | if 13 | 0AB0: key_pressed 117 // f6 14 | then 15 | 015D: set_gamespeed 1.0 16 | end 17 | jump @zero -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/objs200.txt: -------------------------------------------------------------------------------- 1 | {$INCLUDE objs20.txt} 2 | {$INCLUDE objs20.txt} 3 | {$INCLUDE objs20.txt} 4 | {$INCLUDE objs20.txt} 5 | {$INCLUDE objs20.txt} 6 | {$INCLUDE objs20.txt} 7 | {$INCLUDE objs20.txt} 8 | {$INCLUDE objs20.txt} 9 | {$INCLUDE objs20.txt} 10 | {$INCLUDE objs20.txt} -------------------------------------------------------------------------------- /cleoplugins/world2hud/rw.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct RwV3D { 4 | float x; 5 | float y; 6 | float z; 7 | }; 8 | 9 | struct CMATRIX { 10 | RwV3D one; 11 | float pad0; 12 | RwV3D two; 13 | float pad1; 14 | RwV3D three; 15 | float pad2; 16 | RwV3D four; 17 | float pad3; 18 | }; 19 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/rw.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | struct RwV3D { 4 | float x; 5 | float y; 6 | float z; 7 | }; 8 | 9 | struct CMATRIX { 10 | RwV3D one; 11 | float pad0; 12 | RwV3D two; 13 | float pad1; 14 | RwV3D three; 15 | float pad2; 16 | RwV3D four; 17 | float pad3; 18 | }; 19 | -------------------------------------------------------------------------------- /cleo/framelimiter/README.md: -------------------------------------------------------------------------------- 1 | Removes the hardcoded 14ms wait in the framelimiter code 2 | Makes it possible to change the builtin framelimiter to change the framerate 3 | ``` 4 | numpad *: show fps & limit 5 | numpad * + numpad +: increate limit 6 | numpad * + numbad -: decrease limit 7 | ``` 8 | 9 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/theme_robin.h: -------------------------------------------------------------------------------- 1 | 2 | #include "opcodes.h" 3 | 4 | #define ISTHEMEROBIN THEME == THEME_ROBIN 5 | 6 | #if ISTHEMEROBIN 7 | void robindrawhookstuff(); 8 | #define ROBINHOOKADDR (((DWORD) &robindrawhookstuff) - 0x58EE9F + 1 - 4 - 2) 9 | #else 10 | #define ROBINHOOKADDR (0) 11 | #endif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | cleo/\!notmine 2 | cleo/esp/mod_hud.txd 3 | cleo/snapshots/old 4 | 5 | tools/**/*.resx 6 | tools/**/bin 7 | tools/**/obj 8 | tools/asm/Properties 9 | tools/asm/*.csproj 10 | 11 | # vs shenanigans 12 | *.ilk 13 | *.suo 14 | *.sln 15 | *.opensdf 16 | *.sdf 17 | *.user 18 | *.pdb 19 | [Dd]ebug 20 | [Rr]elease 21 | -------------------------------------------------------------------------------- /cleo/gps/README.md: -------------------------------------------------------------------------------- 1 | # GPS 2 | 3 | This is basically the [example GPS plugin from plugin-sdk](https://github.com/DK22Pac/plugin-sdk/tree/master/examples/GPS) ported to asm/cleo. 4 | 5 | This version: 6 | * doesn't show on the map 7 | * routes to an active checkpoint or the target blip (blip takes precedence) 8 | * shows the line even outside the radar circle 9 | -------------------------------------------------------------------------------- /cleo/autopilot/README.md: -------------------------------------------------------------------------------- 1 | ## Simple autopilot 2 | 3 | Accelerates automatically, holds altitude and heading by simulating keypresses like a player would be in control. 4 | 5 | autopilot-adv also holds a min altitude of 200 and flies towards the race checkpoint, if any. If the distance to the checkpoint is less than 1250m, autopilot-adv will hold an altitude of 100. 6 | 7 | F12 toggle 8 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/util.cpp: -------------------------------------------------------------------------------- 1 | 2 | int simplestrval(const char *str, int startidx) 3 | { 4 | int val = 0; 5 | char c; 6 | int iters = 0; 7 | while (true) { 8 | c = str[startidx]; 9 | if (c < '0' || '9' < c) { 10 | break; 11 | } 12 | val *= 10; 13 | val += c - '0'; 14 | startidx++; 15 | if (++iters > 10) { 16 | return 0; 17 | } 18 | } 19 | return val; 20 | } 21 | -------------------------------------------------------------------------------- /cleo/allcopcarsonetown/README.md: -------------------------------------------------------------------------------- 1 | Some messing with cop car models 2 | allcopcarsonetown: changes model every 250ms so all models (copcarla, copcarvg, copcarsf, copcarru) will show at the same place 3 | ghostcopcars: replace model by broken sadler & glendale to make 'real' ghost cars when you have wanted lvl 4 | 5 | [Demo video of the ghostcopcars](https://www.youtube.com/watch?v=n-2h9AL8Lpo) 6 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/samp.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "samp.h" 3 | 4 | //#define SAMP_INFO_OFFSET 0x21A0F8 /*R1*/ 5 | #define SAMP_INFO_OFFSET 0x26EA0C /*R4*/ 6 | 7 | struct stSAMP *getSamp(void) 8 | { 9 | static HMODULE samp_dll = GetModuleHandle("samp.dll"); 10 | 11 | if (samp_dll == NULL) { 12 | return NULL; 13 | } 14 | 15 | DWORD& adr = *(DWORD*)(((DWORD)samp_dll + SAMP_INFO_OFFSET)); 16 | 17 | return (stSAMP*)(adr); 18 | } 19 | -------------------------------------------------------------------------------- /cleo/plroads/plroads.asm: -------------------------------------------------------------------------------- 1 | ;; _ASM_HOOKADDR: 0058EAF1 2 | ; _ASM_HOOKADDR: 0058FBC5 3 | ; _ASM_JUMP: true 4 | ; _ASM_CORRECT_OFFSETS: true 5 | ; _ASM_COMMENTS: false 6 | ; _ASM_GCC: S:\broftware\perl\c\bin\gcc.exe 7 | ; _ASM_OBJDUMP: S:\broftware\perl\c\bin\objdump.exe 8 | ; _ASM_TARGETFILE: plroads-asm.txt 9 | ; _ASM_PREPROCONLY: false 10 | ; _ASM_LF: true 11 | 12 | ; _ASM_INCLUDE: plroads-data.asm 13 | 14 | exit: 15 | jmp 0x58FBC9 -------------------------------------------------------------------------------- /cleo/helirotor/helirotor.txt: -------------------------------------------------------------------------------- 1 | {$CLEO} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'HELIROT' 5 | 6 | :0 7 | 0001: wait $DEFAULT_WAIT_TIME ms 8 | 04A9: actor $PLAYER_ACTOR driving_heli 9 | 004D: jump_if_false @0 10 | 03C0: 1@ = actor $PLAYER_ACTOR car 11 | 0825: set_helicopter 1@ instant_rotor_start 12 | :1 13 | 0001: wait $DEFAULT_WAIT_TIME ms 14 | 84A9: not actor $PLAYER_ACTOR driving_heli 15 | 004D: jump_if_false @1 16 | 0002: jump @0 -------------------------------------------------------------------------------- /cleo/plradar/README.md: -------------------------------------------------------------------------------- 1 | ## What 2 | CLEO script that show runways from [the pilot's life SA:MP server](http://thepilotslife.com) in the minimap radar. 3 | 4 | ![preview](pic.png) 5 | 6 | [short demo video](https://youtu.be/_pCwW5apmGc) 7 | 8 | ## Requirements 9 | [CLEO4](http://cleo.li) 10 | 11 | ## Controls 12 | * F11 enable/disable 13 | * G+F11 enable/disable smart mode 14 | 15 | Smart mode = only show runways in range of the (un)loading point (enabled by default). 16 | -------------------------------------------------------------------------------- /cleo/plane-speed-limit/plane-speed-limit.txt: -------------------------------------------------------------------------------- 1 | {$CLEO} 2 | {$NOSOURCE} 3 | {$USE bitwise} 4 | 03A4: name_thread 'HYDRASP' 5 | :MAIN_LOOP 6 | 0001: wait 0 7 | 00D6: if and 8 | 0AB0: is_key_pressed 0x78 // F9 9 | 0AB0: is_key_pressed 0x79 // F10 10 | 004D: jump_if_false @MAIN_LOOP 11 | 0A8D: 0@ = read_memory 0x6DADE8 size 1 vp 0 12 | 0B12: 0@ = 0@ XOR 0x9E 13 | 0A8C: write_memory 0x6DADE8 size 1 value 0@ vp 0 14 | 0001: wait 1000 15 | 0002: jump @MAIN_LOOP 16 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /snippets/memorywithoutcleo.txt: -------------------------------------------------------------------------------- 1 | // 0xA49960: script variables are saved here 2 | // &0: ADMA first variable, so pointing to 0xA49960 3 | 4 | // 0xB7CE50: player money 5 | // 0xB7CE50 - 0xA49960 = 0x1334F0 6 | 7 | 0006: 2@ = 0x1334F0 8 | // divide by 4, because every element in array is a dword 9 | 0016: 2@ /= 4 10 | 0004: &0(2@,1i) = 50000 11 | // ^ always &0 12 | 13 | // player now has $50000 14 | 15 | // inferred from this post by seemann: https://sannybuilder.com/forums/viewtopic.php?pid=133#p133 16 | -------------------------------------------------------------------------------- /cleo/esp/README.md: -------------------------------------------------------------------------------- 1 | ESP script 2 | 3 | ![preview](/cleo/esp/scrot.png?raw=true) 4 | 5 | F5: use actor memory pool for peds instead of opcodes (needed to draw esp on samp players) 6 | F6: dont use actor memory pool 7 | F7: show objects 8 | F8: dont show objects 9 | F9: show lines 10 | F10: dont show lines 11 | 12 | You need mod_hud.txd for the lines to work. 13 | I used mod_hud.txd from Ryosuke's HUD cleo mod, download it here: http://hotmist.ddo.jp/cleomod/hud/index.html 14 | Place the txd in models/txd 15 | 16 | -------------------------------------------------------------------------------- /cleoplugins/signext/opcodes.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | 3 | BOOL InitOpcodes() 4 | { 5 | if (CLEO_RegisterOpcode(0x0C26, &ext)) { 6 | return TRUE; 7 | } 8 | return FALSE; 9 | } 10 | 11 | OpcodeResult WINAPI ext(CScriptThread *thread) 12 | { 13 | WORD i = CLEO_GetIntOpcodeParam(thread); 14 | float result; 15 | const float mp = 0.125; 16 | _asm 17 | { 18 | movsx ecx, i 19 | mov result, ecx 20 | fild result 21 | fmul mp 22 | fstp result 23 | } 24 | CLEO_SetFloatOpcodeParam(thread, result); 25 | return OR_CONTINUE; 26 | } -------------------------------------------------------------------------------- /cleo/vcweaponpicks/README.md: -------------------------------------------------------------------------------- 1 | Recreating the Vice City styled weapon pickups. 2 | 3 | [Demo video](https://youtu.be/0gjT1hsOTI8) 4 | 5 | There are 3 versions because of limits. There are only 64 scriptable coronas available and the normal version uses 3 coronas per pickup. This means not all weapon pickups get the effects if there are too many visible. 6 | 7 | The -condensed version uses 2 coronas per pickup, omitting one of the rings. The -ultracondensed version uses only 1 corona, and this one has no special effects (static). 8 | 9 | See the demo video for the difference. 10 | -------------------------------------------------------------------------------- /cleo/customcolor/cust color.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | 3 | 03A4: name_thread 'CSTCOL' 4 | 5 | 0330: set_player $PLAYER_CHAR infinite_run 1 6 | 7 | // money & green textdraws 8 | 0A8C: write_memory 0xBAB230 size 4 value 0xFFFF4336 virtual_protect 0 // FF2C6836 abgr 9 | 10 | //sphere 11 | 0A8C: write_memory 0x725BD0 size 4 value 0x15BA66 vp 0 // r 12 | 0A8C: write_memory 0x725BCC size 4 value 0xCEB966 vp 0 // g 13 | 0A8C: write_memory 0x725BD5 size 4 value 0xF7B866 vp 0 // b 14 | 15 | // white line armor bar 16 | 0A8C: write_memory 0x589127 size 1 value 1 vp 0 17 | 18 | 0A93: end_custom_thread 19 | -------------------------------------------------------------------------------- /other/3DBlipsSaExclusion/build.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CALL "C:\Users\Robin\broftware\Microsoft Visual Studio 8\VC\bin\vcvars32.bat" 3 | REM my vcvars returns errorlevel 9009 (attempted to execute a non-existing command), so skipping next check 4 | REM IF %ERRORLEVEL% NEQ 0 GOTO:ERR 5 | NASM -f win32 ZZ3DBlipsSARemoveHouseIcons.asm 6 | IF %ERRORLEVEL% NEQ 0 GOTO:ERR 7 | LINK /NOLOGO /DLL /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" /ENTRY:dllmain /OUT:ZZ3DBlipsSARemoveHouseIcons.asi Kernel32.lib User32.lib ZZ3DBlipsSARemoveHouseIcons.obj 8 | IF %ERRORLEVEL% NEQ 0 GOTO:ERR 9 | GOTO:EOF 10 | :ERR 11 | ECHO. 12 | ECHO. 13 | ECHO FAILURE 14 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/opcodes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Stdafx.h" 3 | #include "CLEO.h" 4 | 5 | BOOL InitOpcodes(); 6 | OpcodeResult WINAPI Op_0C26(CScriptThread *thread); 7 | OpcodeResult WINAPI Op_0C27(CScriptThread *thread); 8 | OpcodeResult WINAPI Op_0C28(CScriptThread *thread); 9 | OpcodeResult WINAPI Op_0C29(CScriptThread *thread); 10 | OpcodeResult WINAPI Op_0C30(CScriptThread *thread); 11 | OpcodeResult WINAPI Op_0C31(CScriptThread *thread); 12 | OpcodeResult WINAPI Op_0C32(CScriptThread *thread); 13 | OpcodeResult WINAPI Op_0C33(CScriptThread *thread); 14 | OpcodeResult WINAPI Op_0C34(CScriptThread *thread); 15 | OpcodeResult WINAPI Op_0C35(CScriptThread *thread); 16 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set MSBuild=C:\Program Files (x86)\MSBuild\12.0\Bin\MSBuild.exe 4 | set VisualStudioVersion=12.0 5 | 6 | color 18 7 | :b 8 | del Release/*.cleo 9 | set Theme=1 10 | set ReleaseVersion=standard 11 | "%MSBuild%" plpanel.vcxproj /p:Configuration=Release /p:VisualStudioVersion=%VisualStudioVersion% 12 | set Theme=2 13 | set ReleaseVersion=classic 14 | "%MSBuild%" plpanel.vcxproj /p:Configuration=Release /p:VisualStudioVersion=%VisualStudioVersion% 15 | set Theme=3 16 | set ReleaseVersion=robin 17 | "%MSBuild%" plpanel.vcxproj /p:Configuration=Release /p:VisualStudioVersion=%VisualStudioVersion% 18 | cd >nul 19 | pause 20 | cls 21 | goto b 22 | -------------------------------------------------------------------------------- /cleo/allcopcarsonetown/allcopcarsonetown.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | 3 | 03A4: name_thread 'COPC' 4 | 5 | // 599 policeranger 8a5a8c 6 | // 596 policels 8a5a90 7 | // 597 policesf 8a5a94 8 | // 598 policelv 8a5a98 9 | // 523 policebike 8a8a9c 10 | 11 | 0006: 1@ = 596 12 | 13 | :loopdaloop 14 | 0001: wait 250 15 | 16 | 0006: 0@ = 0x8a5a8c 17 | :nextcar 18 | 0A8C: write_memory 0@ size 4 value 1@ vp 0 19 | 000A: 0@ += 4 20 | 00D6: if 21 | 0019: 0@ > 0x8a5a98 22 | 004D: jump_if_false @nextcar 23 | 000A: 1@ += 1 24 | 00D6: if 25 | 0019: 1@ > 599 26 | 004D: jump_if_false @loopdaloop 27 | 0006: 1@ = 596 28 | 0002: jump @loopdaloop 29 | 30 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleoplugins/plpanel/stuff.h: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | from Plugin-SDK (Grand Theft Auto) 4 | Authors: GTA Community. See more here 5 | https://github.com/DK22Pac/plugin-sdk 6 | */ 7 | 8 | #define STATIC_ASSERT(E) typedef char __static_assert_[(E)?1:-1] 9 | #define EXPECT_SIZE(S,SIZE) STATIC_ASSERT(sizeof(S)==(SIZE)) 10 | 11 | #define DrawBarChart(x, y, width, height, progress, progressAdd, drawPercentage, \ 12 | drawBlackBorder, color, addColor) ((void (__cdecl *)(float, float, unsigned short,\ 13 | unsigned char, float, signed char, unsigned char, unsigned char, int, int))0x728640)\ 14 | (x, y, width, height, progress, progressAdd, drawPercentage, drawBlackBorder, color,\ 15 | addColor); -------------------------------------------------------------------------------- /snippets/textureloading.txt: -------------------------------------------------------------------------------- 1 | // loading a sprite from /models/ instead of /models/txd/ 2 | // e.g. normally fronten2.txd can't be used as it's not in the txd dir 3 | 4 | // change lookup path from "txd/" to "././" 5 | 0A8C: write_memory 0x859F3F size 4 value 0x5C2E5C2E virtual_protect 0 6 | 0390: load_txd_dictionary 'FRONTEN2' 7 | 038F: load_texture "MAP" as 1 // Load dictionary with 0390 first 8 | 0390: load_txd_dictionary 'HUD' 9 | 038F: load_texture "RADAR_WAYPOINT" as 2 // Load dictionary with 0390 first 10 | 038F: load_texture "RADAR_GANGB" as 3 // Load dictionary with 0390 first 11 | // revert loading path back to "txd/" 12 | 0A8C: write_memory 0x859F3F size 4 value 0x5C647874 virtual_protect 0 13 | -------------------------------------------------------------------------------- /cleo/allcopcarsonetown/ghostcopcars.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | 3 | 03A4: name_thread 'COPC' 4 | 5 | // 599 policeranger 8a5a8c 6 | // 596 policels 8a5a90 7 | // 597 policesf 8a5a94 8 | // 598 policelv 8a5a98 9 | // 523 policebike 8a8a9c 10 | 11 | 0A8C: write_memory 0x8a8a9c size 4 value #NRG500 vp 0 12 | 13 | 0006: 1@ = 604 14 | 15 | :loopdaloop 16 | 0001: wait 250 17 | 18 | 0006: 0@ = 0x8a5a8c 19 | :nextcar 20 | 0A8C: write_memory 0@ size 4 value 1@ vp 0 21 | 000A: 0@ += 4 22 | 00D6: if 23 | 0019: 0@ > 0x8a5a98 24 | 004D: jump_if_false @nextcar 25 | 000A: 1@ += 1 26 | 00D6: if 27 | 0019: 1@ > 605 28 | 004D: jump_if_false @loopdaloop 29 | 0006: 1@ = 604 30 | 0002: jump @loopdaloop 31 | 32 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleoplugins/plpanel/commonhandlers.h: -------------------------------------------------------------------------------- 1 | 2 | #include "opcodes.h" 3 | 4 | void headinghandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason); 5 | void removehandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason); 6 | void boxremovehandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason); 7 | void carspeedtdhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason); 8 | void damagebarhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason); 9 | void progressbarpatchhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason); 10 | void damagepatchhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason); 11 | void destnearesthandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason, char *destnearstr); 12 | -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/opcodes.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | 3 | HANDLE hFile = NULL; 4 | 5 | BOOL InitOpcodes() 6 | { 7 | if (CLEO_RegisterOpcode(0x0DDD, &ext)) { 8 | return TRUE; 9 | } 10 | return FALSE; 11 | } 12 | 13 | OpcodeResult WINAPI ext(CScriptThread *thread) 14 | { 15 | if (hFile == NULL) { 16 | hFile = CreateFileA("objz.txt", FILE_GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); 17 | SetFilePointer(hFile, 0, NULL, FILE_END); 18 | } 19 | unsigned char buf[28]; 20 | DWORD d; 21 | d = CLEO_GetIntOpcodeParam(thread); 22 | memcpy(&buf[0], &d, 4); 23 | float f; 24 | for (int i = 0; i < 6; i++) { 25 | f = CLEO_GetFloatOpcodeParam(thread); 26 | memcpy(&buf[4 + i * 4], &f, 4); 27 | } 28 | DWORD w; 29 | WriteFile(hFile, buf, 28, &w, NULL); 30 | 31 | return OR_CONTINUE; 32 | } -------------------------------------------------------------------------------- /cleo/gps/gps50nodes.txt: -------------------------------------------------------------------------------- 1 | hex 2 | 00 00 00 00 3 | 00 00 00 00 4 | 00 00 00 00 5 | 00 00 00 00 6 | 00 00 00 00 7 | 00 00 00 00 8 | 00 00 00 00 9 | 00 00 00 00 10 | 00 00 00 00 11 | 00 00 00 00 12 | 13 | 00 00 00 00 14 | 00 00 00 00 15 | 00 00 00 00 16 | 00 00 00 00 17 | 00 00 00 00 18 | 00 00 00 00 19 | 00 00 00 00 20 | 00 00 00 00 21 | 00 00 00 00 22 | 00 00 00 00 23 | 24 | 00 00 00 00 25 | 00 00 00 00 26 | 00 00 00 00 27 | 00 00 00 00 28 | 00 00 00 00 29 | 00 00 00 00 30 | 00 00 00 00 31 | 00 00 00 00 32 | 00 00 00 00 33 | 00 00 00 00 34 | 35 | 00 00 00 00 36 | 00 00 00 00 37 | 00 00 00 00 38 | 00 00 00 00 39 | 00 00 00 00 40 | 00 00 00 00 41 | 00 00 00 00 42 | 00 00 00 00 43 | 00 00 00 00 44 | 00 00 00 00 45 | 46 | 00 00 00 00 47 | 00 00 00 00 48 | 00 00 00 00 49 | 00 00 00 00 50 | 00 00 00 00 51 | 00 00 00 00 52 | 00 00 00 00 53 | 00 00 00 00 54 | 00 00 00 00 55 | 00 00 00 00 56 | end -------------------------------------------------------------------------------- /cleo/seaways/seaways.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'SEAWAYS' 5 | 6 | :SEAWAYS 7 | 00D6: if 8 | 8ADC: not test_cheat "SEAWAYS" 9 | 004D: jf @CHEAT 10 | 0001: wait 0 ms 11 | 0002: jump @SEAWAYS 12 | 13 | :CHEAT 14 | 0A8D: 0@ = read_memory 0x969152 size 1 virtual_protect 0 15 | 0B12: 0@ = 0@ xor 1 16 | 0A8C: write_memory 0x969152 size 1 value 0@ virtual_protect 0 17 | 0A8C: write_memory 0x96918C size 4 value 1 virtual_protect 0 18 | 0A8C: write_memory 0xBAA472 size 4 value 1 virtual_protect 0 19 | 0A8D: 1@ = read_memory 0xB79044 size 4 virtual_protect 0 20 | 000A: 1@ += 1 21 | 0A8C: write_memory 0xB79044 size 4 value 1@ virtual_protect 0 22 | 00D6: if 23 | 0039: 0@ == 1 24 | 004D: jf @DEACTIVATED 25 | 03E5: show_text_box 'CHEAT1' // Cheat activated 26 | 0002: jump @SEAWAYS 27 | 28 | :DEACTIVATED 29 | 03E5: show_text_box 'CHEAT8' // Cheat deactivated 30 | 0002: jump @SEAWAYS 31 | 32 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleoplugins/plpanel/SRaceCheckpoint.h: -------------------------------------------------------------------------------- 1 | 2 | #include "stuff.h" 3 | #include "windows.h" 4 | 5 | struct SRaceCheckpoint 6 | { 7 | BYTE byteType; 8 | BYTE byteFree; 9 | BYTE byteUsed; 10 | BYTE byteField_3; 11 | BYTE byteField_4; 12 | BYTE byteField_5; 13 | BYTE byteField_6; 14 | BYTE byteField_7; 15 | BYTE byteR; 16 | BYTE byteG; 17 | BYTE byteB; 18 | BYTE byteField_B; 19 | BYTE byteField_C; 20 | BYTE byteField_D; 21 | BYTE byteField_E; 22 | BYTE byteField_F; 23 | float fX; 24 | float fY; 25 | float fZ; 26 | float fArrowOffsetX; 27 | float fArrowOffsetY; 28 | float fArrowOffsetZ; 29 | DWORD dwField_28; 30 | float fRadius; 31 | DWORD dwField_30; 32 | BYTE dwField_34; 33 | BYTE dwField_35; 34 | BYTE dwField_36; 35 | BYTE dwField_37; 36 | }; 37 | EXPECT_SIZE(SRaceCheckpoint, 0x38); 38 | 39 | #define MAX_RACECHECKPOINTS (0x20) 40 | #define SA_RACECHECKPOINTS (0xC7F158) 41 | -------------------------------------------------------------------------------- /snippets/hook.txt: -------------------------------------------------------------------------------- 1 | // hook HUD 2 | 3 | /* 4 | .text:0058EAF0 _DrawHud proc near ; CODE XREF: CHud__Draw+F6p 5 | .text:0058EAF0 000 sub esp, 1A0h 6 | .text:0058EAF6 1A0 movzx eax, _currentPlayer 7 | 8 | 0058EAF0 81 EC A0 01 00 0 9 | */ 10 | 11 | 0AC6: 1@ = label @HUDHOOK offset 12 | 000E: 1@ -= 0x58EAF1 13 | 000E: 1@ -= 0x4 14 | 0A8C: write_memory 0x58EAF0 size 1 value 0xE9 vp 0 // jmp near 15 | 0A8C: write_memory 0x58EAF1 size 4 value 1@ vp 0 16 | 0A8C: write_memory 0x58EAF5 size 1 value 0x90 vp 0 // NOP 17 | 18 | 0AC6: 0@ = label @HUHOOKRETURNJUMP offset 19 | 0006: 1@ = 0x58EAF1 20 | 0062: 1@ -= 0@ // (int) 21 | 0A8C: write_memory 0@ size 4 value 1@ vp 0 22 | 23 | :HUDHOOK 24 | hex 25 | 81 // sub 26 | EC // esp 27 | A0 01 00 00 // 0x1A0 28 | 29 | // stuff 30 | 31 | E9 // jmp near 32 | end 33 | :HUHOOKRETURNJUMP 34 | hex 35 | 00 00 00 00 36 | end 37 | -------------------------------------------------------------------------------- /cleo/plhud/new/README.md: -------------------------------------------------------------------------------- 1 | ## What 2 | HUD kind of thing that shows runways, specifically for [the pilot's life SA:MP server](http://thepilotslife.com). 3 | 4 | This is the successor of [the old plhud](../), with a lot of improvements: 5 | * plane instead of a line 6 | * better text visibility 7 | * no ghosting 8 | * does not affect SA-MP textdraws opacity 9 | * airstrips on the radar are updated instantly 10 | * easy menu instead of lists of hotkeys 11 | * configurable color 12 | * no need for a plugin anymore, just 1 cs file 13 | * runways stay on the screen longer, even if one end isn't visible 14 | * better performance 15 | * shows even when the HUD is hidden 16 | 17 | ![preview](pic.png) 18 | 19 | [short demo video](https://youtu.be/RtfCMnLkYAk) 20 | 21 | ## Requirements 22 | [CLEO4](http://cleo.li) 23 | 24 | ## Controls 25 | * F10 enable/disable, shows menu when enabling 26 | * Arrow keys to navigate the menu 27 | 28 | Smart mode = only show runways in range of the (un)loading point. 29 | -------------------------------------------------------------------------------- /cleo/plhud/README.md: -------------------------------------------------------------------------------- 1 | # There is a new version of this script 2 | I recommend you check out [the new version](new/), wich has a lot of improvements. 3 | 4 | 5 | 6 | 7 | 8 | 9 | ## What 10 | HUD kind of thing that shows runways, specifically for [the pilot's life SA:MP server](http://thepilotslife.com). 11 | 12 | ![preview](pic.png) 13 | ![preview](pic2.png) 14 | 15 | [short demo video](https://youtu.be/4AXkKAutmwo) 16 | 17 | ## Requirements 18 | [CLEO4](http://cleo.li) and [yugecodes.cleo](../../cleoplugins/yugecodes/bin/yugecodes.cleo?raw=true) 19 | 20 | ## Controls 21 | * F10 enable/disable 22 | * Y+F10 increase viewdistance 23 | * H+F10 decrease viewdistance 24 | * G+F10 enable/disable smart mode 25 | * U+F10 switch between render modes (textures/immediate mode) (default is textures) 26 | 27 | Smart mode = only show runways in range of the (un)loading point. 28 | 29 | Initial settings: 30 | * enabled: no 31 | * view distance: 1000m 32 | * smart mode: on 33 | -------------------------------------------------------------------------------- /cleo/snapshots/investig.txt: -------------------------------------------------------------------------------- 1 | 008CD5D8 _miCamerapickup 2 | opcode create snapshot pickup 004778AA 3 | 4 | 73C1F0 takes photo, show flash etc 5 | 456a70 checks it 6 | 7 | NOP 455765 (2 bytes) to always show camera pickups 8 | NOP 455767 - 455776 (15 bytes) to not show camera pickups, even when using camera 9 | 10 | to not remove pickups after getting em: change 456c26 to 0x75 (1 byte), orig: 0x74 (jz -> jnz) 11 | (crashes games after taking more than 1 snapshot) 12 | 13 | view distance: float C3EF9C 14 | 15 | NOP 6 bytes to 52CA59 to prevent viewdistance changes 16 | 17 | 800 viewdistance: 580 maxdistance 18 | 700 viewdistance: 560 maxdistance (alnsfmzo) 19 | 650 viewdistance: 550 maxdistance (scottishsummer) 20 | 400 viewdistance: 400 maxdistance (nightprowler) 21 | 178 viewdistance: 178 maxdistance (cantseewhereimgoing) 22 | 150 viewdistance: 150 maxdistance (cwjxuoc) 23 | 24 | // 25 | CAMERA MODE: 8CC388 26 | https://github.com/DK22Pac/plugin-sdk/blob/c7d9257541ab00a86f0ae9f66d197d5475c4df07/plugin_sa/game_sa/eCamMode.h 27 | NOP 6 bytes 527D29 to prevent reset 28 | doesnt change much doe 29 | // 30 | -------------------------------------------------------------------------------- /cleoplugins/world2hud/README.md: -------------------------------------------------------------------------------- 1 | Plugin to transform 3D world points to 2D screen points. 2 | Find a prebuilt [world2hud.cleo](bin/world2hud.cleo) in the bin folder. 3 | 4 | ### Usage 5 | Put this at the top of your script (along with other sannybuilder macros): 6 | ``` 7 | {$O 0C27=5,transform world_xyz %1d% %2d% %3d% to hud_xy %4d% %5d%} 8 | {$O 0C28=5,transform world_xyz %1d% %2d% %3d% to screen_xy %4d% %5d%} 9 | ``` 10 | This lets sannybuilder know these additional opcodes exists so it will know what to do when compiling. 11 | Then you can call it like any other opcode: 12 | ``` 13 | 0C27: transform world_xyz 1@ 2@ 3@ to hud_xy 4@ 5@ 14 | 0C28: transform world_xyz 1@ 2@ 3@ to screen_xy 4@ 5@ 15 | ``` 16 | What this does: it transforms a 3D world point to 2D screen point. Use `0C27` to transform to a hud (640x480) point for using with textdraws/texture positions. Use `0C28` to transform to a screen point (project to whatever resolution sa is running with) when directly accessing drawing APIs. 17 | 18 | ### Plain CLEO alternative 19 | See [garages esp script](../../scm/garages/scr.txt) at :DOPROJECTION. 20 | 21 | -------------------------------------------------------------------------------- /cleo/elm/own elm2b.fxt: -------------------------------------------------------------------------------- 1 | ELS0 ELS ~r~disabled~w~ 2 | ELS1 ELS ~g~enabled~w~ 3 | 4 | REM0T ~p~Lights 5 | REM0I1 Front.. 6 | REM0I1A Front > 7 | REM0I2 Rear.. 8 | REM0I2A Rear > 9 | REM0I4 ~w~Cleo mod created 10 | REM0I5 ~w~by ~b~robin_be~w~. 11 | REM0I6 ~w~ 12 | 13 | REM1T ~p~Patterns 14 | REM1I1 Strobe A 15 | REM1I2 Strobe B 16 | REM1I3 Hazard.. 17 | REM1I3A Hazard > 18 | REM1I4 Full.. 19 | REM1I4A Full > 20 | REM1I5 Static.. 21 | REM1I5A Static > 22 | REM1I6 ~w~ 23 | 24 | REM2T ~p~Patterns 25 | REM2I1 Strobe A 26 | REM2I2 Strobe B 27 | REM2I3 Strobe C 28 | REM2I4 Strobe D 29 | REM2I5 Full.. 30 | REM2I5A Full > 31 | REM2I6 Static.. 32 | REM2I6A Static > 33 | 34 | REM3T ~p~Hazard 35 | REM3I1 Normal 36 | REM3I2 Fast 37 | REM3I3 Fastest 38 | REM3I6 ~w~ 39 | 40 | REM4T ~p~Full flash speed 41 | REM4I1 Half 42 | REM4I2 Quarter 43 | REM4I3 Eigth 44 | REM4I4 Sixteenth 45 | REM4I6 ~w~ 46 | 47 | REM5T ~p~Full flash speed 48 | REM5I1 Half 49 | REM5I2 Quarter 50 | REM5I3 Eigth 51 | REM5I4 Sixteenth 52 | REM5I6 ~w~ 53 | 54 | REM6T ~p~Static 55 | REM6I1 On 56 | REM6I2 Off 57 | REM6I6 ~w~ 58 | 59 | REM7T ~p~Static 60 | REM7I1 On 61 | REM7I2 Off 62 | REM7I6 ~w~ -------------------------------------------------------------------------------- /cleo/plane-speed-limit/readme.txt: -------------------------------------------------------------------------------- 1 | Pressing F10+F9 toggles the speed limit of planes. 2 | 3 | 4 | Based on this post by OP9080 5 | -------------------------------------------------------------------------------- 6 | https://gtaforums.com/topic/222739-remove-the-hardwired-speed-limit-on-the-hydra 7 | 8 | Address 0x86E104 - float constant, square of the maximum speed of the Hydra 9 | (actually, all planes) 10 | 11 | Unit: 2500 meters^2/sec^2 12 | 13 | Value: 2.25 (gives a maximum speed of 75 m/s) 14 | 15 | Code that checks the limit: 16 | 17 | 006DADDD: D8 1D 04 E1 86 00 fcomp dword ptr ds:[0086E104h] 18 | 006DADE3: DF E0 fnstsw ax 19 | 006DADE5: F6 C4 41 test ah,41h 20 | 006DADE8: 75 60 jne 006DAE4A 21 | 22 | How to remove: 23 | 24 | Change byte at 0x6DADE8 from 0x75 to 0xEB to change it to an unconditional jmp 25 | and ignore the test. 26 | 27 | If you have GTA hoodlum, you can patch it with a hex editor at file address 28 | 0x2DA1E8. 29 | 30 | These numbers hold for both US & EU exes. 31 | 32 | The Hydra's speed is also limited by the drag physics so if you want to make 33 | it go faster, reduce the default drag factor of 20 in handling.cfg. 34 | I used a drag of 2, and it maxed out spookie's speedometer at 999 KPH in 35 | about 10 seconds. 36 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/transform.cpp: -------------------------------------------------------------------------------- 1 | #include "transform.h" 2 | 3 | RwV3D TransformWorldXYZ(RwV3D world) { 4 | // partly based on https://github.com/multitheftauto/mtasa-blue/blob/9b1fbaf639657a446790469aa6711e11be0d3eee/MTA10/core/CGraphics.cpp#L498 5 | 6 | CMATRIX *cameraViewMatrix = (CMATRIX*)(0xB6FA2C); 7 | 8 | RwV3D screen; 9 | screen.x = world.z * cameraViewMatrix->three.x + world.y * cameraViewMatrix->two.x + world.x * cameraViewMatrix->one.x + cameraViewMatrix->four.x; 10 | screen.y = world.z * cameraViewMatrix->three.y + world.y * cameraViewMatrix->two.y + world.x * cameraViewMatrix->one.y + cameraViewMatrix->four.y; 11 | screen.z = world.z * cameraViewMatrix->three.z + world.y * cameraViewMatrix->two.z + world.x * cameraViewMatrix->one.z + cameraViewMatrix->four.z; 12 | 13 | float fRecip = 1.0f / screen.z; 14 | screen.x *= fRecip; 15 | screen.y *= fRecip; 16 | 17 | return screen; 18 | } 19 | 20 | OpcodeResult TransformPointFor0C270C28(CScriptThread *thread, int width, int height) { 21 | RwV3D world; 22 | world.x = CLEO_GetFloatOpcodeParam(thread); 23 | world.y = CLEO_GetFloatOpcodeParam(thread); 24 | world.z = CLEO_GetFloatOpcodeParam(thread); 25 | 26 | RwV3D screen = TransformWorldXYZ(world); 27 | 28 | CLEO_SetFloatOpcodeParam(thread, screen.x * width); 29 | CLEO_SetFloatOpcodeParam(thread, screen.y * height); 30 | return OR_CONTINUE; 31 | } 32 | -------------------------------------------------------------------------------- /cleoplugins/signext/signext.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/text.cpp: -------------------------------------------------------------------------------- 1 | #include "CLEO.h" 2 | 3 | OpcodeResult DrawText(CScriptThread *thread, bool hudcoordinates) { 4 | float xratio = (float)(*(DWORD*)(0xC17044)) / 640.0f; 5 | float yratio = (float)(*(DWORD*)(0xC17048)) / 480.0f; 6 | 7 | const char *text = (char*)CLEO_GetIntOpcodeParam(thread); 8 | float x = CLEO_GetFloatOpcodeParam(thread); 9 | float y = CLEO_GetFloatOpcodeParam(thread); 10 | int font = CLEO_GetIntOpcodeParam(thread); 11 | char proportional = CLEO_GetIntOpcodeParam(thread); 12 | int align = CLEO_GetIntOpcodeParam(thread); 13 | int r = CLEO_GetIntOpcodeParam(thread); 14 | int g = CLEO_GetIntOpcodeParam(thread); 15 | int b = CLEO_GetIntOpcodeParam(thread); 16 | int a = CLEO_GetIntOpcodeParam(thread); 17 | float xsize = CLEO_GetFloatOpcodeParam(thread) * xratio; 18 | float ysize = CLEO_GetFloatOpcodeParam(thread) * yratio; 19 | 20 | if (hudcoordinates) { 21 | x *= xratio; 22 | y *= yratio; 23 | } 24 | 25 | ((void (__cdecl *)(BYTE font))0x719490)(font); 26 | ((void (__cdecl *)(char proportional))0x7195B0)(proportional); 27 | ((void (__cdecl *)(BYTE align))0x719610)(align); 28 | ((void (__cdecl *)(float xsize, float ysize))0x719380)(xsize, ysize); 29 | ((void (__cdecl *)(DWORD rgba))0x719430)((r) | (g << 8) | (b << 16) | (a << 24)); 30 | ((void (__cdecl *)(float x, float y, const char* text))0x71A700)(x, y, text); 31 | 32 | return OR_CONTINUE; 33 | } -------------------------------------------------------------------------------- /other/3DBlipsSaExclusion/readme.txt: -------------------------------------------------------------------------------- 1 | This is a mod for a mod named "3DBlipsSA". That mod, which is NOT made by me but 2 | by someone named "Xinerki", renders all radar blips on the HUD at their 3D world 3 | positions (together with a distance measurement text). 4 | https://gtaforums.com/topic/867079-3d-blips/ 5 | 6 | Someone came to me and asked if I could make it so that the property icons would 7 | be excluded (green house/red house blips), because they can be omnipresent in 8 | some SA:MP servers etc. 9 | 10 | This mod "ZZ3DBlipsSaRemoveHouseIcons" does that by hooking into the loaded mod 11 | dll and adds a hook to do an additional check of the blip type before rendering 12 | it. The name is prefixed by a few Z's, to make sure this gets loaded after the 13 | original mod was loaded (I was guessing that would work, and it seems like it 14 | does). 15 | 16 | So this mod is an additional "ZZ3DBlipsSaRemoveHouseIcons.asi" file that you 17 | also need to paste into your GTA:SA game dir. If the "3DBlipsSA.asi" file is 18 | not in your game dir, this mod won't do anything. Also note that this mod won't 19 | work if the original mod is named anything different than "3DBlipsSA.asi". 20 | Simply delete the file from your game directory to "uninstall". 21 | 22 | I've also put the original 3DBlipsSA.asi mod in here (or at least, the version 23 | that that person gave me) since apparently the original download link does not 24 | resolve. 25 | -------------------------------------------------------------------------------- /cleo/snapshots/README.md: -------------------------------------------------------------------------------- 1 | ESP for snapshots, usefull for routing all snapshots speedruns 2 | 3 | [Demo video](https://youtu.be/F3fbW10hvOk) 4 | 5 | Usefull stuff: 6 | * use the NotForPublicRoads (Hotring A) cheat to spawn a NRG-500 7 | * you can't fall of your bike (unless you drive in water) 8 | * pickups will be shown if you don't look trough the camera (and when you're within 100 units) 9 | * Usefull data at the bottom left of the screen: viewdistance/max snapshotdistance/#snapshots taken/total # of snapshots 10 | 11 | ESP is red when snapshot is too far, green when it is possible to get them. 12 | The calculation behind that is.. not a calculation and not very accurate, but it comes close. 13 | 14 | It doesn't check if you zoomed in far enough to get the shot, I'll add that later when I find out how to do that. 15 | 16 | ~~The signext.cleo plugin is needed for sign extending the XYZ positions of pickups, because they are saved as 2byte values. Let me know if you find a way to make it work in pure cleo, so the plugin wouldn't be needed anymore.~~ 17 | Finally found how to do it properly (I kept forgetting one step), the [snapshots.cs](snapshots.cs) script doesn't need the plugin anymore. 18 | I'm keeping the last version that used the plugin as [snapshots-withplugin.cs](snapshots-withplugin.cs), if you want to use that one, make sure to also put the [signext.cleo](../../cleoplugins/signext/bin/signext.cleo) plugin in your CLEO folder. 19 | 20 | -------------------------------------------------------------------------------- /scm/cameraexport/Dllmain.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | HANDLE hFile; 6 | OpcodeResult WINAPI ext(CScriptThread *thread) 7 | { 8 | if (hFile == NULL) { 9 | hFile = CreateFileA("camera.txt", FILE_GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); 10 | SetFilePointer(hFile, 0, NULL, FILE_END); 11 | } 12 | char buf[255]; 13 | int i = CLEO_GetIntOpcodeParam(thread); 14 | float x = CLEO_GetFloatOpcodeParam(thread); 15 | float y = CLEO_GetFloatOpcodeParam(thread); 16 | float z = CLEO_GetFloatOpcodeParam(thread); 17 | float f[16]; 18 | for (int i = 0; i < 16; i++) { 19 | f[i] = CLEO_GetFloatOpcodeParam(thread); 20 | } 21 | sprintf_s(buf, "%d %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f\n", i, 22 | x, y, z, 23 | f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7], f[8], f[9], f[10], f[11], f[12], f[13], f[14], f[15]); 24 | DWORD w; 25 | WriteFile(hFile, buf, strlen(buf), &w, NULL); 26 | 27 | return OR_CONTINUE; 28 | } 29 | OpcodeResult WINAPI ext2(CScriptThread *thread) 30 | { 31 | if (hFile != NULL) { 32 | CloseHandle(hFile); 33 | hFile = NULL; 34 | } 35 | return OR_CONTINUE; 36 | } 37 | 38 | BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) 39 | { 40 | if (ul_reason_for_call == DLL_PROCESS_ATTACH) { 41 | return CLEO_RegisterOpcode(0x0DDF, &ext) && CLEO_RegisterOpcode(0x0DE0, &ext2); 42 | } 43 | return TRUE; 44 | } -------------------------------------------------------------------------------- /cleo/framelimiter/framelimiter.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'FRAMEL' 5 | 6 | // remove 14ms wait 7 | 0A8C: write_memory 0x53E94A size 4 value 0x90909090 vp 0 8 | 0A8C: write_memory 0x53E94E size 1 value 0x90 vp 0 9 | 10 | 0006: 0@ = 0 // fps 11 | 0006: 1@ = 0 // fps counter 12 | 0006: 2@ = 0 // keydelay active 13 | 0006: 10@ = 71 // fps limit limit 14 | 0006: 33@ = 0 // delay for fps 15 | 16 | 0050: gosub @writelimit 17 | 18 | 03F0: enable_text_draw 1 19 | :fps 20 | 0001: wait 0 21 | 000A: 1@ += 1 22 | 00D6: if 23 | 0019: 33@ > 999 24 | 004D: jf @fps_keydelay 25 | 0085: 0@ = 1@ // (int) 26 | 0006: 1@ = 0 27 | 0006: 33@ = 0 28 | 29 | :fps_keydelay 30 | 00D6: if 31 | 0019: 32@ > 750 32 | 004D: jf @fps_key 33 | 0006: 2@ = 0 34 | :fps_key 35 | 00D6: if and 36 | 0AB0: key_pressed 106 // num* 37 | 0039: 2@ == 0 38 | 004D: jf @fps 39 | 0006: 2@ = 1 40 | 0006: 32@ = 0 41 | 42 | 00D6: if 43 | 0AB0: key_pressed 107 // num+ 44 | 004D: jf @fpskey_minus 45 | 000A: 10@ += 2 46 | 0ACE: show_formatted_text_box "FPS: %d~n~Limit: ~g~%d" 0@ 10@ 47 | 0050: gosub @writelimit 48 | 0002: jump @fps 49 | 50 | :fpskey_minus 51 | 00D6: if and 52 | 0AB0: key_pressed 109 // num- 53 | 0019: 10@ > 20 54 | 004D: jf @fps_nokey 55 | 000E: 10@ -= 2 56 | 0ACE: show_formatted_text_box "FPS: %d~n~Limit: ~r~%d" 0@ 10@ 57 | 0050: gosub @writelimit 58 | 0002: jump @fps 59 | 60 | :fps_nokey 61 | 0ACE: show_formatted_text_box "FPS: %d~n~Limit: %d" 0@ 10@ 62 | 0050: gosub @writelimit 63 | 0002: jump @fps 64 | 65 | :writelimit 66 | 0A8C: write_memory 0xC1704C size 4 value 10@ vp 0 67 | return 68 | 69 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleoplugins/signext/README.md: -------------------------------------------------------------------------------- 1 | Plugin to perform easy sign extension in cleo scripts. 2 | Find a prebuilt [signext.cleo](bin/signext.cleo) in the bin folder. 3 | 4 | ### Usage 5 | Put this at the top of your script (along with other sannybuilder macros): 6 | ``` 7 | {$O 0C26=2,sign_extend %1d% store_to %2d%} 8 | ``` 9 | This lets sannybuilder know an additional opcode 0C26 exists so it will know what to do when compiling. 10 | Then you can call it like any other opcode: 11 | ``` 12 | 0C26: sign_extend 1@ store_to 2@ 13 | ``` 14 | What this does: it converts a 2-byte int to a 4-byte float and divides the value by 8 (because this is how R\* stores some coordinates (e.g. for pickups) to save some memory). 15 | 16 | ### Usecase 17 | This was used in the [snapshots](../../cleo/snapshots) esp CLEO script as (snapshot) pickup XYZ locations are saved in memory as 2-byte ints (and divided by 8), and we need to work with 4 byte values in the script. 18 | After a while I did find a way to do this in plain CLEO, which means this plugins isn't used for that anymore. 19 | This can be still usefull if you don't mind the dependency on this plugin so you don't have to bother with sign extension in your CLEO code (or if you simply don't have any spare local variables :p). 20 | 21 | ### Plain CLEO alternative 22 | Eventually I found out how to do it without plugins (I kept forgetting about the 2-complement thing when I first searched for it). 23 | ``` 24 | // 1@ is input (and output) 25 | // 2@ is a temp variable (not used for positive values) 26 | :SIGNEXT 27 | 08B7: test 1@ bit 15 28 | 004D: jump_if_false @SIGNEXT2 29 | 0006: 2@ = 15 30 | :SIGNEXT0 31 | 000A: 2@ += 1 32 | 08BF: set 1@ bit 2@ 33 | 0019: 2@ > 31 34 | 004D: jump_if_false @SIGNEXT0 35 | :SIGNEXT2 36 | 0093: 1@ = integer 1@ to_float 37 | return 38 | ``` 39 | -------------------------------------------------------------------------------- /cleo/entry-info-node-pool-stat-display/entry-info-node-pool-stat-display.txt: -------------------------------------------------------------------------------- 1 | {$CLEO} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'ENTRYIN' 5 | 6 | const 7 | _EntryInfoNodePool = 0xB7448C 8 | _ObjectPool = 0xB7449C 9 | CPool_Size = 0x8 10 | CPool_Top = 0xC 11 | GetNoOfUsedSpaces = 0x54F6B0 12 | end 13 | 14 | wait 3000 15 | 03F0: enable_text_draw 1 16 | 17 | :MAIN_LOOP 18 | wait 0 19 | 20 | 0A8D: 0@ = read_memory _EntryInfoNodePool size 4 vp 0 21 | 0085: 1@ = 0@ // (int) 22 | 000A: 1@ += CPool_Size 23 | 0A8D: 11@ = read_memory 1@ size 4 vp 0 24 | 0AA8: call_method_return 0x54F6B0 struct 0@ num_params 0 pop 0 10@ 25 | 26 | 0A8D: 0@ = read_memory _ObjectPool size 4 vp 0 27 | 0085: 1@ = 0@ // (int) 28 | 000A: 1@ += CPool_Size 29 | 0A8D: 21@ = read_memory 1@ size 4 vp 0 30 | 0AA8: call_method_return 0x54F6B0 struct 0@ num_params 0 pop 0 20@ 31 | 32 | 0342: set_text_draw_centered 0 33 | 081C: draw_text_outline 1 RGBA 0 0 0 255 34 | 0340: set_text_draw_RGBA 50 255 50 255 35 | 033F: set_text_draw_letter_size 0.125 0.8 36 | 045A: draw_text_1number 380.0 20.0 GXT 'NUMBER' number 10@ // ~1 37 | 081C: draw_text_outline 1 RGBA 0 0 0 255 38 | 0340: set_text_draw_RGBA 50 255 50 255 39 | 033F: set_text_draw_letter_size 0.125 0.8 40 | 045A: draw_text_1number 400.0 20.0 GXT 'NUMBER' number 11@ // ~1~ 41 | 081C: draw_text_outline 1 RGBA 0 0 0 255 42 | 0340: set_text_draw_RGBA 50 255 50 255 43 | 033F: set_text_draw_letter_size 0.125 0.8 44 | 045A: draw_text_1number 380.0 40.0 GXT 'NUMBER' number 20@ // ~1~ 45 | 081C: draw_text_outline 1 RGBA 0 0 0 255 46 | 0340: set_text_draw_RGBA 50 255 50 255 47 | 033F: set_text_draw_letter_size 0.125 0.8 48 | 045A: draw_text_1number 400.0 40.0 GXT 'NUMBER' number 21@ // ~1~ 49 | 50 | 0002: jump @MAIN_LOOP 51 | 52 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleo/objsniffer/objs20.txt: -------------------------------------------------------------------------------- 1 | hex 2 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 15 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 18 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 19 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 21 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 | end -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/objs20.txt: -------------------------------------------------------------------------------- 1 | hex 2 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 4 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 9 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 10 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 11 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 12 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 13 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 15 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 16 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 17 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 18 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 19 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 21 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 22 | end -------------------------------------------------------------------------------- /other/3DBlipsSaExclusion/ZZ3DBlipsSARemoveHouseIcons.asm: -------------------------------------------------------------------------------- 1 | ;extern _OutputDebugStringA@4 2 | extern _GetModuleHandleA@4 3 | extern _VirtualProtect@16 4 | 5 | DLL_PROCESS_ATTACH equ 1 6 | PAGE_EXECUTE_READWRITE equ 0x40 7 | 8 | section .data ; Initialized data segment 9 | ;debugOk db "ZZ3DBlipsSARemoveHouseIcons ok", 0 10 | blipModuleName db "3DBlipsSA.asi", 0 11 | 12 | section .bss ; Uninitialized data segment 13 | module dd ? 14 | 15 | section .text 16 | hookfunc: 17 | ; ecx gets overwritten in either case (skip or no skip) so it's safe to use 18 | mov ecx, dword [module] 19 | cmp edx, 31 ; green house (radar_propertyG) 20 | jz skiphouse 21 | cmp edx, 32 ; red house (radar_propertyR) 22 | jz skiphouse 23 | ; do the line we overwrote to perform this jmp (mov eax, off_1008E040[edx*4]) 24 | mov eax, [ecx+edx*4+08E040h] ; don't touch eax after this!! 25 | ; jmp back to were we hooked from 26 | add ecx, 031F58h 27 | jmp ecx 28 | skiphouse: 29 | ; jmp to exit of function we hooked from, to skip this icon 30 | add ecx, 03223Dh 31 | jmp ecx 32 | 33 | global dllmain 34 | dllmain: 35 | push esi 36 | mov eax, [esp+0Ch] ; ul_reason_for_call 37 | cmp eax, DLL_PROCESS_ATTACH 38 | jnz ret 39 | 40 | push blipModuleName 41 | call _GetModuleHandleA@4 ; get base of the dll 42 | test eax, eax 43 | jz ret 44 | 45 | mov dword [module], eax 46 | mov esi, eax 47 | add esi, 031F51h ; this is the "mov eax, off_1008E040[edx*4]" line 48 | ;push debugOk 49 | ;call _OutputDebugStringA@4 50 | 51 | sub esp, 04h ; space for oldvp 52 | push esp ; oldvp 53 | push PAGE_EXECUTE_READWRITE 54 | push 5 ; length 55 | push esi ; address 56 | call _VirtualProtect@16 ; memprotect so we can override that line with a jmp 57 | add esp, 04h ; reclaim space used for oldvp 58 | 59 | mov eax, hookfunc 60 | sub eax, esi 61 | sub eax, 05h ; get relative offset of hookfunc from where we're jmp'ing 62 | mov byte [esi], 0xE9 ; jmp 63 | mov dword [esi+1], eax 64 | 65 | ret: 66 | pop esi 67 | mov eax, 1 68 | ret 0Ch 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ### CLEO scripts 3 | [airbreak](/cleo/airbreak) 4 | [allcopcarsonetown](/cleo/allcopcarsonetown) 5 | [simple ELS](/cleo/els_simple) 6 | [advanced ELS/ELM](/cleo/elm) 7 | [ESP](/cleo/esp) 8 | [framelimiter tweaks](/cleo/framelimiter) 9 | [gamespeed hotkeys](/cleo/gamespeed) 10 | [seaways cheat](/cleo/seaways) 11 | [edited colors](/cleo/customcolor) 12 | [dont fall of bike](/cleo/nofallofbike) 13 | [snapshots ESP](/cleo/snapshots) 14 | [vice city styled weapon pickups](/cleo/vcweaponpicks) 15 | [pickuprevealer](/cleo/pickuprevealer) 16 | [pilot's life runways hud](/cleo/plhud) 17 | [pilot's life runways hud NEW](/cleo/plhud/new) 18 | [pilot's life runways radar](/cleo/plradar) 19 | [pilot's life roads radar](/cleo/plroads) 20 | [plane speed limit remover](/cleo/plane-speed-limit) 21 | [autopilot](/cleo/autopilot) 22 | [objsniffer](/cleo/objsniffer) 23 | [objsniffer - fast version](/cleo/objsniffer-plugin) 24 | [gps](/cleo/gps) 25 | [helirotor](/cleo/helirotor) 26 | [entry-info-node-pool-stat-display](/cleo/entry-info-node-pool-stat-display) 27 | 28 | ### SCM scripts 29 | [train editing](/scm/trains) 30 | [garage esp](/scm/garages) 31 | [camera export](/scm/cameraexport) 32 | 33 | ### CLEO plugins 34 | [sign extending floats](/cleoplugins/signext) 35 | [world2hud projection](/cleoplugins/world2hud) 36 | [yugecodes - contains all my opcodes + extras](/cleoplugins/yugecodes) 37 | [plpanel](/cleoplugins/plpanel) 38 | 39 | ### Snippets 40 | [world2screen projection](/snippets/world2screen.txt) 41 | [use textures from the models directory](/snippets/textureloading.txt) 42 | [altering memory without CLEO](/snippets/memorywithoutcleo.txt) 43 | [creating coronas in a loop](/snippets/coronas.txt) 44 | [hook](/snippets/hook.txt) 45 | [hook drawhud and draw a polygon](/snippets/hookdrawpoly.txt) 46 | 47 | ### Tools 48 | [asm](/tools/asm) 49 | 50 | ### Other 51 | [3DBlipsSaExclusion](/other/3DBlipsSaExclusion) 52 | 53 | ### License 54 | [GPLv3](/LICENSE) 55 | 56 | -------------------------------------------------------------------------------- /snippets/hookdrawpoly.txt: -------------------------------------------------------------------------------- 1 | // hook DrawHud function at 58EAF0 and draw a polygon 2 | 3 | 0AC6: 1@ = label @HUDHOOK offset 4 | 000E: 1@ -= 0x58EAF1 5 | 000E: 1@ -= 0x4 6 | 0A8C: write_memory 0x58EAF0 size 1 value 0xE9 vp 0 // jmp near 7 | 0A8C: write_memory 0x58EAF1 size 4 value 1@ vp 0 8 | 0A8C: write_memory 0x58EAF5 size 1 value 0x90 vp 0 // NOP 9 | 10 | 0AC6: 0@ = label @HUHOOKRETURNJUMP offset 11 | 0006: 1@ = 0x58EAF1 12 | 0062: 1@ -= 0@ // (int) 13 | 0A8C: write_memory 0@ size 4 value 1@ vp 0 14 | 15 | 0AC6: 0@ = label @HUCALL offset 16 | 0006: 1@ = 0x7285B0 17 | 0062: 1@ -= 0@ // (int) 18 | 000E: 1@ -= 0x4 19 | 0A8C: write_memory 0@ size 4 value 1@ vp 0 20 | 21 | 0AC6: 0@ = label @COLOR offset 22 | 0AC6: 1@ = label @COLORHERE offset 23 | 0A8C: write_memory 1@ size 4 value 0@ vp 0 24 | 25 | jump @over 26 | 27 | :HUDHOOK 28 | hex 29 | 81 // sub 30 | EC // esp 31 | A0 01 00 00 // 0x1A0 32 | 33 | // stuff 34 | 68 // push imm32 35 | end 36 | :COLORHERE 37 | hex 38 | 00 00 00 00 // POINTER TO color 39 | 68 // push imm32 40 | 00 00 C8 42 // y4 41 | 68 // push imm32 42 | 00 00 C8 42 // x4 43 | 68 // push imm32 44 | 00 00 C8 42 // y3 45 | 68 // push imm32 46 | 00 00 48 43 // x3 47 | 68 // push imm32 48 | 00 00 C8 42 // y2 49 | 68 // push imm32 50 | 00 00 C8 42 // x2 51 | 68 // push imm32 52 | 00 00 00 00 // y1 53 | 68 // push imm32 54 | 00 00 00 00 // x1 55 | 56 | E8 // call (near, relative) 57 | end 58 | :HUCALL 59 | hex 60 | 00 00 00 00 61 | 62 | 58 // pop eax 63 | 58 // pop eax 64 | 58 // pop eax 65 | 58 // pop eax 66 | 58 // pop eax 67 | 58 // pop eax 68 | 58 // pop eax 69 | 58 // pop eax 70 | 58 // pop eax 71 | 72 | E9 // jmp near 73 | end 74 | :HUHOOKRETURNJUMP 75 | hex 76 | 00 00 00 00 77 | end 78 | :COLOR 79 | hex 80 | FF 00 00 FF 81 | end 82 | 83 | :over 84 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/plpanel.txt: -------------------------------------------------------------------------------- 1 | {$CLEO} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'PLHUDMO' 5 | 6 | :MAIN_LOOP 7 | 0001: wait 0 8 | 9 | 0006: 0@ = -1 // LOCALVAR ASSIGNMENT INT 10 | 0006: 8@ = 0 // LOCALVAR ASSIGNMENT INT 11 | 0006: 9@ = 1 // LOCALVAR ASSIGNMENT INT 12 | 001B: 700 > 32@ // LOCALVAR CMP INT 13 | 004D: jf @RESETBLINK 14 | 0019: 32@ > 500 // LOCALVAR CMP INT 15 | 004D: jf @SKIPBLINK 16 | 0006: 9@ = 0 // LOCALVAR ASSIGNMENT INT 17 | 0002: jump @SKIPBLINK 18 | :RESETBLINK 19 | 0006: 32@ = 0 // LOCALVAR ASSIGNMENT INT 20 | :SKIPBLINK 21 | 22 | 00DF: actor $PLAYER_ACTOR driving 23 | 004D: jf @NOCAR 24 | 03C0: 30@ = actor $PLAYER_ACTOR car 25 | 8119: not car 30@ wrecked 26 | 004D: jf @NOCAR 27 | 056E: car 30@ defined 28 | 004D: jf @NOCAR 29 | 00D6: if or 30 | 04A9: actor $PLAYER_ACTOR driving_heli 31 | 04AB: actor $PLAYER_ACTOR driving_plane 32 | 004D: jf @NOPLANE 33 | 0006: 8@ = 1 // LOCALVAR ASSIGNMENT INT 34 | :NOPLANE 35 | 0A97: 0@ = car 30@ struct 36 | 000A: 0@ += 0x4C0 37 | 0A8D: 0@ = read_memory 0@ size 4 virtual_protect 0 38 | 0092: 0@ = float 0@ to_integer 39 | 0174: 1@ = car 30@ Z_angle 40 | 0092: 1@ = float 1@ to_integer 41 | 06A2: get_car 30@ velocity_in_direction_XYZ 2@ 3@ 4@ 42 | 00AA: store_car 30@ position_to 5@ 6@ 7@ 43 | :NOCAR 44 | 45 | {$O 6C37=13,%1d% %2d% %3d% %4d% %5d% %6d% %7d% %8d% %9d% %10d% %11d% %12d% %13d%} 46 | 6C37: carhp 0@ carheading 1@ carspeedx 2@ carspeedy 3@ carspeedz 4@ carx 5@ cary 6@ carz 7@ isplane 8@ blink 9@ rewriteaddr 0@ changestuff 1@ hudhook 2@ 47 | 0019: 0@ > 0 // LOCALVAR CMP INT 48 | 004D: jump_if_false @NOREWRITE 49 | 0A8C: write_memory 0@ size 1 value 0xE8 virtual_protect 1 50 | 000A: 0@ += 1 // LOCALVAR PLUS INT 51 | 0A8C: write_memory 0@ size 4 value 1@ virtual_protect 1 52 | 53 | 0019: 2@ > 0 // LOCALVAR CMP INT 54 | 004D: jump_if_false @NOREWRITE 55 | 0A8C: write_memory 0x58EE9F size 1 value 0xE8 virtual_protect 1 56 | 0A8C: write_memory 0x58EEA0 size 4 value 2@ virtual_protect 1 57 | :NOREWRITE 58 | 59 | /* 60 | 0AB0: key_pressed 0x74 // F5 61 | 004D: jump_if_false @MAIN_LOOP 62 | {$O 6C36=0,} 63 | 6C36: 64 | */ 65 | 0002: jump @MAIN_LOOP 66 | 67 | 0A93: end_custom_thread 68 | -------------------------------------------------------------------------------- /cleoplugins/world2hud/opcodes.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | #include "rw.h" 3 | 4 | BOOL InitOpcodes() 5 | { 6 | return 7 | CLEO_RegisterOpcode(0x0C27, &Op_0C27) && 8 | CLEO_RegisterOpcode(0x0C28, &Op_0C28); 9 | } 10 | 11 | RwV3D TransformWorldXYZ(RwV3D world) { 12 | // partly based on https://github.com/multitheftauto/mtasa-blue/blob/9b1fbaf639657a446790469aa6711e11be0d3eee/MTA10/core/CGraphics.cpp#L498 13 | 14 | CMATRIX *cameraViewMatrix = (CMATRIX*)(0xB6FA2C); 15 | 16 | RwV3D screen; 17 | screen.x = world.z * cameraViewMatrix->three.x + world.y * cameraViewMatrix->two.x + world.x * cameraViewMatrix->one.x + cameraViewMatrix->four.x; 18 | screen.y = world.z * cameraViewMatrix->three.y + world.y * cameraViewMatrix->two.y + world.x * cameraViewMatrix->one.y + cameraViewMatrix->four.y; 19 | screen.z = world.z * cameraViewMatrix->three.z + world.y * cameraViewMatrix->two.z + world.x * cameraViewMatrix->one.z + cameraViewMatrix->four.z; 20 | 21 | float fRecip = 1.0f / screen.z; 22 | screen.x *= fRecip; 23 | screen.y *= fRecip; 24 | 25 | return screen; 26 | } 27 | 28 | OpcodeResult TransformPointFor0C270C28(CScriptThread *thread, int width, int height) { 29 | RwV3D world; 30 | world.x = CLEO_GetFloatOpcodeParam(thread); 31 | world.y = CLEO_GetFloatOpcodeParam(thread); 32 | world.z = CLEO_GetFloatOpcodeParam(thread); 33 | 34 | RwV3D screen = TransformWorldXYZ(world); 35 | 36 | CLEO_SetFloatOpcodeParam(thread, screen.x * width); 37 | CLEO_SetFloatOpcodeParam(thread, screen.y * height); 38 | return OR_CONTINUE; 39 | } 40 | 41 | // 0C27: transform world_xyz 1@ 2@ 3@ to hud_xy 4@ 5@ 42 | // {$O 0C27=5,transform world_xyz %1d% %2d% %3d% to hud_xy %4d% %5d%} 43 | OpcodeResult WINAPI Op_0C27(CScriptThread *thread) 44 | { 45 | return TransformPointFor0C270C28(thread, 640, 480); 46 | } 47 | 48 | // 0C28: transform world_xyz 1@ 2@ 3@ to screen_xy 4@ 5@ 49 | // {$O 0C28=5,transform world_xyz %1d% %2d% %3d% to screen_xy %4d% %5d%} 50 | OpcodeResult WINAPI Op_0C28(CScriptThread *thread) 51 | { 52 | DWORD *displayWidth = (DWORD*)(0xC17044); 53 | DWORD *displayHeight = (DWORD*)(0xC17048); 54 | return TransformPointFor0C270C28(thread, (*displayWidth), (*displayHeight)); 55 | } 56 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/README.md: -------------------------------------------------------------------------------- 1 | 2 | # plpanel 3 | 4 | mod that changes sa-mp textdraws, specifically for [the pilot's life server](http://thepilotslife.com/). 5 | 6 | Contains patches and has 3 themes with new features. 7 | 8 | ### Installation 9 | You need the [cleo 4](http://cleo.li) library. Put `plpanel.cs` and one of the `.cleo` files from the `Releases` folder in your CLEO folder. 10 | 11 | Features 12 | * Fixes fuel/health bars showing while on foot 13 | * Fixes heading bar having values like `-1 -0 [0] 1 2` or `358 359 [360] 361 362` 14 | * Changes 'Damage' to 'Health' 15 | * Per-frame instant updates for: heading bar, mission distance left, altitude, airspeed/car speed, vehicle health (both percentage and bar). This means (server) lag won't affect the update rate of the panel for these values! 16 | * Blinking fuel bar when fuel is 20% or less 17 | * Blinking health bar when health is 35% or less 18 | 19 | Standard theme 20 | ---------------- 21 | The normal bar as you probably know it, but with the patches. 22 | 23 | ![standard](https://user-images.githubusercontent.com/12662260/29479931-374aebbe-8475-11e7-9cf2-3c5b434d94f4.png) 24 | 25 | Classic theme 26 | -------------- 27 | Get that sweet 2011 feeling with this remake of the old panel! Extra features for this theme: 28 | * Passenger satisfaction included in panel instead of a separate textdraw 29 | * GPS position above radar 30 | * Blinking fuel/health/odo indicator when critical level almost reached 31 | 32 | ![classic](https://user-images.githubusercontent.com/12662260/29479911-24072ae0-8475-11e7-8d50-d816f0a36e38.png) 33 | 34 | Robin's theme 35 | --------------- 36 | Totally new panel 'design'. Extra features for this theme: 37 | * GPS position above radar 38 | * 'Native' progressbars for almost all values 39 | * Fuel price next to the fuel bar 40 | * Passenger satisfaction has its own bar 41 | * Blinkings fuel/health/odo bars when critical level almost reached 42 | * Classic themed status bar 43 | 44 | ![robin](https://user-images.githubusercontent.com/12662260/29479937-3b764f26-8475-11e7-947f-cc126c5f81f9.png) 45 | 46 | 47 | 48 | ### Credits 49 | This mod uses code from the [Plugin-SDK](https://github.com/DK22Pac/plugin-sdk) and [mod_sa](https://github.com/BlastHackNet/mod_s0beit_sa/). These portions are annotated in the source. 50 | -------------------------------------------------------------------------------- /cleo/snapshots/weathertables.CT: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 1 6 | "No description" 7 | 8 | 4 Bytes 9 |
gta_sa.exe+77CB20
10 |
11 | 12 | 2 13 | "No description" 14 | 15 | 4 Bytes 16 |
gta_sa.exe+77CB24
17 |
18 | 19 | 6 20 | "CWeather__M_wTownID" 21 | 22 | 4 Bytes 23 |
c81314
24 |
25 | 26 | 3 27 | "CWeather__LockedWeather" 28 | 29 | 4 Bytes 30 |
gta_sa.exe+881318
31 |
32 | 33 | 4 34 | "CWeather__Upcoming_Weather" 35 | 36 | 4 Bytes 37 |
gta_sa.exe+88131C
38 |
39 | 40 | 5 41 | "CWeater__CurrentWeather" 42 | 43 | 4 Bytes 44 |
gta_sa.exe+881320
45 |
46 | 47 | 7 48 | "CWeather__AmountOfRain" 49 | 50 | 4 Bytes 51 |
c81324
52 |
53 | 54 | 8 55 | "CWeather__m_bRain" 56 | 57 | 4 Bytes 58 |
c81324+4
59 |
60 |
61 | 62 |
63 | -------------------------------------------------------------------------------- /cleo/plhud/PLAHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace PLAHConsole 8 | { 9 | class PLAHelper 10 | { 11 | 12 | static void Main( string[] args ) 13 | { 14 | StreamReader i = new StreamReader("savedpositions.txt"); 15 | StreamWriter o = new StreamWriter( "plhudairports.txt", false ); 16 | o.Write(":AIRPORTS\r\nhex\r\n"); 17 | o.Write( convert( i.ReadToEnd() ) ); 18 | o.Write("\r\nend"); 19 | i.Close(); 20 | o.Close(); 21 | } 22 | 23 | static string convert(string savedpositions) { 24 | string res = ""; 25 | string[] lines = savedpositions.Split('\n', '\r'); 26 | string __l = ""; 27 | try { 28 | bool skip = false; 29 | foreach(string line in lines) { 30 | if( skip ) 31 | { 32 | skip = false; 33 | continue; 34 | } 35 | if( line.Length < 10 ) 36 | { 37 | continue; 38 | } 39 | if( line.StartsWith(";") ) 40 | { 41 | skip = true; 42 | continue; 43 | } 44 | __l = line; 45 | string[] parts = line.Split( ',' ); 46 | float x = float.Parse(parts[1].Replace('.', ',')); 47 | float y = float.Parse(parts[2].Replace('.', ',')); 48 | float z = float.Parse(parts[3].Replace('.', ',')) - 1f; 49 | string comment = line.Split( '/' )[2].Substring(1); 50 | res += f2h( x ) + " " + f2h(y) + " " + f2h(z); 51 | if( comment.Length == 0 ) 52 | { 53 | res += " "; 54 | } 55 | else 56 | { 57 | comment = comment + " (" + (int) z + " FT)"; 58 | res += " " + b2h( new byte[] { BitConverter.GetBytes( comment.Length + 1 )[0] } ); 59 | res += " \"" + comment.Replace(' ', '_') + "\""; 60 | res += " 00"; 61 | res += "\n"; 62 | } 63 | } 64 | } 65 | catch( Exception r ) 66 | { 67 | res = r.Message + "\n" + r.StackTrace + "\n" + __l; 68 | } 69 | res += "00000000"; 70 | return res; 71 | } 72 | 73 | static string f2h(float fNum) 74 | { 75 | return b2h(BitConverter.GetBytes( fNum )); 76 | } 77 | 78 | static string b2h( byte[] b ) 79 | { 80 | StringBuilder sb = new StringBuilder(); 81 | 82 | for( int i = 0; i < b.Length; i++ ) { 83 | sb.Append( b[i].ToString( "X2" ) ); 84 | } 85 | 86 | return sb.ToString(); 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/README.md: -------------------------------------------------------------------------------- 1 | Plugin that combines all my opcodes from my separate plugins, with some extra's that are not in a separate plugin. 2 | Find a prebuilt [yugecodes.cleo](bin/yugecodes.cleo) in the bin folder. 3 | 4 | ### List of opcodes 5 | sannybuilder macros: 6 | ``` 7 | {$O 0C26=2,sign_extend %1d% store_to %2d%} 8 | {$O 0C27=5,transform world_xyz %1d% %2d% %3d% to hud_xy %4d% %5d%} 9 | {$O 0C28=5,transform world_xyz %1d% %2d% %3d% to screen_xy %4d% %5d%} 10 | {$O 0C29=4,lerp_ab %1d% %2d% f %3d% store_to %4d%} 11 | {$O 0C30=12,draw_text %1d% at_screen_xy %2d% %3d% font %4d% proportional %5d% align %6d% RGBA %7d% %8d% %9d% %10d% letter_size %11d% %12d%} 12 | {$O 0C31=12,draw_text %1d% at_hud_xy %2d% %3d% font %4d% proportional %5d% align %6d% RGBA %7d% %8d% %9d% %10d% letter_size %11d% %12d%} 13 | {$O 0C32=5,condition_int %1d% EQ %2d% if_true %3d% if_false %4d% store_to %5d%} 14 | {$O 0C33=5,condition_float %1d% EQ %2d% if_true %3d% if_false %4d% store_to %5d%} 15 | {$O 0C34=5,condition_int %1d% GT %2d% if_true %3d% if_false %4d% store_to %5d%} 16 | {$O 0C35=5,condition_float %1d% GT %2d% if_true %3d% if_false %4d% store_to %5d%} 17 | ``` 18 | opcodelist: 19 | ``` 20 | 0C26: sign_extend 1@ store_to 2@ 21 | 0C27: transform world_xyz 1@ 2@ 3@ to hud_xy 4@ 5@ 22 | 0C28: transform world_xyz 1@ 2@ 3@ to screen_xy 4@ 5@ 23 | 0C29: lerp_ab 1@ 2@ f 3@ store_to 4@ 24 | 0C30: draw_text 1@ at_screen_xy 2@ 3@ font 4@ proportional 5@ align 6@ RGBA 7@ 8@ 9@ 10@ letter_size 11@ 12@ 25 | 0C31: draw_text 1@ at_hud_xy 2@ 3@ font 4@ proportional 5@ align 6@ RGBA 7@ 8@ 9@ 10@ letter_size 11@ 12@ 26 | 0C32: condition_int 1@ EQ 2@ if_true @TRUE if_false @FALSE store_to 3@ 27 | 0C33: condition_float 1@ EQ 2@ if_true @TRUE if_false @FALSE store_to 3@ 28 | 0C34: condition_int 1@ GT 2@ if_true @TRUE if_false @FALSE store_to 3@ 29 | 0C35: condition_float 1@ GT 2@ if_true @TRUE if_false @FALSE store_to 3@ 30 | ``` 31 | 32 | ### Containing plugins 33 | * [signext](../signext) 34 | * [world2hud](../world2hud) 35 | 36 | ### Extra opcodes 37 | * `0C29`: lerp 38 | * `0C30`: draw text like in textdraws, but with a literal string instead of GXT entry (outline does not seem to work) (unstable) 39 | * `0C31`: same as `0C30` but with HUD coordinates (640x480 canvas) (unstable) 40 | * `0C32-0C35`: conditionals, usage: 41 | ``` 42 | 0C32: condition_int 1@ EQ 0 if_true @TRUE if_false @FALSE store_to 2@ 43 | 0002: jump 2@ 44 | :TRUE 45 | // its true 46 | 0002: jump @WHEREVER 47 | :FALSE 48 | // its false 49 | 0002: jump @WHEREVER 50 | ``` 51 | 52 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/snoop.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "opcodes.h" 3 | 4 | #if SNOOP 5 | HANDLE hFile = NULL; 6 | 7 | void savetd(stTextdraw *td) 8 | { 9 | char buf[512]; 10 | sprintf(buf, "string %s\n\ 11 | letterwidth %x\n\ 12 | letterheight %x\n\ 13 | nlettercolor %x\n\ 14 | center %d\n\ 15 | box %d\n\ 16 | boxsizex %x\n\ 17 | boxsizey %x\n\ 18 | boxcolor %x\n\ 19 | proportional %x\n\ 20 | shadowcolor %x\n\ 21 | shadowsize %x\n\ 22 | outline %x\n\ 23 | left %x\n\ 24 | right %x\n\ 25 | font %x\n\ 26 | x %x\n\ 27 | y %x\n\ 28 | \n\n", 29 | td->szString, 30 | *(unsigned int*)&td->fLetterWidth, 31 | *(unsigned int*)&td->fLetterHeight, 32 | *(unsigned int*)&td->dwLetterColor, 33 | *(unsigned char*)&td->byteCenter, 34 | *(unsigned char*)&td->byteBox, 35 | *(unsigned int*)&td->fBoxSizeX, 36 | *(unsigned int*)&td->fBoxSizeY, 37 | *(unsigned int*)&td->dwBoxColor, 38 | *(unsigned char*)&td->byteProportional, 39 | *(unsigned int*)&td->dwShadowColor, 40 | *(unsigned char*)&td->byteShadowSize, 41 | *(unsigned char*)&td->byteOutline, 42 | *(unsigned char*)&td->byteLeft, 43 | *(unsigned char*)&td->byteRight, 44 | *(unsigned int*)&td->iStyle, 45 | *(unsigned int*)&td->fX, 46 | *(unsigned int*)&td->fY); 47 | DWORD w; 48 | WriteFile(hFile, buf, strlen(buf), &w, NULL); 49 | } 50 | 51 | OpcodeResult WINAPI op6C36(CScriptThread *thread) 52 | { 53 | static struct stSAMP *g_SAMP = NULL; 54 | 55 | if (g_SAMP == NULL) { 56 | g_SAMP = getSamp(); 57 | if (g_SAMP == NULL) { 58 | return OR_CONTINUE; 59 | } 60 | } 61 | 62 | if (g_SAMP->pPools == NULL) { 63 | return OR_CONTINUE; 64 | } 65 | 66 | if (g_SAMP->pPools == NULL || 67 | g_SAMP->pPools->pTextdraw == NULL) { 68 | return OR_CONTINUE; 69 | } 70 | 71 | if (hFile == NULL) { 72 | hFile = CreateFileA("tds.txt", FILE_GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); 73 | SetFilePointer(hFile, 0, NULL, FILE_END); 74 | } 75 | 76 | char buf[512]; 77 | 78 | DWORD w; 79 | sprintf(buf, "\n\n==== global\n"); 80 | WriteFile(hFile, buf, strlen(buf), &w, NULL); 81 | for (int i = 0; i < SAMP_MAX_TEXTDRAWS; i++) { 82 | if (g_SAMP->pPools->pTextdraw->iIsListed[i]) { 83 | savetd(g_SAMP->pPools->pTextdraw->textdraw[i]); 84 | } 85 | } 86 | 87 | sprintf(buf, "\n\n==== player\n"); 88 | WriteFile(hFile, buf, strlen(buf), &w, NULL); 89 | for (int i = 0; i < SAMP_MAX_PLAYERTEXTDRAWS; i++) { 90 | if (g_SAMP->pPools->pTextdraw->iPlayerTextDraw[i]) { 91 | savetd(g_SAMP->pPools->pTextdraw->playerTextdraw[i]); 92 | } 93 | } 94 | 95 | return OR_CONTINUE; 96 | } 97 | #endif 98 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/opcodes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define SNOOP 0 4 | 5 | #include "Stdafx.h" 6 | #include "CLEO.h" 7 | #include "samp.h" 8 | 9 | BOOL setupTextdraws(); 10 | BOOL InitOpcodes(); 11 | #if SNOOP 12 | OpcodeResult WINAPI op6C36(CScriptThread *thread); 13 | #endif 14 | OpcodeResult WINAPI op6C37(CScriptThread *thread); 15 | 16 | #define INVALID_TEXTDRAW (-1) 17 | #define TDHANDLER_ATTACH (1) 18 | #define TDHANDLER_UPDATE (2) 19 | 20 | #define THEME_STANDARD 1 21 | #define THEME_CLASSIC 2 22 | #define THEME_ROBIN 3 23 | 24 | // ---------------------- 25 | 26 | #if !defined THEME 27 | #define THEME THEME_ROBIN 28 | #endif 29 | //#define SNOOP 1 30 | //#define DOTRACE 1 31 | 32 | // ---------------------- 33 | 34 | #if DOTRACE 35 | #define TRACE1(x,y) {char dbgStr[200];sprintf(dbgStr, x, y);trace(dbgStr);} 36 | #define TRACE(x) TRACE1(x,0) 37 | void trace(const char *f); 38 | #else 39 | #define TRACE(x) 40 | #define TRACE1(x,y) 41 | #endif 42 | 43 | #define AIRSPEEDF(x) (14.5f*x/7.5f) 44 | #define AIRSPEED(x) (int)(AIRSPEEDF(x)) 45 | #define GROUNDSPEED(x) (int)(100.0f*x/27.8f) 46 | 47 | typedef void (*TDHANDLER)(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason); 48 | 49 | struct SPLHXTEXTDRAW 50 | { 51 | int iHandle; 52 | float fX; 53 | float fY; 54 | float fTargetX; 55 | float fTargetY; 56 | TDHANDLER handler; 57 | }; 58 | 59 | #define REPOSITION_ON_ATTACH() if(reason==TDHANDLER_ATTACH){samptd->fX=hxtd->fTargetX;samptd->fY=hxtd->fTargetY;return;} 60 | 61 | enum PLTEXTDRAWS 62 | { 63 | PLTD_FUEL, 64 | PLTD_DAMAGE, 65 | PLTD_STATUSBARBOX, 66 | PLTD_FUELDMGBOX, 67 | PLTD_FUELPRICE, 68 | PLTD_SATISF, 69 | PLTD_FUELBAR, 70 | PLTD_STATUSBAR, 71 | PLTD_DMGBAR, 72 | PLTD_ODO, 73 | PLTD_AIRSPEED, 74 | PLTD_ALTITUDE, 75 | PLTD_GPS, 76 | PLTD_DESTNEAREST, 77 | PLTD_FUELPCT, 78 | PLTD_DAMAGEPCT, 79 | PLTD_HEADING, 80 | PLTD_CARSPEED, 81 | PLTD_CARODO, 82 | PLTDCOUNT, 83 | }; 84 | 85 | inline int isplayertd(int td) { return td == PLTD_CARSPEED || td == PLTD_CARODO; } 86 | 87 | struct SGAMEDATA 88 | { 89 | int carhp; 90 | int carheading; 91 | float carspeedx; 92 | float carspeedy; 93 | float carspeedz; 94 | float carx; 95 | float cary; 96 | float carz; 97 | float carspeed; 98 | int missiondistance; 99 | int isplane; 100 | int blinkstatus; 101 | }; 102 | 103 | #define INCAR (gamedata.carhp != -1) 104 | #define ISPLANE (gamedata.isplane) 105 | 106 | void setupTD(int tdidx, unsigned int x, unsigned int y, unsigned int targetX, unsigned int targetY, TDHANDLER handler); 107 | 108 | extern SGAMEDATA gamedata; 109 | -------------------------------------------------------------------------------- /cleo/payandspray/CGarages__isVehicleAcceptedByPnS.asm: -------------------------------------------------------------------------------- 1 | .text:004479A0 ; =============== S U B R O U T I N E ======================================= 2 | .text:004479A0 3 | .text:004479A0 4 | .text:004479A0 CGarages__isVehicleAcceptedByPnS proc near 5 | .text:004479A0 ; CODE XREF: CGarage__?vehicleEntered+225p 6 | .text:004479A0 7 | .text:004479A0 arg_0 = dword ptr 8 8 | .text:004479A0 9 | .text:004479A0 000 push esi 10 | .text:004479A1 004 mov esi, [esp+arg_0] 11 | .text:004479A5 004 mov ecx, esi 12 | .text:004479A7 004 call CVehicle__IsLawEnforcementVehicle 13 | .text:004479AC 004 test al, al 14 | .text:004479AE 004 jnz short loc_4479E2 15 | .text:004479B0 004 cmp dword ptr [esi+594h], 0Ah 16 | .text:004479B7 004 jz short loc_4479E2 17 | .text:004479B9 004 movsx eax, word ptr [esi+22h] 18 | .text:004479BD 004 cmp eax, 431 ; bus 19 | .text:004479C2 004 ja short loc_4479D2 20 | .text:004479C4 004 jz short loc_4479E2 21 | .text:004479C6 004 sub eax, 407 ; firetruk 22 | .text:004479CB 004 jz short loc_4479E2 23 | .text:004479CD 004 sub eax, 9 ; ambulan 24 | .text:004479D0 004 jmp short loc_4479DC 25 | .text:004479D2 ; --------------------------------------------------------------------------- 26 | .text:004479D2 27 | .text:004479D2 loc_4479D2: ; CODE XREF: CGarages__isVehicleAcceptedByPnS+22j 28 | .text:004479D2 004 cmp eax, 437 ; coach 29 | .text:004479D7 004 jz short loc_4479E2 30 | .text:004479D9 004 cmp eax, -2 ; artict1 31 | .text:004479DC 32 | .text:004479DC loc_4479DC: ; CODE XREF: CGarages__isVehicleAcceptedByPnS+30j 33 | .text:004479DC 004 jz short loc_4479E2 34 | .text:004479DE 004 mov al, 1 35 | .text:004479E0 004 pop esi 36 | .text:004479E1 000 retn 37 | .text:004479E2 ; --------------------------------------------------------------------------- 38 | .text:004479E2 39 | .text:004479E2 loc_4479E2: ; CODE XREF: CGarages__isVehicleAcceptedByPnS+Ej 40 | .text:004479E2 ; CGarages__isVehicleAcceptedByPnS+17j 41 | .text:004479E2 ; CGarages__isVehicleAcceptedByPnS+24j 42 | .text:004479E2 ; CGarages__isVehicleAcceptedByPnS+2Bj ... 43 | .text:004479E2 004 xor al, al 44 | .text:004479E4 004 pop esi 45 | .text:004479E5 000 retn 46 | .text:004479E5 CGarages__isVehicleAcceptedByPnS endp -------------------------------------------------------------------------------- /cleo/pickuprevealer/pickuprevealer.txt: -------------------------------------------------------------------------------- 1 | {$CLEO} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'PICKUPR' 5 | 6 | const 7 | PLAYA_X = 13@ 8 | PLAYA_Y = 14@ 9 | PLAYA_Z = 15@ 10 | DISTANCE = 16@ 11 | PTR = 17@ 12 | TEMP1 = 31@ 13 | TEMP2 = 32@ 14 | TEMP3 = 33@ 15 | end 16 | 17 | 03F0: enable_text_draw 1 18 | 19 | :MAIN_LOOP 20 | wait 0 21 | 22 | 00A0: store_actor $PLAYER_ACTOR position_to PLAYA_X PLAYA_Y PLAYA_Z 23 | 24 | // read pickups stuff 25 | 0006: PTR = 0x9788C0 26 | :DO_PICKUP 27 | 0085: TEMP1 = PTR // (int) 28 | 000A: TEMP1 += 0x1C // type 29 | 0A8D: TEMP1 = read_memory TEMP1 size 1 vp 0 30 | 00D6: if and 31 | 8039: not TEMP1 == 0 // l==i (int) 32 | 8039: not TEMP1 == 15 // l==i (int) 33 | 004D: jump_if_false @NEXT_PICKUP 34 | 0085: TEMP1 = PTR // (int) 35 | 000A: TEMP1 += 0xE // X - 0x2 36 | 0050: gosub @READ_TEMP1_SIGNEXT_STORETO_TEMP2 37 | 0087: 0@ = TEMP2 // (float) 38 | 0050: gosub @READ_TEMP1_SIGNEXT_STORETO_TEMP2 39 | 0087: 1@ = TEMP2 // (float) 40 | 0050: gosub @READ_TEMP1_SIGNEXT_STORETO_TEMP2 41 | 0087: 2@ = TEMP2 // (float) 42 | 0050: gosub @DRAW 43 | :NEXT_PICKUP 44 | 000A: PTR += 0x20 45 | 0029: PTR >= 0x97D640 46 | 004D: jump_if_false @DO_PICKUP 47 | 0002: jump @MAIN_LOOP 48 | 49 | :READ_TEMP1_SIGNEXT_STORETO_TEMP2 50 | 000A: TEMP1 += 0x2 51 | 0A8D: TEMP2 = read_memory TEMP1 size 2 vp 0 52 | :SIGNEXT 53 | 08B7: test TEMP2 bit 15 54 | 004D: jump_if_false @SIGNEXT2 55 | 0006: TEMP3 = 15 56 | :SIGNEXT0 57 | 000A: TEMP3 += 1 58 | 08BF: set TEMP2 bit TEMP3 59 | 0019: TEMP3 > 31 60 | 004D: jump_if_false @SIGNEXT0 61 | :SIGNEXT2 62 | 0093: TEMP2 = integer TEMP2 to_float 63 | 0017: TEMP2 /= 8.0 64 | return 65 | 66 | :DRAW 67 | 050A: DISTANCE = distance_between_XYZ 0@ 1@ 2@ and_XYZ PLAYA_X PLAYA_Y PLAYA_Z 68 | 69 | 0006: 21@ = 0xB6FA2C // l=i (int) 70 | for 20@ = 0 to 2 71 | 0007: 10@(20@,1i) = 0.0 // l=i (float) 72 | for 22@ = 0 to 2 73 | 0087: 3@ = 0@(22@,1i) // l=l (float) 74 | 0A8D: 4@ = read_memory 21@ size 4 vp 0 // _11/_12/_13 _21/_22/_23 _31/_32/_33 75 | 006B: 3@ *= 4@ // l*=l (float) 76 | 000A: 21@ += 0x10 // l+=i (int) 77 | 005B: 10@(20@,1i) += 3@ // l+=l (float) 78 | end 79 | 0A8D: 4@ = read_memory 21@ size 4 vp 0 // _41/_42/_43 80 | 000E: 21@ -= 0x2C // l-=i (int) 81 | 005B: 10@(20@,1i) += 4@ // l+=l (float) 82 | end 83 | 0087: 2@ = 12@ // l=l (float) 84 | 0007: 0@ = 640.0 // l=i (float) 85 | 0007: 1@ = 448.0 // l=i (float) 86 | 006B: 0@ *= 10@ // l*=l (float) 87 | 006B: 1@ *= 11@ // l*=l (float) 88 | 89 | 0021: 2@ > 0.0 // l>i (float) 90 | 004D: jump_if_false @SKIP_CURRENT 91 | 92 | 0073: 0@ /= 2@ // l/=l (float) 93 | 0073: 1@ /= 2@ // l/=l (float) 94 | 95 | 0342: set_text_draw_centered 1 96 | 081C: draw_text_outline 1 RGBA 0 0 0 255 97 | 0340: set_text_draw_RGBA 50 255 50 255 98 | 033F: set_text_draw_letter_size 0.125 0.8 99 | 0092: DISTANCE = float DISTANCE to_integer 100 | 045A: draw_text_1number 0@ 1@ GXT 'NUMBER' number DISTANCE // ~1~ 101 | 102 | :SKIP_CURRENT 103 | return 104 | 105 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleo/pickuprevealer/pickuprevealermoneybag.txt: -------------------------------------------------------------------------------- 1 | {$CLEO} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'PICKUPR' 5 | 6 | const 7 | PLAYA_X = 13@ 8 | PLAYA_Y = 14@ 9 | PLAYA_Z = 15@ 10 | DISTANCE = 16@ 11 | PTR = 17@ 12 | TEMP1 = 31@ 13 | TEMP2 = 32@ 14 | TEMP3 = 33@ 15 | end 16 | 17 | 03F0: enable_text_draw 1 18 | 19 | :MAIN_LOOP 20 | wait 0 21 | 22 | 00A0: store_actor $PLAYER_ACTOR position_to PLAYA_X PLAYA_Y PLAYA_Z 23 | 24 | // read pickups stuff 25 | 0006: PTR = 0x9788C0 26 | :DO_PICKUP 27 | 0085: TEMP1 = PTR // (int) 28 | 000A: TEMP1 += 0x1C // type 29 | 0A8D: TEMP1 = read_memory TEMP1 size 1 vp 0 30 | 00D6: if and 31 | 8039: not TEMP1 == 0 // l==i (int) 32 | 8039: not TEMP1 == 15 // l==i (int) 33 | 004D: jump_if_false @NEXT_PICKUP 34 | 0085: TEMP1 = PTR // (int) 35 | 000A: TEMP1 += 0x18 36 | 0A8D: TEMP1 = read_memory TEMP1 size 2 vp 0 37 | 0039: TEMP1 == 1550 // l==i (int) 38 | 004D: jump_if_false @NEXT_PICKUP 39 | 0085: TEMP1 = PTR // (int) 40 | 000A: TEMP1 += 0xE // X - 0x2 41 | 0050: gosub @READ_TEMP1_SIGNEXT_STORETO_TEMP2 42 | 0087: 0@ = TEMP2 // (float) 43 | 0050: gosub @READ_TEMP1_SIGNEXT_STORETO_TEMP2 44 | 0087: 1@ = TEMP2 // (float) 45 | 0050: gosub @READ_TEMP1_SIGNEXT_STORETO_TEMP2 46 | 0087: 2@ = TEMP2 // (float) 47 | 0050: gosub @DRAW 48 | :NEXT_PICKUP 49 | 000A: PTR += 0x20 50 | 0029: PTR >= 0x97D640 51 | 004D: jump_if_false @DO_PICKUP 52 | 0002: jump @MAIN_LOOP 53 | 54 | :READ_TEMP1_SIGNEXT_STORETO_TEMP2 55 | 000A: TEMP1 += 0x2 56 | 0A8D: TEMP2 = read_memory TEMP1 size 2 vp 0 57 | :SIGNEXT 58 | 08B7: test TEMP2 bit 15 59 | 004D: jump_if_false @SIGNEXT2 60 | 0006: TEMP3 = 15 61 | :SIGNEXT0 62 | 000A: TEMP3 += 1 63 | 08BF: set TEMP2 bit TEMP3 64 | 0019: TEMP3 > 31 65 | 004D: jump_if_false @SIGNEXT0 66 | :SIGNEXT2 67 | 0093: TEMP2 = integer TEMP2 to_float 68 | 0017: TEMP2 /= 8.0 69 | return 70 | 71 | :DRAW 72 | 050A: DISTANCE = distance_between_XYZ 0@ 1@ 2@ and_XYZ PLAYA_X PLAYA_Y PLAYA_Z 73 | 74 | 0006: 21@ = 0xB6FA2C // l=i (int) 75 | for 20@ = 0 to 2 76 | 0007: 10@(20@,1i) = 0.0 // l=i (float) 77 | for 22@ = 0 to 2 78 | 0087: 3@ = 0@(22@,1i) // l=l (float) 79 | 0A8D: 4@ = read_memory 21@ size 4 vp 0 // _11/_12/_13 _21/_22/_23 _31/_32/_33 80 | 006B: 3@ *= 4@ // l*=l (float) 81 | 000A: 21@ += 0x10 // l+=i (int) 82 | 005B: 10@(20@,1i) += 3@ // l+=l (float) 83 | end 84 | 0A8D: 4@ = read_memory 21@ size 4 vp 0 // _41/_42/_43 85 | 000E: 21@ -= 0x2C // l-=i (int) 86 | 005B: 10@(20@,1i) += 4@ // l+=l (float) 87 | end 88 | 0087: 2@ = 12@ // l=l (float) 89 | 0007: 0@ = 640.0 // l=i (float) 90 | 0007: 1@ = 448.0 // l=i (float) 91 | 006B: 0@ *= 10@ // l*=l (float) 92 | 006B: 1@ *= 11@ // l*=l (float) 93 | 94 | 0021: 2@ > 0.0 // l>i (float) 95 | 004D: jump_if_false @SKIP_CURRENT 96 | 97 | 0073: 0@ /= 2@ // l/=l (float) 98 | 0073: 1@ /= 2@ // l/=l (float) 99 | 100 | 0342: set_text_draw_centered 1 101 | 081C: draw_text_outline 1 RGBA 0 0 0 255 102 | 0340: set_text_draw_RGBA 50 255 50 255 103 | 033F: set_text_draw_letter_size 0.125 0.8 104 | 0092: DISTANCE = float DISTANCE to_integer 105 | 045A: draw_text_1number 0@ 1@ GXT 'NUMBER' number DISTANCE // ~1~ 106 | 107 | :SKIP_CURRENT 108 | return 109 | 110 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleoplugins/plpanel/commonhandlers.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "opcodes.h" 3 | #include "util.h" 4 | 5 | void headinghandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 6 | { 7 | TRACE("headinghandler\n"); 8 | REPOSITION_ON_ATTACH(); 9 | if (!INCAR) { 10 | return; 11 | } 12 | int n[7]; 13 | for (int i = 0; i < 7; i++) { 14 | n[i] = (360 - gamedata.carheading) - 3 + i; 15 | if (n[i] < 1) n[i] += 360; 16 | if (n[i] > 360) n[i] -= 360; 17 | } 18 | sprintf(samptd->szText, "%03d %03d %03d [%03d] %03d %03d %03d", n[0], n[1], n[2], n[3], n[4], n[5], n[6]); 19 | memcpy(samptd->szString, samptd->szText, 50); 20 | } 21 | 22 | void removehandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 23 | { 24 | TRACE("removehandler\n"); 25 | REPOSITION_ON_ATTACH(); 26 | } 27 | 28 | void boxremovehandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 29 | { 30 | TRACE("boxremovehandler\n"); 31 | if (reason == TDHANDLER_ATTACH) { 32 | samptd->byteBox = 0; 33 | samptd->fX = hxtd->fTargetX; 34 | samptd->fY = hxtd->fTargetY; 35 | return; 36 | } 37 | } 38 | 39 | void carspeedtdhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 40 | { 41 | TRACE("carspeedtdhandler\n"); 42 | REPOSITION_ON_ATTACH(); 43 | if (!INCAR) { 44 | return; 45 | } 46 | sprintf(&samptd->szText[13], "%d KPH", GROUNDSPEED(gamedata.carspeed)); 47 | memcpy(&samptd->szString[13], &samptd->szText[13], 10); 48 | } 49 | 50 | void progressbarpatchhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 51 | { 52 | TRACE("progressbarpatchhandler\n"); 53 | REPOSITION_ON_ATTACH(); 54 | samptd->szText[0] = '_'; 55 | samptd->szString[0] = '_'; 56 | if (!INCAR) { 57 | samptd->dwBoxColor &= 0x00ffffff; 58 | } else { 59 | samptd->dwBoxColor |= 0xff000000; 60 | } 61 | } 62 | 63 | void damagebarhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 64 | { 65 | TRACE("damagebarhandler\n"); 66 | REPOSITION_ON_ATTACH(); 67 | progressbarpatchhandler(hxtd, samptd, reason); 68 | if (!INCAR) { 69 | return; 70 | } 71 | samptd->fBoxSizeX = 569.0f + (float) gamedata.carhp * 63.0f / 1000.0f; 72 | } 73 | 74 | void damagepatchhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 75 | { 76 | TRACE("damagepatchhandler\n"); 77 | REPOSITION_ON_ATTACH(); 78 | if (!INCAR) { 79 | return; 80 | } 81 | sprintf(samptd->szText, " Health"); 82 | memcpy(samptd->szString, samptd->szText, 12); 83 | } 84 | 85 | void destnearesthandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason, char *destnearstr) 86 | { 87 | destnearstr[0] = 0; 88 | TRACE("destnearesthandler\n"); 89 | REPOSITION_ON_ATTACH(); 90 | if (!INCAR) { 91 | return; 92 | } 93 | if (gamedata.missiondistance != -1) { 94 | sprintf(destnearstr, "~b~Distance~b~ ~w~%d M", gamedata.missiondistance); 95 | return; 96 | } 97 | // rescue!! 98 | if (strncmp(samptd->szText, "Destination (", 13) == 0) { 99 | int distance = simplestrval(samptd->szText, 13); 100 | sprintf(destnearstr, "~b~Distance~b~ ~w~%d M", distance); 101 | return; 102 | } 103 | if (strncmp(samptd->szText, "Nearest Airport (", 17) != 0) { 104 | return; 105 | } 106 | int idx = 18; 107 | int chars = 0; 108 | while (true) { 109 | if (samptd->szText[idx] == 'M') { 110 | chars = sprintf(destnearstr, "~b~%s ", &(samptd->szText[idx + 8])); 111 | break; 112 | } 113 | idx++; 114 | if (idx > 23) { 115 | return; 116 | } 117 | } 118 | if (chars == -1) { 119 | destnearstr[0] = 0; 120 | return; 121 | } 122 | int srcidx = 16; 123 | if (samptd->szText[srcidx] != '(') { 124 | return; 125 | } 126 | while (true) { 127 | char c = samptd->szText[srcidx++]; 128 | destnearstr[chars++] = c; 129 | if (c == ')' || srcidx > 25) { 130 | break; 131 | } 132 | } 133 | destnearstr[chars] = 0; 134 | } 135 | -------------------------------------------------------------------------------- /tools/asm/README.md: -------------------------------------------------------------------------------- 1 | 2 | # asmtool 3 | 4 | tool to help with putting asm in cleo scripts 5 | 6 | Example usage 7 | ------------- 8 | 9 | Let's say you want to hook on this call 10 | ``` 11 | .text:005869BF call _?paintMapZones 12 | ``` 13 | so you put 005869C0 in the bottom right small box and tick 'jump' 14 | 15 | Then you come up with this genius code: 16 | ``` 17 | call 0x586650 ; _?paintMapZones 0x586650 ; make the call that got rewritten 18 | 19 | ; do something 20 | push 0 21 | call 0x56E210 ; CPed *__cdecl getPlayerPed(int number) 22 | mov [_var01], eax ; save the ped to some var 23 | add esp, 0x4 24 | ; more code and awesome stuff 25 | 26 | jmp 0x5869C4 ; back to business, continue right after the hooked call 27 | ``` 28 | 29 | Press the 'Do it all' button (after you made sure the gcc & objdump paths are correct, duh) and magic code appears: 30 | 31 | ``` 32 | :HOOKER 33 | 0AC6: 0@ = label @ENTRY offset 34 | 35 | 0085: 1@ = 0@ // (int) 36 | 000E: 1@ -= 0x005869c4 37 | 0A8C: write_memory 0x005869bf size 1 value 0xE9 vp 0 38 | 0A8C: write_memory 0x005869C0 size 4 value 1@ vp 0 39 | 40 | 0AC6: 1@ = label @ENTRY offset 41 | 42 | 000A: 1@ += 1 43 | 0A8D: 2@ = read_memory 1@ size 4 vp 0 44 | 0062: 2@ -= 0@ // (int) 45 | 0A8C: write_memory 1@ size 4 value 2@ vp 0 46 | 000A: 1@ += 7 47 | 0A8D: 2@ = read_memory 1@ size 4 vp 0 48 | 0062: 2@ -= 0@ // (int) 49 | 0A8C: write_memory 1@ size 4 value 2@ vp 0 50 | 000A: 1@ += 5 51 | 0AC6: 3@ = label @DATA01 offset 52 | 0A8C: write_memory 1@ size 4 value 3@ vp 0 53 | 000A: 1@ += 8 54 | 0A8D: 2@ = read_memory 1@ size 4 vp 0 55 | 0062: 2@ -= 0@ // (int) 56 | 0A8C: write_memory 1@ size 4 value 2@ vp 0 57 | 58 | 0002: jump @NOMOREHOOKER 59 | 60 | 61 | :ENTRY 62 | hex 63 | e8 64 | 4b 66 58 00 65 | 6a 00 66 | e8 67 | 04 e2 56 00 68 | a3 69 | 00 00 00 00 // DATA01 70 | 83 c4 04 71 | e9 72 | ab 69 58 00 73 | 90 74 | 90 75 | 90 76 | end 77 | ``` 78 | 79 | So put this somewhere and jump to `@HOOKER` to hook the stuff and it will return to `:NOMOREHOOKER` when it's done hooking da hook. 80 | Also reserve some bytes for the `_var01`: 81 | 82 | ``` 83 | :DATA01 84 | hex 85 | 00 00 00 00 86 | end 87 | ``` 88 | 89 | Command line usage 90 | ------------------ 91 | 92 | It's also possible to call this program with an input file as single argument. Then you must specify options in that input file as comments (can be anywhere in that file): 93 | 94 | ``` 95 | ; _ASM_HOOKADDR: 0058EAF1 96 | ; _ASM_JUMP: true 97 | ; _ASM_CORRECT_OFFSETS: true 98 | ; _ASM_COMMENTS: false 99 | ; _ASM_GCC: S:\broftware\perl\c\bin\gcc.exe 100 | ; _ASM_OBJDUMP: S:\broftware\perl\c\bin\objdump.exe 101 | ; _ASM_TARGETFILE: plnewhud-asm.txt 102 | ; _ASM_PREPROCONLY: false 103 | ; _ASM_LF: true 104 | ``` 105 | 106 | Not all options are required. 107 | 108 | If some error happend, the gui will pop open with the error message. 109 | 110 | Preprocessor 111 | ------------ 112 | 113 | It is also possible to do some preprocessor-like replacements: 114 | ``` 115 | ; _DEFINE:mem_addr=0x719510 116 | ``` 117 | 118 | This will literal replace `mem_addr` to `0x71951`. Note that is tries to not replace things that should not be replaced; e.g. `some_mem_addr` will _not_ be replaced to `some_0x71951`. 119 | 120 | Use `; _ASM_PREPROCONLY: true` to only let the preprocessor run (also applies when using the gui). 121 | 122 | ### Predefined constants 123 | 124 | * `__BASEADDR` will point to the address where the script is placed 125 | 126 | Multiple files 127 | -------------- 128 | 129 | ``` 130 | ; _ASM_INCLUDE: otherfile.asm 131 | ``` 132 | 133 | Can be relative, can be absolute, can have any extension. 134 | 135 | Caveats 136 | ------- 137 | 138 | * things like `mov edx, [eax+_var03]` won't work 139 | * same with `mov edx, [edi*4+__BASEOFFSET+somelabel]` 140 | 141 | --- 142 | 143 | this was used for [gps](../../cleo/gps) and [plhud](../../cleo/plhud) and stuff 144 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/samp.h: -------------------------------------------------------------------------------- 1 | /* 2 | following structs in this file are from the mod_sa project 3 | 4 | PROJECT: mod_sa 5 | COPYRIGHT: Copyright we_sux, BlastHack 6 | mod_sa is available from https://github.com/BlastHackNet/mod_s0beit_sa/ 7 | mod_sa is free software: you can redistribute it and/or modify 8 | it under the terms of the GNU General Public License as published by 9 | the Free Software Foundation, either version 3 of the License, or 10 | (at your option) any later version. 11 | mod_sa is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | You should have received a copy of the GNU General Public License 16 | along with mod_sa. If not, see . 17 | */ 18 | 19 | #include "stuff.h" 20 | #include "windows.h" 21 | 22 | enum Limits 23 | { 24 | SAMP_MAX_ACTORS = 1000, 25 | SAMP_MAX_PLAYERS = 1004, 26 | SAMP_MAX_VEHICLES = 2000, 27 | SAMP_MAX_PICKUPS = 4096, 28 | SAMP_MAX_OBJECTS = 1000, 29 | SAMP_MAX_GANGZONES = 1024, 30 | SAMP_MAX_3DTEXTS = 2048, 31 | SAMP_MAX_TEXTDRAWS = 2048, 32 | SAMP_MAX_PLAYERTEXTDRAWS = 256, 33 | SAMP_MAX_CLIENTCMDS = 144, 34 | SAMP_MAX_MENUS = 128, 35 | SAMP_MAX_PLAYER_NAME = 24, 36 | SAMP_ALLOWED_PLAYER_NAME_LENGTH = 20, 37 | }; 38 | 39 | #pragma pack(push, 1) 40 | struct stSAMPPools 41 | { 42 | void *unk1; /*0.3.7-R4*/ 43 | void *unk2; /*0.3.7-R4*/ 44 | void *unk3; /*0.3.7-R4*/ 45 | void *unk4; /*0.3.7-R4*/ 46 | void *pActor; // stActorPool 47 | void *pObject; // stObjectPool 48 | void *pGangzone; // stGangzonePool 49 | void *pText3D; // stTextLabelPool 50 | struct stTextdrawPool *pTextdraw; 51 | void *pPlayerLabels; 52 | void *pPlayer; // stPlayerPool 53 | void *pVehicle; // stVehiclePool 54 | void *pPickup; // stPickupPool 55 | }; 56 | 57 | struct stSAMP 58 | { 59 | void *pUnk0; 60 | void *pServerInfo; // stServerInfo 61 | char byteSpace[24]; 62 | char pad[16]; /*since 0.3.7-R4*/ 63 | char szIP[257]; 64 | char szHostname[259]; 65 | BYTE bNametagStatus; // changes by /nametagstatus // is bool, shown as byte for 1 byte emphasis 66 | unsigned int ulPort; 67 | 68 | char padddd[421]; 69 | 70 | /* +3D5? */ 71 | //void *pSettings; // stServerPresets 72 | 73 | /* +3E8 */ 74 | //void *pRakClientInterface; 75 | struct stSAMPPools *pPools; 76 | }; 77 | 78 | struct stTextdraw 79 | { 80 | char szText[800 + 1]; 81 | char szString[1600 + 2]; 82 | float fLetterWidth; 83 | float fLetterHeight; 84 | DWORD dwLetterColor; 85 | char byte_unk; // always = 01 (?) (justified?) 86 | BYTE byteCenter; 87 | BYTE byteBox; 88 | float fBoxSizeX; 89 | float fBoxSizeY; 90 | DWORD dwBoxColor; 91 | BYTE byteProportional; 92 | DWORD dwShadowColor; 93 | BYTE byteShadowSize; 94 | BYTE byteOutline; 95 | BYTE byteLeft; 96 | BYTE byteRight; 97 | int iStyle; // font style/texture/model 98 | float fX; 99 | float fY; 100 | BYTE unk[8]; 101 | DWORD dword99B; // -1 by default 102 | DWORD dword99F; // -1 by default 103 | DWORD index; // -1 if bad 104 | BYTE byte9A7; // = 1; 0 by default 105 | UINT16 sModel; 106 | float fRot[3]; 107 | float fZoom; 108 | WORD sColor[2]; 109 | BYTE f9BE; 110 | BYTE byte9BF; 111 | BYTE byte9C0; 112 | DWORD dword9C1; 113 | DWORD dword9C5; 114 | DWORD dword9C9; 115 | DWORD dword9CD; 116 | BYTE byte9D1; 117 | DWORD dword9D2; 118 | }; 119 | EXPECT_SIZE(struct stTextdraw, 0x9D6); 120 | 121 | struct stTextdrawPool 122 | { 123 | int iIsListed[SAMP_MAX_TEXTDRAWS]; 124 | int iPlayerTextDraw[SAMP_MAX_PLAYERTEXTDRAWS]; 125 | struct stTextdraw *textdraw[SAMP_MAX_TEXTDRAWS]; 126 | struct stTextdraw *playerTextdraw[SAMP_MAX_PLAYERTEXTDRAWS]; 127 | }; 128 | #pragma pack(pop) 129 | 130 | stSAMP *getSamp(); 131 | -------------------------------------------------------------------------------- /scm/cameraexport/scr.txt: -------------------------------------------------------------------------------- 1 | 2 | 03A4: name_thread 'MAIN' 3 | 01F0: set_max_wanted_level_to 0 4 | 0111: toggle_wasted_busted_check 0 5 | 00C0: set_current_time_hours_to 8 minutes_to 0 6 | 04E4: unknown_refresh_game_renderer_at 2785.3813 1821.3121 7 | 03CB: set_rendering_origin_at 2785.3813 1821.3121 10.8203 8 | 0053: $PLAYER_CHAR = create_player #NULL at 2785.3813 1821.3121 10.8203 9 | 01F5: $PLAYER_ACTOR = create_player_actor $PLAYER_CHAR 10 | 07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 11 | 0373: set_camera_directly_behind_player 12 | 01B6: set_weather 0 13 | 0001: wait 0 ms 14 | 087B: set_player $PLAYER_CHAR clothes_texture "PLAYER_FACE" model "HEAD" body_part 1 15 | 087B: set_player $PLAYER_CHAR clothes_texture "worktrcamogrn" model "worktr" body_part 2 16 | 087B: set_player $PLAYER_CHAR clothes_texture "sneakerprowht" model "SNEAKER" body_part 3 17 | 087B: set_player $PLAYER_CHAR clothes_texture "hatmancblk" model "hatmanc" body_part 16 18 | 087B: set_player $PLAYER_CHAR clothes_texture "glasses04dark" model "glasses04" body_part 15 19 | 087B: set_player $PLAYER_CHAR clothes_texture "player_torso" model "torso" body_part 0 20 | 070D: rebuild_player $PLAYER_CHAR 21 | 01B4: toggle_player $PLAYER_CHAR can_move 1 22 | 016A: fade 1 time 0 23 | 04BB: select_interior 0 24 | 016C: restart_if_wasted_at 2032.1702 -1416.7808 16.9922 angle 133.0 town_number 0 25 | 016D: restart_if_busted_at 2492.6692 -1670.1124 13.3359 angle 0.0 town_number 0 26 | 0180: set_on_mission_flag_to $ONMISSION // Note: your missions have to use the variable defined here 27 | 0004: $DEFAULT_WAIT_TIME = 250 28 | 29 | 015F: set_camera_position 2772.6509 1816.0591 15.8203 rotation 30.0 0.0 0.0 30 | //093D: lock_camera_on_cinematic_view 1 31 | 092F: lock_camera_target_point 1 32 | 0930: lock_camera_position 1 33 | //0931: lock_camera_zoom 1 34 | //0A13: unknown_sync_player_camera 35 | 36 | // wxorking stuff 37 | //0922: set_camera_zoom_from 70.0 to 100.0 timelimit 10000 smooth_transition 1 38 | //099C: jiggle_camera type 10 timelimit 20000.0 intensity 5.0 39 | //0920: point_camera 2359.521 -1246.843 28.7047 transverse_to -2772.6509 1816.0591 15.8203 time 7000 smooth_transition 1 40 | //0936: set_camera 2358.656 -1246.348 28.7884 position_to 2772.6509 1816.0591 15.8203 time 7000 smooth_transition 1 41 | //0003: shake_camera 4000 42 | //099C: jiggle_camera type 0 timelimit 20000.0 intensity 5.0 43 | // NO 8 44 | // 9 WTF COLOR 45 | // 10 weird, need to move mouse 46 | // 11 WTF COLOR 47 | // 12 crash 48 | 49 | //0920: point_camera 0.0 0.0 100.0 transverse_to 0.0 0.0 100.0 time 10000 smooth_transition 0 50 | //0936: set_camera -1000.0 0.0 100.0 position_to -100.0 -100.0 100.0 time 10000 smooth_transition 0 51 | 52 | 0920: point_camera 0.0 0.0 100.0 transverse_to 0.0 0.0 100.0 time 10000 smooth_transition 0 53 | 0936: set_camera 0.0 -100.0 100.0 position_to 0.0 -100.0 100.0 time 10000 smooth_transition 0 54 | 55 | 33@ = 0 56 | //099C: jiggle_camera type 0 timelimit 20000.0 intensity 15.0 57 | 58 | :MAIN_LOOP 59 | wait 250 60 | 00BF: $TIME_HOURS = current_time_hours, $TIME_MINS = current_time_minutes 61 | 62 | 001B: 11000 > 33@ // i>l (int) 63 | jf @MAIN_LOOP 64 | 65 | 801B: not 10500 > 33@ // i>l (int) 66 | jf @DOSTUFF 67 | {$O 0DE0=0,} 68 | 0DE0: 69 | 0002: jump @MAIN_LOOP 70 | :DOSTUFF 71 | 72 | 068D: get_camera_position_to 4@ 5@ 6@ 73 | 068E: get_camera_target_point_to 7@ 8@ 19@ 74 | 75 | {$O 0DDF=20,%1d% %2d% %3d% %4d% %5d% %6d% %7d% %8d% %9d% %10d% %11d% %12d% %13d% %14d% %15d% %16d% %17d% %18d% %19d% %20d%} 76 | 2@ = 0xB6FA2C 77 | for 0@ = 0 to 15 78 | 0A8D: 10@(0@,1i) = read_memory 2@ size 4 virtual_protect 0 79 | 2@ += 4 80 | end 81 | 0DDF: 33@ 4@ 5@ 6@ 10@ 11@ 12@ 13@ 14@ 15@ 16@ 17@ 18@ 19@ 20@ 21@ 22@ 23@ 24@ 25@ 82 | 83 | /* 84 | 00E1: player 0 pressed_key 7 85 | jf @MAIN_LOOP 86 | 0109: player $PLAYER_CHAR money += 1 87 | 099C: jiggle_camera type 0@ timelimit 20000.0 intensity 5.0 88 | 0@++ 89 | wait 1000 90 | */ 91 | 0002: jump @MAIN_LOOP 92 | 93 | 94 | -------------------------------------------------------------------------------- /cleo/autopilot/autopilot.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'AUTOPIL' 5 | 6 | // 0xB73458 pad 7 | // thiscall short CPad::GetSteeringUpDown(void) 0x53FBD0 8 | // thiscall short CPad::GetAccelerate(void) 0x5403F0 9 | // thiscall short CPad::GetSteeringLeftRight(void) 0x53FB80 10 | 11 | :MAIN_LOOP 12 | 0001: wait 0 13 | 14 | 0449: actor $PLAYER_ACTOR in_a_car 15 | 004D: jump_if_false @MAIN_LOOP 16 | 03C0: 0@ = actor $PLAYER_ACTOR car 17 | 0050: gosub @KEY 18 | 19 | 0019: 10@ > 0 // LOCALVAR CMP INT 20 | 004D: jump_if_false @MAIN_LOOP 21 | 22 | /* 23 | 00AA: store_car 0@ position_to 3@ 4@ 5@ 24 | 03F0: enable_text_draw 0 25 | 0340: set_text_draw_RGBA 255 255 255 255 26 | 033F: set_text_draw_letter_size 0.15 0.95 27 | 0342: set_text_draw_centered 0 28 | 081C: draw_text_outline 0 RGBA 0 0 0 255 29 | 060D: draw_text_shadow 0 rgba 0 0 0 255 30 | 0092: 6@ = float 5@ to_integer 31 | 0348: enable_text_draw_proportional 0 32 | 045A: draw_text_1number 320.0 290.0 'NUMBER' number 6@ // ~1~ 33 | */ 34 | 35 | 077D: 1@ = car 0@ x_angle 36 | 37 | 0021: 1@ > 180.0 // LOCALVAR CMP FLOAT 38 | 004D: jump_if_false @NOCORRECT 39 | 000F: 1@ -= 360.0 // LOCALVAR MINUS FLOAT 40 | :NOCORRECT 41 | 42 | 0021: 1@ > -2.0 // LOCALVAR CMP FLOAT 43 | 004D: jump_if_false @GOUP 44 | 0050: gosub @DOWN 45 | 0002: jump @FINISHUPDOWN 46 | :GOUP 47 | 0023: -5.0 > 1@ // LOCALVAR CMP FLOAT 48 | 004D: jump_if_false @FINISHUPDOWN 49 | 0050: gosub @UP 50 | :FINISHUPDOWN 51 | 52 | 06BE: 1@ = car 0@ y_angle 53 | 54 | 8043: not 1@ == 0.0 // LOCALVAR EQ FLOAT 55 | 004D: jump_if_false @FINISHLEFTRIGHT 56 | 0021: 1@ > 0.0 // LOCALVAR CMP FLOAT 57 | 004D: jump_if_false @GOLEFT 58 | 0050: gosub @RIGHT 59 | 0002: jump @FINISHLEFTRIGHT 60 | :GOLEFT 61 | 0050: gosub @LEFT 62 | :FINISHLEFTRIGHT 63 | 64 | 0001: wait 0 65 | 0050: gosub @RESTOREUPDOWN 66 | 0050: gosub @RESTORELEFTRIGHT 67 | 0006: 32@ = 0 // LOCALVAR ASSIGNMENT INT 68 | :WAIT_LOOP 69 | 0001: wait 0 70 | 0050: gosub @KEY 71 | 0019: 32@ > 50 // LOCALVAR CMP INT 72 | 004D: jump_if_false @WAIT_LOOP 73 | 74 | 0002: jump @MAIN_LOOP 75 | 76 | :KEY 77 | 0AB0: key_pressed 0x7B // F12 78 | 004D: jump_if_false @SKIPKEY 79 | 0001: wait 200 80 | 0019: 10@ > 0 // LOCALVAR CMP INT 81 | 004D: jump_if_false @ENABLE 82 | 0006: 10@ = 0 83 | 0050: gosub @RESTOREACCEL 84 | 0002: jump @SKIPKEY 85 | :ENABLE 86 | 0006: 10@ = 1 87 | 0050: gosub @ACCELERATE 88 | :SKIPKEY 89 | 0051: return 90 | 91 | :RESTOREACCEL 92 | 0A8C: write_memory 0x5403FA size 4 value 0x0A81B70F virtual_protect 0 93 | 0A8C: write_memory 0x5403FE size 1 value 0x01 virtual_protect 0 94 | 0051: return 95 | 96 | :RESTOREUPDOWN 97 | 0A8C: write_memory 0x53FBDA size 4 value 0x0A81B70F virtual_protect 0 98 | 0A8C: write_memory 0x53FBDE size 1 value 0x01 virtual_protect 0 99 | 0051: return 100 | 101 | :RESTORELEFTRIGHT 102 | 0A8C: write_memory 0x53FB8A size 4 value 0x0A81B70F virtual_protect 0 103 | 0A8C: write_memory 0x53FB8E size 1 value 0x01 virtual_protect 0 104 | 0051: return 105 | 106 | :ACCELERATE 107 | 0A8C: write_memory 0x5403FA size 4 value 0x00FFB866 virtual_protect 0 // mov ax, ff 108 | 0A8C: write_memory 0x5403FE size 1 value 0xC3 virtual_protect 0 // retn 109 | 0051: return 110 | 111 | :DOWN 112 | 0A8C: write_memory 0x53FBDA size 4 value 0xFFA0B866 virtual_protect 0 // mov ax, ff80 113 | 0A8C: write_memory 0x53FBDE size 1 value 0xC3 virtual_protect 0 // retn 114 | 0051: return 115 | 116 | :UP 117 | 0A8C: write_memory 0x53FBDA size 4 value 0x000BB866 virtual_protect 0 // mov ax, 80 118 | 0A8C: write_memory 0x53FBDE size 1 value 0xC3 virtual_protect 0 // retn 119 | 0051: return 120 | 121 | :LEFT 122 | 0A8C: write_memory 0x53FB8A size 4 value 0xFFF0B866 virtual_protect 0 // mov ax, ff80 123 | 0A8C: write_memory 0x53FB8E size 1 value 0xC3 virtual_protect 0 // retn 124 | 0051: return 125 | 126 | :RIGHT 127 | 0A8C: write_memory 0x53FB8A size 4 value 0x000BB866 virtual_protect 0 // mov ax, 80 128 | 0A8C: write_memory 0x53FB8E size 1 value 0xC3 virtual_protect 0 // retn 129 | 0051: return 130 | 131 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleo/plhud/new/plhud.txt: -------------------------------------------------------------------------------- 1 | {$CLEO} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'PLHUD01' 5 | 6 | // >>>>>>> compability checks 7 | 0A8D: 0@ = read_memory 0x58EBAF size 1 vp 0 8 | 0039: 0@ == 0xE8 // l==i (int) // sprintf call 9 | 004D: jump_if_false @INCOMPATIBLE 10 | 0A8D: 0@ = read_memory 0x58EAF6 size 4 vp 0 11 | 0039: 0@ == 0x7405B60F // l==i (int) // drawhud rewritten part 12 | 004D: jump_if_false @INCOMPATIBLE 13 | // <<<<<<< compability checks 14 | 15 | 0002: jump @HOOKER 16 | :NOMOREHOOKER 17 | 18 | const 19 | OPTIONS = 0@ 20 | _OPTIONS = 1@ 21 | AUTOHIDETIME = 2550 22 | end 23 | 24 | 0006: OPTIONS = 0 // l=i (int) 25 | 0AC6: _OPTIONS = label @_OPTIONS offset 26 | 27 | 0006: 9@ = 0x0 // l=i (int) // hold keypress state 28 | 0006: 10@ = 0x79 // l=i (int) // F10 29 | 0006: 11@ = 0x27 // l=i (int) // right 30 | 0006: 12@ = 0x28 // l=i (int) // down 31 | 0006: 13@ = 0x26 // l=i (int) // up 32 | 0006: 14@ = 0x25 // l=i (int) // left 33 | 34 | :MAIN_LOOP 35 | 0001: wait 0 36 | 37 | // >>>>>>> keys 38 | 0006: 30@ = 0 // l=i (int) 39 | 0002: jump @KEYS_LOOP_START 40 | :KEYS_LOOP 41 | 08C3: clear 9@ bit 30@ 42 | 000A: 30@ += 1 // l+=i (int) 43 | 001B: 5 > 30@ // i>l (int) 44 | 004D: jump_if_false @KEYS_LOOP_END 45 | :KEYS_LOOP_START 46 | 0AB0: key_pressed 10@(30@,1i) 47 | 004D: jump_if_false @KEYS_LOOP 48 | 88B7: not test 9@ bit 30@ 49 | 004D: jump_if_false @KEYS_LOOP_END 50 | 0006: 33@ = 0x0 // l=i (int) 51 | 08BD: set 9@ bit 30@ 52 | 000A: 30@ += 2 // l+=i (int) 53 | 0A8D: OPTIONS = read_memory _OPTIONS size 4 vp 0 54 | 08BD: set OPTIONS bit 30@ 55 | 0A8C: write_memory _OPTIONS size 4 value OPTIONS vp 0 56 | :KEYS_LOOP_END 57 | // <<<<<<< keys 58 | 59 | // >>>>>>> autohide 60 | 0019: 33@ > AUTOHIDETIME // l>i (int) 61 | 004D: jump_if_false @MAIN_LOOP 62 | 0A8D: OPTIONS = read_memory _OPTIONS size 4 vp 0 63 | 08C3: clear OPTIONS bit 7 64 | 0A8C: write_memory _OPTIONS size 4 value OPTIONS vp 0 65 | // <<<<<<< autohide 66 | 67 | 0002: jump @MAIN_LOOP 68 | 69 | :INCOMPATIBLE 70 | 0001: wait 5000 71 | 00BA: show_text_styled GXT 'RATNG23' time 2000 style 6 // Playa 72 | 0002: jump @INCOMPATIBLE 73 | 74 | {$INCLUDE plhud-asm.txt} 75 | 76 | :_MENUTEXT 77 | :DATA01 78 | { 79 | stores menu text to show 80 | when changing, change the offsets in 81 | asm !!MENUOFFSET define section 82 | } 83 | hex 84 | "USE THE UP AND DOWN ARROW KEYS" "~n~" 85 | "TO BROWSE THIS MENU. _USE THE" "~n~" 86 | "LEFT AND RIGHT ARROW KEYS TO" "~n~" 87 | "CHANGE VALUES OR ACCEPT." "~n~" 88 | "~n~" 89 | "> CONTINUE_____________" "~n~" 90 | " _SMART MODE: ~g~ON_~w~" "~n~" 91 | " _VIEW DISTANCE: _1500M" "~n~" 92 | " _COLOR: PINK__________" "~n~" 93 | "~n~" 94 | "v32 ___ runways" "~n~" 95 | "________________" 96 | 00 97 | end 98 | 99 | :_OPTIONS 100 | :DATA02 101 | { 102 | stores options, states, stuffs 103 | bit 9: result of [redacted] 104 | bit 8: do runonce 105 | bit 7: show menu? 106 | bit 6: left arrow pressed? 107 | bit 5: up arrow pressed? 108 | bit 4: down arrow pressed? 109 | bit 3: right arrow pressed? 110 | bit 2: F10 pressed? 111 | bit 1: smart mode? 112 | bit 0: is active? 113 | key states reset by asm 114 | } 115 | hex 116 | 02 01 00 00 117 | end 118 | 119 | :_MENUIDX 120 | :DATA03 121 | { 122 | currently selected menu idx 123 | } 124 | hex 125 | 00 00 00 00 126 | end 127 | 128 | :_VIEWDISTANCE 129 | :DATA04 130 | { 131 | view distance for the esp 132 | } 133 | hex 134 | DC 05 00 00 135 | end 136 | 137 | :_SPRINTF 138 | :DATA05 139 | { 140 | ptr to _sprintf proc 141 | } 142 | hex 143 | 00 00 00 00 144 | end 145 | 146 | :_RUNWAYS 147 | :DATA06 148 | { 149 | runways 150 | } 151 | {$INCLUDE ../plhudairports.txt} 152 | 153 | :_ESPCOLR 154 | :DATA07 155 | { 156 | esp color (ARGB, so BGRA) 157 | } 158 | hex 159 | FF 48 FF 55 160 | end 161 | 162 | :_LASTRDR 163 | :DATA08 164 | { 165 | last runway used for radar 166 | } 167 | hex 168 | 00 00 00 00 169 | end 170 | 171 | -------------------------------------------------------------------------------- /cleo/airbreak/airbreak.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | 3 | 03A4: name_thread "AIRBREAK" 4 | 0662: printstring "BASED ON SURFLY MADE BY OPCODEEXE" 5 | 6 | const 7 | VK_SHIFT = 0x10 8 | VK_CTRL = 0x11 9 | VK_ALT = 0x12 10 | VK_SPACE = 0x20 11 | VK_D = 0x44 12 | VK_Q = 0x51 13 | VK_S = 0x53 14 | VK_X = 0x58 15 | VK_Z = 0x5A 16 | VK_F10 = 0x79 17 | end 18 | 19 | :MAIN_LOOP 20 | 0001: wait 0 ms 21 | 00D6: if and 22 | 0AB0: key_pressed VK_X 23 | 0AB0: key_pressed VK_ALT 24 | 004D: jump_if_false @MAIN_LOOP 25 | 018C: play_sound 1083 at 0.0 0.0 0.0 26 | 02AB: set_actor $PLAYER_ACTOR immunities BP 1 FP 1 EP 1 CP 1 MP 1 27 | 02A9: set_actor $PLAYER_ACTOR immune_to_nonplayer 1 28 | 00D6: if 29 | 00DF: actor $PLAYER_ACTOR driving 30 | 004D: jump_if_false @NOCAR 31 | 03C0: 0@ = actor $PLAYER_ACTOR car 32 | 099A: set_car 0@ collision_detection 0 33 | 00AA: store_car 0@ position_to 3@ 4@ 5@ 34 | 0002: @ACTIVATION_RELEASED_DELAY 35 | :NOCAR 36 | 00A0: store_actor $PLAYER_ACTOR position_to 3@ 4@ 5@ 37 | 0002: @ACTIVATION_RELEASED_DELAY 38 | 39 | :ACTIVATION_RELEASED_DELAY 40 | 0001: wait 0 ms 41 | 00D6: if 42 | 8AB0: not key_pressed VK_X 43 | 004D: jump_if_false @ACTIVATION_RELEASED_DELAY 44 | 45 | :ACTIVE_LOOP 46 | 0001: wait 0 ms 47 | 00D6: if or 48 | 0AB0: key_pressed VK_X 49 | 0118: actor $PLAYER_ACTOR dead 50 | 004D: jump_if_false @DO_AIRBREAK 51 | 018C: play_sound 1084 at 0.0 0.0 0.0 52 | 02AB: set_actor $PLAYER_ACTOR immunities BP 0 FP 0 EP 0 CP 0 MP 0 53 | 02A9: set_actor $PLAYER_ACTOR immune_to_nonplayer 0 54 | 00D6: if 55 | 00DF: actor $PLAYER_ACTOR driving 56 | 004D: jump_if_false @MAIN_LOOP 57 | 099A: set_car 0@ collision_detection 1 58 | 0002: jump @MAIN_LOOP 59 | 60 | :DO_AIRBREAK 61 | 068D: get_camera_position_to 20@ 21@ 22@ 62 | 068E: get_camera_target_point_to 22@ 23@ 24@ 63 | 0063: 22@ -= 20@ // (float) 64 | 0063: 23@ -= 21@ // (float) 65 | 0604: get_Z_angle_for_point 22@ 23@ store_to 7@ 66 | 0007: 27@ = 0.0 67 | 0007: 28@ = 0.0 68 | 0007: 29@ = 0.0 69 | 70 | 00D6: if 71 | 00DF: actor $PLAYER_ACTOR driving 72 | 004D: jump_if_false @SET_ACTOR_ANGLE 73 | 0175: set_car 0@ Z_angle_to 7@ 74 | 0002: jump @DO_KEYCHECK 75 | :SET_ACTOR_ANGLE 76 | 0173: set_actor $PLAYER_ACTOR Z_angle_to 7@ 77 | 0002: jump @DO_KEYCHECK 78 | 79 | :DO_KEYCHECK 80 | 00D6: if 81 | 0AB0: key_pressed VK_Z 82 | 004D: jump_if_false @DO_KEYCHECK_BACK 83 | 000F: 27@ -= 1.5 84 | 85 | :DO_KEYCHECK_BACK 86 | 00D6: if 87 | 0AB0: key_pressed VK_S 88 | 004D: jump_if_false @DO_KEYCHECK_LEFT 89 | 000B: 27@ += 1.5 90 | 91 | :DO_KEYCHECK_LEFT 92 | 00D6: if 93 | 0AB0: key_pressed VK_Q 94 | 004D: jump_if_false @DO_KEYCHECK_RIGHT 95 | 000F: 28@ -= 1.5 96 | 97 | :DO_KEYCHECK_RIGHT 98 | 00D6: if 99 | 0AB0: key_pressed VK_D 100 | 004D: jump_if_false @DO_KEYCHECK_DOWN 101 | 000B: 28@ += 1.5 102 | 103 | :DO_KEYCHECK_DOWN 104 | 00D6: if 105 | 0AB0: key_pressed VK_CTRL 106 | 004D: jump_if_false @DO_KEYCHECK_UP 107 | 000F: 29@ -= 0.9 108 | 109 | :DO_KEYCHECK_UP 110 | 00D6: if 111 | 0AB0: key_pressed VK_SPACE 112 | 004D: jump_if_false @DO_KEYCHECK_SPEED 113 | 000B: 29@ += 0.9 114 | 115 | :DO_KEYCHECK_SPEED 116 | 00D6: if 117 | 0AB0: key_pressed VK_SHIFT 118 | 004D: jump_if_false @DOPUTPOS 119 | 0013: 27@ *= 7.0 120 | 0013: 28@ *= 7.0 121 | 122 | :DOPUTPOS 123 | 0087: 26@ = 27@ // (float) 124 | 02F6: 14@ = sin 7@ // (float) 125 | 006B: 26@ *= 14@ // (float) 126 | 0087: 25@ = 26@ // (float) 127 | 0087: 26@ = 28@ // (float) 128 | 02F7: 14@ = cos 7@ // (float) 129 | 006B: 26@ *= 14@ // (float) 130 | 005B: 25@ += 26@ // (float) 131 | 007B: 3@ += frame_delta_time * 25@ // (float) 132 | 0087: 26@ = 27@ // (float) 133 | 02F7: 14@ = cos 7@ // (float) 134 | 0013: 14@ *= -1.0 135 | 006B: 26@ *= 14@ // (float) 136 | 0087: 25@ = 26@ // (float) 137 | 0087: 26@ = 28@ // (float) 138 | 02F6: 14@ = sin 7@ // (float) 139 | 006B: 26@ *= 14@ // (float) 140 | 005B: 25@ += 26@ // (float) 141 | 007B: 4@ += frame_delta_time * 25@ // (float) 142 | 007B: 5@ += frame_delta_time * 29@ // (float) 143 | 00D6: if 144 | 00DF: actor $PLAYER_ACTOR driving 145 | 004D: jump_if_false @ONFOOT 146 | 00AB: put_car 0@ at 3@ 4@ 5@ 147 | 0002: @ACTIVE_LOOP 148 | :ONFOOT 149 | 00A1: put_actor $PLAYER_ACTOR at 3@ 4@ 5@ 150 | 0002: @ACTIVE_LOOP 151 | -------------------------------------------------------------------------------- /snippets/coronas.txt: -------------------------------------------------------------------------------- 1 | :MAIN_LOOP 2 | wait 0 3 | 4 | // works 5 | 25@ = 1932.9313 6 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 7 | 25@ -= 2.0 8 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 9 | 25@ -= 2.0 10 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 11 | 25@ -= 2.0 12 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 13 | 25@ -= 2.0 14 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 15 | 25@ -= 2.0 16 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 17 | 25@ -= 2.0 18 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 19 | 25@ -= 2.0 20 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 21 | 25@ -= 2.0 22 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 23 | 25@ -= 2.0 24 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 25 | 25@ -= 2.0 26 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 27 | 25@ -= 2.0 28 | 04D5: create_corona_at 25@ -2486.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 29 | 30 | // does not work, only the last one appears 31 | 25@ = 1932.9313 32 | FOR $MyCounter = 1 to 12 step 1 33 | 04D5: create_corona_at 25@ -2496.9329 13.5391 radius 1.0 type 9 flare 0 RGB 255 0 0 34 | 25@ -= 2.0 35 | 36 | // method by DK22Pac, works 37 | // see http://gtaforums.com/topic/885204-creating-corona-in-a-loop/ 38 | 0@ = 1932.9313 // x 39 | 1@ = -2499.9329 // y 40 | 2@ = 13.5391 // z 41 | 0A9F: get_this_script_struct 3@ 42 | for 4@ = 1 to 12 43 | 0AA5: 0x6FC580 21 21 draw_corona_reflection_delay 1 only_from_below 0 fade_speed 50.0 0 near_clip 0.5 long_distance 0 0 0 check_obstacles 0 enable_reflection 0 flare 0 type 9 far_clip 150.0 radius 1.0 position 0@v alpha 255 blue 0 green 0 red 255 entity 0 identifier 3@ 44 | 0@ -= 2.0 45 | 3@ += 1 46 | end 47 | 48 | // hack, works 49 | 0@ = 0 50 | 25@ = 1932.9313 51 | FOR $MyCounter = 1 to 12 step 1 52 | 26@ = -2499.9329 53 | 27@ = 13.5391 54 | 28@ = 1.0 55 | 29@ = 9 56 | 30@ = 0 57 | 31@ = 255 58 | 32@ = 0 59 | 33@ = 0 60 | gosub @MAGIC 61 | 25@ -= 2.0 62 | end 63 | 64 | 0002: jump @MAIN_LOOP 65 | 66 | :MAGIC 67 | 0@ += 2 68 | 0AC6: 2@ = label @MAGICSTART offset 69 | 005A: 2@ += 0@ // (int) 70 | 71 | 0A8C: write_memory 2@ size 1 value 0x00 vp 0 72 | 2@ += 1 73 | 0A8C: write_memory 2@ size 4 value 0x0604D500 vp 0 74 | 2@ += 4 75 | 0A8C: write_memory 2@ size 4 value 25@ vp 0 76 | 2@ += 4 77 | 0A8C: write_memory 2@ size 1 value 0x06 vp 0 78 | 2@ += 1 79 | 0A8C: write_memory 2@ size 4 value 26@ vp 0 80 | 2@ += 4 81 | 0A8C: write_memory 2@ size 1 value 0x06 vp 0 82 | 2@ += 1 83 | 0A8C: write_memory 2@ size 4 value 27@ vp 0 84 | 2@ += 4 85 | 0A8C: write_memory 2@ size 1 value 0x06 vp 0 86 | 2@ += 1 87 | 0A8C: write_memory 2@ size 4 value 28@ vp 0 88 | 2@ += 4 89 | 0A8C: write_memory 2@ size 1 value 0x04 vp 0 90 | 2@ += 1 91 | 0A8C: write_memory 2@ size 1 value 29@ vp 0 92 | 2@ += 1 93 | 0A8C: write_memory 2@ size 1 value 0x04 vp 0 94 | 2@ += 1 95 | 0A8C: write_memory 2@ size 1 value 30@ vp 0 96 | 2@ += 1 97 | 0A8C: write_memory 2@ size 1 value 0x05 vp 0 98 | 2@ += 1 99 | 0A8C: write_memory 2@ size 2 value 31@ vp 0 100 | 2@ += 2 101 | 0A8C: write_memory 2@ size 1 value 0x04 vp 0 102 | 2@ += 1 103 | 0A8C: write_memory 2@ size 1 value 32@ vp 0 104 | 2@ += 1 105 | 0A8C: write_memory 2@ size 1 value 0x04 vp 0 106 | 2@ += 1 107 | 0A8C: write_memory 2@ size 1 value 33@ vp 0 108 | 2@ += 1 109 | 0A8C: write_memory 2@ size 4 value 0x00510000 vp 0 110 | 111 | // D5 04 06 33 33 D7 41 06 ED 6E 1B C5 06 27 A0 58 41 06 00 00 80 3F 04 09 04 00 05 FF 00 04 00 04 00 112 | // D5 04 06 ----- x --- 06 ----- y --- 06 ----- z --- 06 --- rad --- 04 -t 04 -f 05 - r - 04 -g 04 -b 113 | :MAGICSTART 114 | hex 115 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 116 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 117 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 118 | end 119 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/theme_standard.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "util.h" 3 | #include "opcodes.h" 4 | #include "commonhandlers.h" 5 | 6 | #if THEME == THEME_STANDARD 7 | 8 | void destnearesthandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 9 | { 10 | TRACE("destnearesthandler\n"); 11 | REPOSITION_ON_ATTACH(); 12 | if (!INCAR) { 13 | return; 14 | } 15 | if (gamedata.missiondistance == -1 || samptd->szText[0] != 'D') { 16 | return; 17 | } 18 | int destinationidx = 0; 19 | char c = 0; 20 | while (true) { 21 | c = samptd->szText[destinationidx]; 22 | if (c == '~' || c == 0) { 23 | break; 24 | } 25 | if (++destinationidx > 150) { 26 | break; 27 | } 28 | } 29 | if (c == 0) { 30 | sprintf(samptd->szString, "Destination (%d M)", gamedata.missiondistance); 31 | } else { 32 | sprintf(samptd->szString, "Destination (%d M)%s", gamedata.missiondistance, &(samptd->szText[destinationidx])); 33 | } 34 | memcpy(samptd->szText, samptd->szString, 100); 35 | } 36 | 37 | void damagepcthandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 38 | { 39 | TRACE("damagepcthandler\n"); 40 | REPOSITION_ON_ATTACH(); 41 | if (!INCAR) { 42 | return; 43 | } 44 | sprintf(samptd->szText, "%.0f%%", (float) gamedata.carhp / 10.0f); 45 | memcpy(samptd->szString, samptd->szText, 7); 46 | } 47 | 48 | void fuelpricehandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 49 | { 50 | TRACE("fuelpricehandler\n"); 51 | REPOSITION_ON_ATTACH(); 52 | } 53 | 54 | void airspeedhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 55 | { 56 | TRACE("airspeedhandler\n"); 57 | REPOSITION_ON_ATTACH(); 58 | if (!INCAR) { 59 | return; 60 | } 61 | sprintf(&samptd->szText[14], "%d KTS", AIRSPEED(gamedata.carspeed)); 62 | memcpy(&samptd->szString[14], &samptd->szText[14], 10); 63 | } 64 | 65 | void altitudehandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 66 | { 67 | TRACE("altitudehandler\n"); 68 | REPOSITION_ON_ATTACH(); 69 | if (!INCAR) { 70 | return; 71 | } 72 | sprintf(&samptd->szText[14], "%d FT", (int) gamedata.carz); 73 | memcpy(&samptd->szString[14], &samptd->szText[14], 10); 74 | } 75 | 76 | void damagebarhandlerex(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 77 | { 78 | TRACE("damagebarhandlerex\n"); 79 | damagebarhandler(hxtd, samptd, reason); 80 | if (gamedata.carhp <= 350 && !gamedata.blinkstatus) { 81 | samptd->dwBoxColor &= 0x00ffffff; 82 | } 83 | } 84 | 85 | int fuelval = 0; 86 | void fuelpcthandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 87 | { 88 | TRACE("fuelpcthandler\n"); 89 | REPOSITION_ON_ATTACH(); 90 | fuelval = simplestrval(samptd->szText, 0); 91 | } 92 | 93 | void fuelbarhandler(struct SPLHXTEXTDRAW *hxtd, struct stTextdraw *samptd, int reason) 94 | { 95 | TRACE("fuelbarhandler\n"); 96 | progressbarpatchhandler(hxtd, samptd, reason); 97 | if (fuelval <= 20 && !gamedata.blinkstatus) { 98 | samptd->dwBoxColor &= 0x00ffffff; 99 | } 100 | } 101 | 102 | BOOL setupTextdraws() 103 | { 104 | setupTD(PLTD_FUEL, 0x44044000, 0x43C60000, 0, 0, NULL); 105 | setupTD(PLTD_DAMAGE, 0x44044000, 0x43CB0000, 0x44044000, 0x43CB0148, &damagepatchhandler); 106 | setupTD(PLTD_STATUSBARBOX, 0x43A00000, 0x43D60000, 0, 0, NULL); 107 | setupTD(PLTD_FUELDMGBOX, 0x4403C000, 0x43C48000, 0, 0, NULL); 108 | setupTD(PLTD_FUELPRICE, 0x44000000, 0x42C80000, 0, 0, NULL); 109 | setupTD(PLTD_SATISF, 0x44108000, 0x43B58000, 0, 0, NULL); 110 | setupTD(PLTD_FUELBAR, 0x440E4000, 0x43C78000, 0x440E4000, 0x43C78148, &fuelbarhandler); 111 | setupTD(PLTD_STATUSBAR, 0x43A00000, 0x43D60000, 0, 0, NULL); 112 | setupTD(PLTD_DMGBAR, 0x440E4000, 0x43CE8000, 0x440E4000, 0x43CE8148, &damagebarhandlerex); 113 | setupTD(PLTD_ODO, 0x43FA8000, 0x43C80000, 0, 0, NULL); 114 | setupTD(PLTD_AIRSPEED, 0x43E38000, 0x43C80000, 0x43E38000, 0x43C80148, &airspeedhandler); 115 | setupTD(PLTD_ALTITUDE, 0x43CC0000, 0x43C80000, 0x43CC0000, 0x43C80148, &altitudehandler); 116 | setupTD(PLTD_GPS, 0x43430000, 0x43C80000, 0, 0, NULL); 117 | setupTD(PLTD_DESTNEAREST, 0x439D0000, 0x43C80000, 0x439D0000, 0x43C80148, &destnearesthandler); 118 | setupTD(PLTD_FUELPCT, 0x44124000, 0x43C60000, 0x44124000, 0x43C60008, &fuelpcthandler); 119 | setupTD(PLTD_DAMAGEPCT, 0x44128000, 0x43CD0000, 0x44128000, 0x43CD0148, &damagepcthandler); 120 | setupTD(PLTD_HEADING, 0x439e0000, 0x40000000, 0x439e0000, 0x40200000, &headinghandler); 121 | setupTD(PLTD_CARSPEED, 0x44108000, 0x43B58000, 0x44108148, 0x43B58000, &carspeedtdhandler); 122 | setupTD(PLTD_CARODO, 0x4410c000, 0x43BB000, 0, 0, NULL); 123 | return TRUE; 124 | } 125 | 126 | #endif 127 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/plpanel.vcproj: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 12 | 13 | 14 | 15 | 16 | 22 | 25 | 28 | 31 | 34 | 37 | 41 | 44 | 47 | 50 | 57 | 60 | 63 | 66 | 69 | 72 | 75 | 78 | 81 | 82 | 87 | 90 | 93 | 96 | 99 | 102 | 105 | 108 | 111 | 114 | 117 | 120 | 123 | 126 | 129 | 132 | 135 | 138 | 141 | 142 | 143 | 144 | 145 | 146 | 149 | 150 | 153 | 154 | 157 | 158 | 161 | 162 | 165 | 166 | 169 | 170 | 173 | 174 | 177 | 178 | 181 | 182 | 185 | 186 | 189 | 190 | 193 | 194 | 197 | 198 | 201 | 202 | 205 | 206 | 209 | 210 | 213 | 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/opcodes.cpp: -------------------------------------------------------------------------------- 1 | #include "opcodes.h" 2 | #include "transform.h" 3 | #include "text.h" 4 | 5 | BOOL InitOpcodes() 6 | { 7 | return 8 | CLEO_RegisterOpcode(0x0c26, &Op_0C26) && 9 | CLEO_RegisterOpcode(0x0C27, &Op_0C27) && 10 | CLEO_RegisterOpcode(0x0C28, &Op_0C28) && 11 | CLEO_RegisterOpcode(0x0C29, &Op_0C29) && 12 | CLEO_RegisterOpcode(0x0C30, &Op_0C30) && 13 | CLEO_RegisterOpcode(0x0C31, &Op_0C31) && 14 | CLEO_RegisterOpcode(0x0C32, &Op_0C32) && 15 | CLEO_RegisterOpcode(0x0C33, &Op_0C33) && 16 | CLEO_RegisterOpcode(0x0C34, &Op_0C34) && 17 | CLEO_RegisterOpcode(0x0C35, &Op_0C35) && 18 | true; 19 | } 20 | 21 | // 0C26: sign_extend 1@ store_to 2@ 22 | // {$O 0C26=2,sign_extend %1d% store_to %2d%} 23 | OpcodeResult WINAPI Op_0C26(CScriptThread *thread) 24 | { 25 | WORD i = CLEO_GetIntOpcodeParam(thread); 26 | float result; 27 | const float mp = 0.125; 28 | _asm 29 | { 30 | movsx ecx, i 31 | mov result, ecx 32 | fild result 33 | fmul mp 34 | fstp result 35 | } 36 | CLEO_SetFloatOpcodeParam(thread, result); 37 | return OR_CONTINUE; 38 | } 39 | 40 | // 0C27: transform world_xyz 1@ 2@ 3@ to hud_xy 4@ 5@ 41 | // {$O 0C27=5,transform world_xyz %1d% %2d% %3d% to hud_xy %4d% %5d%} 42 | OpcodeResult WINAPI Op_0C27(CScriptThread *thread) 43 | { 44 | return TransformPointFor0C270C28(thread, 640, 480); 45 | } 46 | 47 | // 0C28: transform world_xyz 1@ 2@ 3@ to screen_xy 4@ 5@ 48 | // {$O 0C28=5,transform world_xyz %1d% %2d% %3d% to screen_xy %4d% %5d%} 49 | OpcodeResult WINAPI Op_0C28(CScriptThread *thread) 50 | { 51 | DWORD *displayWidth = (DWORD*)(0xC17044); 52 | DWORD *displayHeight = (DWORD*)(0xC17048); 53 | return TransformPointFor0C270C28(thread, (*displayWidth), (*displayHeight)); 54 | } 55 | 56 | // 0C29: lerp_ab 1@ to 2@ f 3@ store_to 4@ 57 | // {$O 0C29=4,lerp_ab %1d% f %2d% at %3d% store_to %4d%} 58 | OpcodeResult WINAPI Op_0C29(CScriptThread *thread) 59 | { 60 | float a; 61 | float b; 62 | float f; 63 | 64 | a = CLEO_GetFloatOpcodeParam(thread); 65 | b = CLEO_GetFloatOpcodeParam(thread); 66 | f = CLEO_GetFloatOpcodeParam(thread); 67 | 68 | // https://stackoverflow.com/questions/4353525/floating-point-linear-interpolation 69 | a = a + f * (b - a); 70 | 71 | CLEO_SetFloatOpcodeParam(thread, a); 72 | return OR_CONTINUE; 73 | } 74 | 75 | // 0C30: draw_text 1@ at_screen_xy 2@ 3@ font 4@ proportional 5@ align 6@ RGBA 7@ 8@ 9@ 10@ letter_size 11@ 12@ 76 | // {$O 0C30=12,draw_text %1d% at_screen_xy %2d% %3d% font %4d% proportional %5d% align %6d% RGBA %7d% %8d% %9d% %10d% letter_size %11d% %12d%} 77 | OpcodeResult WINAPI Op_0C30(CScriptThread *thread) 78 | { 79 | return DrawText(thread, false); 80 | } 81 | 82 | // 0C31: draw_text 1@ at_hud_xy 2@ 3@ font 4@ proportional 5@ align 6@ RGBA 7@ 8@ 9@ 10@ letter_size 11@ 12@ 83 | // {$O 0C31=12,draw_text %1d% at_hud_xy %2d% %3d% font %4d% proportional %5d% align %6d% RGBA %7d% %8d% %9d% %10d% letter_size %11d% %12d%} 84 | OpcodeResult WINAPI Op_0C31(CScriptThread *thread) 85 | { 86 | return DrawText(thread, true); 87 | } 88 | 89 | // 0C32: condition_int 1@ EQ 2@ if_true @TRUE if_false @FALSE store_to 3@ 90 | // {$O 0C32=5,condition_int %1d% EQ %2d% if_true %3d% if_false %4d% store_to %5d%} 91 | OpcodeResult WINAPI Op_0C32(CScriptThread *thread) 92 | { 93 | int a = CLEO_GetIntOpcodeParam(thread); 94 | int b = CLEO_GetIntOpcodeParam(thread); 95 | int jmptrue = CLEO_GetIntOpcodeParam(thread); 96 | int jmpelse = CLEO_GetIntOpcodeParam(thread); 97 | CLEO_SetIntOpcodeParam(thread, a == b ? jmptrue : jmpelse); 98 | return OR_CONTINUE; 99 | } 100 | 101 | // 0C33: condition_float 1@ EQ 2@ if_true @TRUE if_false @FALSE store_to 3@ 102 | // {$O 0C33=5,condition_float %1d% EQ %2d% if_true %3d% if_false %4d% store_to %5d%} 103 | OpcodeResult WINAPI Op_0C33(CScriptThread *thread) 104 | { 105 | float a = CLEO_GetFloatOpcodeParam(thread); 106 | float b = CLEO_GetFloatOpcodeParam(thread); 107 | int jmptrue = CLEO_GetIntOpcodeParam(thread); 108 | int jmpelse = CLEO_GetIntOpcodeParam(thread); 109 | CLEO_SetIntOpcodeParam(thread, a == b ? jmptrue : jmpelse); 110 | return OR_CONTINUE; 111 | } 112 | 113 | // 0C34: condition_int 1@ GT 2@ if_true @TRUE if_false @FALSE store_to 3@ 114 | // {$O 0C34=5,condition_int %1d% GT %2d% if_true %3d% if_false %4d% store_to %5d%} 115 | OpcodeResult WINAPI Op_0C34(CScriptThread *thread) 116 | { 117 | int a = CLEO_GetIntOpcodeParam(thread); 118 | int b = CLEO_GetIntOpcodeParam(thread); 119 | int jmptrue = CLEO_GetIntOpcodeParam(thread); 120 | int jmpelse = CLEO_GetIntOpcodeParam(thread); 121 | CLEO_SetIntOpcodeParam(thread, a > b ? jmptrue : jmpelse); 122 | return OR_CONTINUE; 123 | } 124 | 125 | // 0C35: condition_float 1@ GT 2@ if_true @TRUE if_false @FALSE store_to 3@ 126 | // {$O 0C35=5,condition_float %1d% GT %2d% if_true %3d% if_false %4d% store_to %5d%} 127 | OpcodeResult WINAPI Op_0C35(CScriptThread *thread) 128 | { 129 | float a = CLEO_GetFloatOpcodeParam(thread); 130 | float b = CLEO_GetFloatOpcodeParam(thread); 131 | int jmptrue = CLEO_GetIntOpcodeParam(thread); 132 | int jmpelse = CLEO_GetIntOpcodeParam(thread); 133 | CLEO_SetIntOpcodeParam(thread, a > b ? jmptrue : jmpelse); 134 | return OR_CONTINUE; 135 | } 136 | -------------------------------------------------------------------------------- /cleoplugins/signext/signext.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {6CCEA500-65B2-41EA-9F40-F0F96EB1EDAC} 15 | Win32Proj 16 | signext 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | NotSet 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120 29 | true 30 | Unicode 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | false 45 | .cleo 46 | $(SolutionDir)bin\ 47 | 48 | 49 | false 50 | .cleo 51 | $(SolutionDir)bin\ 52 | 53 | 54 | 55 | 56 | 57 | Level3 58 | Disabled 59 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 60 | true 61 | ../../../CLEO4/cleo_sdk 62 | CompileAsCpp 63 | 64 | 65 | Windows 66 | true 67 | $(SolutionDir)bin\signext.cleo 68 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 69 | 70 | 71 | 72 | 73 | Level3 74 | 75 | 76 | MaxSpeed 77 | true 78 | true 79 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 80 | true 81 | 82 | 83 | Windows 84 | true 85 | true 86 | true 87 | $(SolutionDir)bin\signext.cleo 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /cleo/els_pattern_test.php: -------------------------------------------------------------------------------- 1 | "); 18 | } else { 19 | echo("000A: 33@ += 1
"); 20 | } 21 | $n = 0; 22 | if($last != $p){ 23 | if($p == "-") $n = 1; 24 | if($p == "l") $n = 2; 25 | if($p == "r") $n = 3; 26 | if($p == "b") $n = 4; 27 | } 28 | echo("$back(33@,24i) = $n
"); 29 | $last = $p; 30 | } 31 | echo("jump @OWNELM_START"); 32 | } 33 | 34 | ?> 35 | 36 | 37 | 38 | 39 | els 40 | 53 | 54 | 55 | 56 | 57 |
58 | 59 |

front

60 | 61 | 62 | "); 68 | $c = 0; 69 | for($i = 0; $i < $patternlength; $i++){ 70 | $p = $pattern[$i]; 71 | if($p == " ") $p = "-"; 72 | echo(''); 73 | $c++; 74 | } 75 | echo(''); 76 | echo(''); 77 | echo(''); 78 | $patterns++; 79 | } 80 | addpattern("strobe A", "l l r r l l r r ", false); 81 | addpattern("strobe B", "b b b b b b b b ", false); 82 | addpattern("hazard > slow", "llllllllllllrrrrrrrrrrrr", false); 83 | addpattern("hazard > normal", "llllllrrrrrrllllllrrrrrr", false); 84 | addpattern("hazard > fast", "lllrrrlllrrrlllrrrlllrrr", false); 85 | addpattern("hazard > faster", "llrrllrrllrrllrrllrrllrr", false); 86 | addpattern("full > slow", " bbbbbbbbbbbb ", false); 87 | addpattern("full > normal", "bbb bbbbbb bbb", false); 88 | addpattern("full > fast", "bbb bbb bbb bbb ", false); 89 | addpattern("full > faster", "bb bb bb bb bb bb ", false); 90 | ?> 91 | 92 | 93 |
".''."$name'.strtoupper($p).'   
94 |

rear

95 | 96 | 97 | slow", " bbbbbbbbbbbb ", false); 103 | addpattern("full > normal", "bbb bbbbbb bbb", false); 104 | addpattern("full > fast", "bbb bbb bbb bbb ", false); 105 | addpattern("full > faster", "bb bb bb bb bb bb ", false); 106 | ?> 107 | 108 | 109 |
110 | 111 | 115 |
116 | 117 |
118 | 119 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /cleo/objsniffer-plugin/objsniffer.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {6CCEA500-65B2-41EA-9F40-F0F96EB1EDAC} 15 | Win32Proj 16 | objsniffer 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | NotSet 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120 29 | true 30 | Unicode 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | false 45 | .cleo 46 | $(SolutionDir)bin\ 47 | 48 | 49 | false 50 | .cleo 51 | $(SolutionDir)bin\ 52 | 53 | 54 | 55 | 56 | 57 | Level3 58 | Disabled 59 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 60 | true 61 | ../../../CLEO4/cleo_sdk 62 | CompileAsCpp 63 | 64 | 65 | Windows 66 | true 67 | $(SolutionDir)bin\objsniffer.cleo 68 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 69 | 70 | 71 | 72 | 73 | Level3 74 | 75 | 76 | MaxSpeed 77 | true 78 | true 79 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 80 | true 81 | 82 | 83 | Windows 84 | true 85 | true 86 | true 87 | $(SolutionDir)bin\objsniffer.cleo 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /cleoplugins/world2hud/world2hud.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {6CCEA500-65B2-41EA-9F40-F0F96EB1EDAC} 15 | Win32Proj 16 | world2hud 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | NotSet 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120 29 | true 30 | Unicode 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | false 45 | .cleo 46 | $(SolutionDir)bin\ 47 | 48 | 49 | false 50 | .cleo 51 | $(SolutionDir)bin\ 52 | 53 | 54 | 55 | 56 | 57 | Level3 58 | Disabled 59 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 60 | true 61 | ../../../CLEO4/cleo_sdk 62 | CompileAsCpp 63 | 64 | 65 | Windows 66 | true 67 | $(SolutionDir)bin\world2hud.cleo 68 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 69 | 70 | 71 | 72 | 73 | Level3 74 | 75 | 76 | MaxSpeed 77 | true 78 | true 79 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 80 | true 81 | 82 | 83 | Windows 84 | true 85 | true 86 | true 87 | $(SolutionDir)bin\world2hud.cleo 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /scm/cameraexport/cameraexport.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {6CCEA500-65B2-41EA-9F40-F0F96EB1EDAC} 15 | Win32Proj 16 | cameraexport 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | NotSet 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120 29 | true 30 | Unicode 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | false 45 | .cleo 46 | $(SolutionDir)bin\ 47 | 48 | 49 | false 50 | .cleo 51 | $(SolutionDir)bin\ 52 | 53 | 54 | 55 | 56 | 57 | Level3 58 | Disabled 59 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 60 | true 61 | ../../../CLEO4/cleo_sdk 62 | CompileAsCpp 63 | 64 | 65 | Windows 66 | true 67 | $(SolutionDir)bin\cameraexport.cleo 68 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 69 | 70 | 71 | 72 | 73 | Level3 74 | 75 | 76 | MaxSpeed 77 | true 78 | true 79 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 80 | true 81 | ../../../CLEO4/cleo_sdk 82 | 83 | 84 | Windows 85 | true 86 | true 87 | true 88 | $(SolutionDir)bin\cameraexport.cleo 89 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /cleoplugins/plpanel/forumpost.txt: -------------------------------------------------------------------------------- 1 | [color=black][font=arial] 2 | [b]Changelog[/b] 3 | Sept 10: fixed mission destination indicators for rescue missions, robin's theme: fixed fuel price not being shown when not in an airplane & the bar indicaters now also show for all vehicles 4 | August 20: changed opcodes for compatibility with sampfuncs (redownload and replace both the .cs and .cleo theme files!) 5 | August 19: initial D release 6 | [/font][/color][hr][color=black][font=arial] 7 | 8 | Good day all, 9 | 10 | This is a mod that I made which changes the HUD panel on PL. 11 | 12 | Main features: 13 | * Fixes fuel/health bars showing while on foot 14 | * Fixes heading bar having values like -1 -0 (0) 1 2 or 358 359 (360) 361 362 15 | * Changes 'Damage' to 'Health' 16 | * Per-frame instant updates for: heading bar, mission distance left, altitude, airspeed/car speed, vehicle health (both percentage and bar). [b]This means (internet) lag won't affect the update rate of the panel for these values![/b] 17 | * Blinking fuel bar when fuel is 20% or less 18 | * Blinking health bar when health is 35% or less 19 | 20 | Aside from these general patches, there are 3 themes available: 21 | 22 | [size=12pt]Standard theme[/size] 23 | [/font][/color][hr][color=black][font=arial] 24 | The normal bar as you probably know it, but with the patches. 25 | 26 | [img]https://user-images.githubusercontent.com/12662260/29479931-374aebbe-8475-11e7-9cf2-3c5b434d94f4.png[/img] 27 | 28 | [size=12pt]Classic theme[/size] 29 | [/font][/color][hr][color=black][font=arial] 30 | Get that sweet 2011 feeling with this remake of the old panel! Extra features for this theme: 31 | 32 | * Passenger satisfaction included in panel instead of a separate textdraw 33 | * GPS position above radar 34 | * Blinking fuel/health/odo indicator when critical level almost reached 35 | 36 | [img]https://user-images.githubusercontent.com/12662260/29479911-24072ae0-8475-11e7-8d50-d816f0a36e38.png[/img] 37 | 38 | [size=12pt]Robin's theme[/size] 39 | [/font][/color][hr][color=black][font=arial] 40 | Totally new panel 'design'. Extra features for this theme: 41 | 42 | * GPS position above radar 43 | * 'Native' progressbars for almost all values 44 | * Fuel price next to the fuel bar 45 | * Passenger satisfaction has its own bar 46 | * Blinkings fuel/health/odo bars when critical level almost reached 47 | * Classic themed status bar 48 | 49 | [img]https://user-images.githubusercontent.com/12662260/29479937-3b764f26-8475-11e7-947f-cc126c5f81f9.png[/img] 50 | 51 | [/font][/color][hr][color=black][font=arial] 52 | [color=blue][u][url=https://youtu.be/c9XvolkgaUE]demo video[/url][/u][/color] - just watch how instantly the indicators update, this is like pr0n 53 | 54 | [size=14pt]Requirements[/size] 55 | You need CLEO4: [color=blue][u][url=http://cleo.li]http://cleo.li[/url][/u][/color]. 56 | I won't help you with installing CLEO, use the internet and your common sense (if applicable). 57 | I only tested this on my exe, which is the EU1.0 version according to SAMP. I might look for compatibility with other exe's later. 58 | 59 | [size=14pt]Download[/size] 60 | Download this cs file: [color=blue][u][url=https://github.com/yugecin/scmcleoscripts/blob/master/cleoplugins/plpanel/plpanel.cs?raw=true]plpanel.cs[/url][/u][/color] 61 | Themes: [color=blue][u][url=https://github.com/yugecin/scmcleoscripts/blob/master/cleoplugins/plpanel/Release/plpanel-standard.cleo?raw=true]plpanel-standard.cleo[/url][/u][/color] - [color=blue][u][url=https://github.com/yugecin/scmcleoscripts/blob/master/cleoplugins/plpanel/Release/plpanel-classic.cleo?raw=true]plpanel-classic.cleo[/url][/u][/color] - [color=blue][u][url=https://github.com/yugecin/scmcleoscripts/blob/master/cleoplugins/plpanel/Release/plpanel-robin.cleo?raw=true]plpanel-robin.cleo[/url][/u][/color] 62 | 63 | [size=14pt]Installation[/size] 64 | Put the plpanel.cs file and [b]ONE[/b] of the .cleo files (choose your theme) in your CLEO directory. 65 | 66 | [b]uninstall:[/b] remove the .cs and the .cleo 67 | [b]switching themes:[/b] remove the .cleo file and place a different one in the CLEO directory 68 | 69 | The CLEO directory is where your GTASA installation is placed, usually at [font=courier]C:\Program Files (x86)\Rockstar Games\GTA San Andreas\[/font]. 70 | If you can't find the [font=courier]CLEO [/font]folder, you are either looking in the wrong place, or you didn't install CLEO (correctly) yet: in that case, go back to Requirements. 71 | 72 | [size=14pt]Usage[/size] 73 | No usage, it is always active. 74 | It won't have any effect on different servers or in singleplayer, so you don't need to uninstall it to play on non-pl servers. 75 | 76 | [size=14pt]Disclaimer[/size] 77 | Use this at your own risk. You won't get banned for using this (unless hud things get banned - but even then admins cannot detect this), but no guarantee that this won't break your computer, dog or marriage. 78 | 79 | [size=14pt]OMG MY GAEM CRASH WHEN START PLZ HELP!!!!1!11[/size] 80 | I only tested this on my exe, which is the EU1.0 version according to SAMP. Try to find a compatible [s]crack[/s] exe. I'm not going to help you with this, sorry. Just ask google (gta sa eu 1.0). 81 | 82 | [size=8pt]Psst: it's on github: 83 | [color=blue][u][url=https://github.com/yugecin/scmcleoscripts/tree/master/cleoplugins/plpanel]https://github.com/yugecin/scmcleoscripts/tree/master/cleoplugins/plpanel[/url][/u][/color][/size] 84 | 85 | Have a good flight! 86 | 87 | 88 | Cheers[/color] 89 | -------------------------------------------------------------------------------- /cleoplugins/yugecodes/yugecodes.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {6CCEA500-65B2-41EA-9F40-F0F96EB1EDAC} 15 | Win32Proj 16 | yugecodes 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | NotSet 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120 29 | true 30 | NotSet 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | false 45 | .cleo 46 | $(SolutionDir)bin\ 47 | 48 | 49 | false 50 | .cleo 51 | $(SolutionDir)bin\ 52 | 53 | 54 | 55 | 56 | 57 | Level3 58 | Disabled 59 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 60 | true 61 | ../../../CLEO4/cleo_sdk 62 | CompileAsCpp 63 | 64 | 65 | Windows 66 | true 67 | $(SolutionDir)bin\yugecodes.cleo 68 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 69 | 70 | 71 | 72 | 73 | Level3 74 | 75 | 76 | MaxSpeed 77 | true 78 | true 79 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 80 | true 81 | ../../../CLEO4/cleo_sdk 82 | CompileAsCpp 83 | MultiThreaded 84 | 85 | 86 | Windows 87 | true 88 | true 89 | true 90 | $(SolutionDir)bin\yugecodes.cleo 91 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /cleo/els_simple/simple_els.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | 3 | 03A4: name_thread 'ELS' 4 | 5 | // vars: 6 | // 1@ ELS enabled? 7 | // 4@ is player in car? 8 | // 5@ pattern index 9 | // 8@ player car 10 | // 9@ CDamageHandler pointer for player car 11 | // 33@ pattern delay timer 12 | 13 | 0006: 1@ = 0 14 | 0006: 5@ = 0 15 | 16 | // Fix vehicle back lights both using light state 3 (SA bug) 17 | // https://github.com/multitheftauto/mtasa-blue/blob/c0a35ccd2b7704c92907fd48f66eeea869e533a4/MTA10/multiplayer_sa/CMultiplayerSA.cpp#L1247 18 | 0A8C: write_memory 0x6E1D4F size 1 value 2 vp 0 // default value: 3 19 | 20 | // ---------------------------------------------------------------------------- 21 | // main start point 22 | 23 | 24 | :ELS_START 25 | 0001: wait 0 26 | 0050: gosub @INCAR 27 | 00D6: if 28 | 0039: 4@ == 1 //incar 29 | 004D: jf @ELS_START 30 | 00D6: if 31 | 0AB0: key_pressed 0x7B // f12 32 | 004D: jf @ELS_START_PATTERN 33 | 0050: gosub @TOGGLE 34 | 0001: wait $DEFAULT_WAIT_TIME // prevent double key 35 | 0002: jump @ELS_START 36 | 37 | :ELS_START_PATTERN 38 | 00D6: if and 39 | 0039: 1@ == 1 //enabled 40 | 0019: 33@ > 75 // pattern delay 41 | 004D: jf @ELS_START 42 | 067F: force_car 8@ lights_to 2 // 0 = NO_CAR_LIGHT_OVERRIDE | 1 = FORCE_CAR_LIGHTS_OFF | 2 = FORCE_CAR_LIGHTS_ON 43 | 0050: gosub @PATTERN_FRONT 44 | 0050: gosub @PATTERN_BACK 45 | 0006: 33@ = 0 46 | 000A: 5@ += 1 // pattern index 47 | 00D6: if 48 | 0019: 5@ > 23 49 | 004D: jf @ELS_START 50 | 0006: 5@ = 0 51 | 0002: jump @ELS_START 52 | 53 | 54 | // ---------------------------------------------------------------------------- 55 | // pattern control 56 | 57 | // -------------- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 58 | // front pattern: L - L - - - R - R - - - L - L - - - R - R - - - 59 | :PATTERN_FRONT 60 | 0871: switch 5@ total_cases 16 default_case -1 @R case 0 @FL case 1 @FN case 2 @FL case 3 @FN case 6 @FR case 7 @FN case 8 @FR 61 | 0872: switch_continued case 9 @FN case 12 @FL case 13 @FN case 14 @FL case 15 @FN case 18 @FR case 19 @FN case 20 @FR case 21 @FN 62 | 63 | // ------------- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 64 | // back pattern: L L L R R R L L L R R R L L L R R R L L L R R R 65 | :PATTERN_BACK 66 | 0871: switch 5@ total_cases 8 default_case -1 @R case 0 @BL case 3 @BR case 6 @BL case 9 @BR case 12 @BL case 15 @BR case 18 @BL 67 | 0872: switch_continued case 21 @BR case -1 @R case -1 @R case -1 @R case -1 @R case -1 @R case -1 @R case -1 @R case -1 @R 68 | 69 | :R 70 | return 71 | 72 | // ---------------------------------------------------------------------------- 73 | // light control 74 | 75 | :FL // front left 76 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 0 param_light_nr 0 77 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 1 param_light_nr 1 78 | return 79 | 80 | :FR // front right 81 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 1 param_light_nr 0 82 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 0 param_light_nr 1 83 | return 84 | 85 | :FB // front both 86 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 0 param_light_nr 0 87 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 0 param_light_nr 1 88 | return 89 | 90 | :FN // front none 91 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 1 param_light_nr 0 92 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 1 param_light_nr 1 93 | return 94 | 95 | :BL // back left 96 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 0 param_light_nr 2 97 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 1 param_light_nr 3 98 | return 99 | 100 | :BR // back right 101 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 1 param_light_nr 2 102 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 0 param_light_nr 3 103 | return 104 | 105 | :BB // back both 106 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 0 param_light_nr 2 107 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 0 param_light_nr 3 108 | return 109 | 110 | :BN // back none 111 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 1 param_light_nr 2 112 | 0AA6: call_method 0x6C2100 struct 9@ num_params 2 pop 0 param_destroyed 1 param_light_nr 3 113 | return 114 | 115 | // ---------------------------------------------------------------------------- 116 | // incar subroutine 117 | 118 | :INCAR 119 | 0006: 4@ = 0 //incar 120 | 00D6: if and 121 | 00DF: actor $PLAYER_ACTOR driving 122 | 84C8: not actor $PLAYER_ACTOR driving_flying_vehicle 123 | 84A9: not actor $PLAYER_ACTOR driving_heli 124 | 84A7: not actor $PLAYER_ACTOR driving_boat 125 | 847A: not actor $PLAYER_ACTOR driving_bike 126 | 004D: jf @INCAR_1 127 | 03C0: 8@ = actor $PLAYER_ACTOR car 128 | 0006: 4@ = 1 //incar 129 | 0A97: 9@ = car 8@ pointer 130 | 000A: 9@ += 0x5A0 131 | :INCAR_1 132 | return 133 | 134 | // ---------------------------------------------------------------------------- 135 | // toggle subroutine 136 | 137 | :TOGGLE 138 | 00D6: if 139 | 0039: 1@ == 1 //enabled 140 | 004D: jf @ENABLE 141 | 0AD0: show_formatted_text_lowpriority "ELS ~r~disabled" time 2000 142 | 0006: 1@ = 0 143 | 067F: force_car 8@ lights_to 1 // 1 = FORCE_CAR_LIGHTS_OFF 144 | 018C: play_sound 1053 at 0.0 0.0 0.0 145 | return 146 | 147 | :ENABLE 148 | 0AD0: show_formatted_text_lowpriority "ELS ~g~enabled" time 2000 149 | 0006: 1@ = 1 150 | 0006: 33@ = 0 // reset timer 151 | 018C: play_sound 1052 at 0.0 0.0 0.0 152 | return 153 | 154 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleoplugins/plpanel/plpanel.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | {6CCEA500-65B2-41EA-9F40-F0F96EB1EDAC} 15 | Win32Proj 16 | plpanel 17 | 18 | 19 | 20 | DynamicLibrary 21 | true 22 | v120 23 | MultiByte 24 | 25 | 26 | DynamicLibrary 27 | false 28 | v120 29 | true 30 | MultiByte 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | true 44 | false 45 | .cleo 46 | $(SolutionDir)bin\ 47 | 48 | 49 | false 50 | .cleo 51 | plpanel-$(ReleaseVersion) 52 | $(SolutionDir)Release\ 53 | 54 | 55 | 56 | 57 | 58 | Level3 59 | Disabled 60 | WIN32;_DEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions) 61 | true 62 | ../../../CLEO4/cleo_sdk 63 | CompileAsCpp 64 | 65 | 66 | Windows 67 | true 68 | $(SolutionDir)bin\plpanel.cleo 69 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 70 | 71 | 72 | 73 | 74 | Level3 75 | 76 | 77 | MaxSpeed 78 | true 79 | true 80 | WIN32;NDEBUG;_WINDOWS;_USRDLL;SIGNEXT_EXPORTS;%(PreprocessorDefinitions);THEME=$(Theme) 81 | true 82 | ../../../CLEO4/cleo_sdk 83 | CompileAsCpp 84 | 85 | 86 | Windows 87 | true 88 | true 89 | true 90 | $(SolutionDir)release\plpanel-$(ReleaseVersion).cleo 91 | ../../../CLEO4/cleo_sdk/CLEO.lib;%(AdditionalDependencies) 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /cleo/autopilot/autopilot-adv.txt: -------------------------------------------------------------------------------- 1 | {$CLEO .cs} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'AUTOPIL' 5 | 6 | // 0xB73458 pad 7 | // thiscall short CPad::GetSteeringUpDown(void) 0x53FBD0 8 | // thiscall short CPad::GetAccelerate(void) 0x5403F0 9 | // thiscall short CPad::GetSteeringLeftRight(void) 0x53FB80 10 | 11 | const 12 | ENABLED = 10@ 13 | CAR = 0@ 14 | TEMP1 = 1@ 15 | TEMP2 = 2@ 16 | TEMP3 = 3@ 17 | CX = 4@ 18 | CY = 5@ 19 | ANG = 6@ 20 | CPDIST = 7@ 21 | PX = 8@ 22 | PY = 9@ 23 | end 24 | 25 | :MAIN_LOOP 26 | 0001: wait 0 27 | 28 | 0449: actor $PLAYER_ACTOR in_a_car 29 | 004D: jump_if_false @MAIN_LOOP 30 | 03C0: CAR = actor $PLAYER_ACTOR car 31 | 0050: gosub @KEY 32 | 33 | 0019: ENABLED > 0 // LOCALVAR CMP INT 34 | 004D: jump_if_false @MAIN_LOOP 35 | 36 | /* 37 | 00AA: store_car 0@ position_to 3@ 4@ 5@ 38 | 03F0: enable_text_draw 0 39 | 0340: set_text_draw_RGBA 255 255 255 255 40 | 033F: set_text_draw_letter_size 0.15 0.95 41 | 0342: set_text_draw_centered 0 42 | 081C: draw_text_outline 0 RGBA 0 0 0 255 43 | 060D: draw_text_shadow 0 rgba 0 0 0 255 44 | 0092: 6@ = float 5@ to_integer 45 | 0348: enable_text_draw_proportional 0 46 | 045A: draw_text_1number 320.0 290.0 'NUMBER' number 6@ // ~1~ 47 | */ 48 | 49 | 0050: gosub @GETCP 50 | 00A0: store_actor $PLAYER_ACTOR position_to PX PY TEMP3 51 | 0509: CPDIST = distance_between_XY CX CY and_XY PX PY 52 | 53 | 077D: ANG = car CAR x_angle 54 | 55 | 0021: ANG > 180.0 // LOCALVAR CMP FLOAT 56 | 004D: jump_if_false @NOCORRECT 57 | 000F: ANG -= 360.0 // LOCALVAR MINUS FLOAT 58 | :NOCORRECT 59 | 00AA: store_car CAR position_to TEMP1 TEMP1 TEMP3 60 | 0023: 1250.0 > CPDIST // LOCALVAR CMP FLOAT 61 | 004D: jump_if_false @CHECKALT 62 | 0021: TEMP3 > 100.0 // LOCALVAR CMP FLOAT 63 | 004D: jump_if_false @HIGHENOUGH 64 | 000B: ANG += 10.0 // LOCALVAR PLUS FLOAT 65 | 0002: jump @HIGHENOUGH 66 | :CHECKALT 67 | 0023: 200.0 > TEMP3 // LOCALVAR CMP FLOAT 68 | 004D: jump_if_false @HIGHENOUGH 69 | 000F: ANG -= 10.0 // LOCALVAR MINUS FLOAT 70 | :HIGHENOUGH 71 | 72 | 0021: ANG > -2.0 // LOCALVAR CMP FLOAT 73 | 004D: jump_if_false @GOUP 74 | 0050: gosub @DOWN 75 | 0002: jump @FINISHUPDOWN 76 | :GOUP 77 | 0023: -5.0 > ANG // LOCALVAR CMP FLOAT 78 | 004D: jump_if_false @FINISHUPDOWN 79 | 0050: gosub @UP 80 | :FINISHUPDOWN 81 | 82 | 06BE: ANG = car CAR y_angle 83 | 84 | 8043: not CX == 0.0 // LOCALVAR EQ FLOAT 85 | 004D: jump_if_false @NOCP 86 | 0063: PX -= CX // (float) 87 | 0063: PY -= CY // (float) 88 | 0604: get_Z_angle_for_point PX PY store_to TEMP3 89 | 0174: TEMP2 = car CAR Z_angle 90 | 0063: TEMP2 -= TEMP3 // (float) 91 | 000B: TEMP2 += 180.0 // LOCALVAR PLUS FLOAT 92 | 0656: get_angle TEMP2 absolute_degrees_to TEMP2 93 | 8043: not TEMP2 == 0.0 // LOCALVAR EQ FLOAT 94 | 004D: jump_if_false @NOCP 95 | 0021: TEMP2 > 180.0 // LOCALVAR CMP FLOAT 96 | 004D: jump_if_false @NOMINUS 97 | 000F: TEMP2 -= 360.0 // LOCALVAR MINUS FLOAT 98 | :NOMINUS 99 | // 35 as initial angle, it is limited by the updaterate & simulated pad value 100 | 0007: TEMP3 = 35.0 // LOCALVAR ASSIGNMENT FLOAT 101 | 0087: TEMP1 = TEMP2 // (float) GLOCALVAR ASSIGNMENT FLOAT 102 | 0097: make TEMP1 absolute_float 103 | 0023: 10.0 > TEMP1 // LOCALVAR CMP FLOAT 104 | 004D: jump_if_false @MAXBANK 105 | 0087: TEMP3 = TEMP1 // (float) GLOCALVAR ASSIGNMENT FLOAT 106 | 0017: TEMP3 /= 2.0 // LOCALVAR DIVIDE FLOAT 107 | :MAXBANK 108 | 0023: 0.0 > TEMP2 // LOCALVAR CMP FLOAT 109 | 004D: jump_if_false @ADJUST 110 | 0063: ANG -= TEMP3 // (float) LOCALVAR MIN FLOAT 111 | 0002: jump @NOCP 112 | :ADJUST 113 | 005B: ANG += TEMP3 // (float) LOCALVAR PLUS FLOAT 114 | :NOCP 115 | 116 | 8043: not ANG == 0.0 // LOCALVAR EQ FLOAT 117 | 004D: jump_if_false @FINISHLEFTRIGHT 118 | 0021: ANG > 0.0 // LOCALVAR CMP FLOAT 119 | 004D: jump_if_false @GOLEFT 120 | 0050: gosub @RIGHT 121 | 0002: jump @FINISHLEFTRIGHT 122 | :GOLEFT 123 | 0050: gosub @LEFT 124 | :FINISHLEFTRIGHT 125 | 126 | 0001: wait 0 127 | 0050: gosub @RESTOREUPDOWN 128 | 0050: gosub @RESTORELEFTRIGHT 129 | 0006: 32@ = 0 // LOCALVAR ASSIGNMENT INT 130 | :WAIT_LOOP 131 | 0001: wait 0 132 | 0050: gosub @KEY 133 | 0019: 32@ > 50 // LOCALVAR CMP INT 134 | 004D: jump_if_false @WAIT_LOOP 135 | 136 | 0002: jump @MAIN_LOOP 137 | 138 | :GETCP 139 | 0006: TEMP1 = 0xC7F158 140 | 0006: TEMP2 = 0 141 | 0007: CX = 0.0 142 | :NEXTCP 143 | 001B: 32 > TEMP2 // LOCALVAR CMP INT 144 | 004D: jump_if_false @RET 145 | 000A: TEMP2 += 1 // LOCALVAR PLUS INT 146 | 000A: TEMP1 += 2 // LOCALVAR PLUS INT 147 | 0A8D: TEMP3 = read_memory TEMP1 size 1 virtual_protect 0 148 | 000A: TEMP1 += 0x36 // LOCALVAR PLUS INT 149 | 0039: TEMP3 == 1 // LOCALVAR EQ INT 150 | 004D: jump_if_false @NEXTCP 151 | 000E: TEMP1 -= 0x38 // LOCALVAR MINUS INT 152 | 000A: TEMP1 += 0x10 // LOCALVAR PLUS INT 153 | 0A8D: CX = read_memory TEMP1 size 4 virtual_protect 0 154 | 000A: TEMP1 += 4 // LOCALVAR PLUS INT 155 | 0A8D: CY = read_memory TEMP1 size 4 virtual_protect 0 156 | :RET 157 | 0051: return 158 | 159 | :KEY 160 | 0AB0: key_pressed 0x7B // F12 161 | 004D: jump_if_false @SKIPKEY 162 | 0001: wait 200 163 | 0019: ENABLED > 0 // LOCALVAR CMP INT 164 | 004D: jump_if_false @ENABLE 165 | 0006: ENABLED = 0 166 | 0050: gosub @RESTOREACCEL 167 | 0002: jump @SKIPKEY 168 | :ENABLE 169 | 0006: ENABLED = 1 170 | 0050: gosub @ACCELERATE 171 | :SKIPKEY 172 | 0051: return 173 | 174 | :RESTOREACCEL 175 | 0A8C: write_memory 0x5403FA size 4 value 0x0A81B70F virtual_protect 0 176 | 0A8C: write_memory 0x5403FE size 1 value 0x01 virtual_protect 0 177 | 0051: return 178 | 179 | :RESTOREUPDOWN 180 | 0A8C: write_memory 0x53FBDA size 4 value 0x0A81B70F virtual_protect 0 181 | 0A8C: write_memory 0x53FBDE size 1 value 0x01 virtual_protect 0 182 | 0051: return 183 | 184 | :RESTORELEFTRIGHT 185 | 0A8C: write_memory 0x53FB8A size 4 value 0x0A81B70F virtual_protect 0 186 | 0A8C: write_memory 0x53FB8E size 1 value 0x01 virtual_protect 0 187 | 0051: return 188 | 189 | :ACCELERATE 190 | 0A8C: write_memory 0x5403FA size 4 value 0x00FFB866 virtual_protect 0 // mov ax, ff 191 | 0A8C: write_memory 0x5403FE size 1 value 0xC3 virtual_protect 0 // retn 192 | 0051: return 193 | 194 | :DOWN 195 | 0A8C: write_memory 0x53FBDA size 4 value 0xFFA0B866 virtual_protect 0 // mov ax, ff80 196 | 0A8C: write_memory 0x53FBDE size 1 value 0xC3 virtual_protect 0 // retn 197 | 0051: return 198 | 199 | :UP 200 | 0A8C: write_memory 0x53FBDA size 4 value 0x000BB866 virtual_protect 0 // mov ax, 80 201 | 0A8C: write_memory 0x53FBDE size 1 value 0xC3 virtual_protect 0 // retn 202 | 0051: return 203 | 204 | :LEFT 205 | 0A8C: write_memory 0x53FB8A size 4 value 0xFFF0B866 virtual_protect 0 // mov ax, ff80 206 | 0A8C: write_memory 0x53FB8E size 1 value 0xC3 virtual_protect 0 // retn 207 | 0051: return 208 | 209 | :RIGHT 210 | 0A8C: write_memory 0x53FB8A size 4 value 0x000BB866 virtual_protect 0 // mov ax, 80 211 | 0A8C: write_memory 0x53FB8E size 1 value 0xC3 virtual_protect 0 // retn 212 | 0051: return 213 | 214 | 0A93: end_custom_thread -------------------------------------------------------------------------------- /cleo/plradar/plradar.txt: -------------------------------------------------------------------------------- 1 | {$CLEO} 2 | {$NOSOURCE} 3 | 4 | 03A4: name_thread 'PLRADAR' 5 | 6 | const 7 | X1 = 1@ 8 | Y1 = 2@ 9 | X2 = 3@ 10 | Y2 = 4@ 11 | PTR = 5@ 12 | DISTANCE = 6@ 13 | PX = 7@ 14 | PY = 8@ 15 | MX = 9@ 16 | MY = 10@ 17 | ENABLED = 11@ 18 | CX = 12@ 19 | CY = 13@ 20 | SMARTMODE = 14@ 21 | CLOSESTAS = 15@ 22 | ASPTR = 16@ 23 | TEMP3 = 17@ 24 | TEMP2 = 18@ 25 | TEMP = 19@ 26 | FIXTMR = 33@ 27 | end 28 | 29 | 0006: SMARTMODE = 1 30 | 31 | :MAIN_LOOP 32 | 0001: wait 0 33 | 34 | 0AB0: key_pressed 0x7A // F11 35 | 004D: jump_if_false @SKIPKEY 36 | 0001: wait 200 37 | 0AB0: key_pressed 0x47 // G 38 | 004D: jump_if_false @SKIPMODE 39 | 0019: SMARTMODE > 0 // LOCALVAR CMP INT 40 | 004D: jump_if_false @ENMODE 41 | 0006: SMARTMODE = 0 42 | 0002: jump @SKIPKEY 43 | :ENMODE 44 | 0006: SMARTMODE = 1 45 | 0002: jump @SKIPKEY 46 | :SKIPMODE 47 | 0019: ENABLED > 0 // LOCALVAR CMP INT 48 | 004D: jump_if_false @ENABLE 49 | 0006: ENABLED = 0 50 | 0050: gosub @FIXAIRSTRIP 51 | 0002: jump @SKIPKEY 52 | :ENABLE 53 | 0006: ENABLED = 1 54 | :SKIPKEY 55 | 0019: ENABLED > 0 // LOCALVAR CMP INT 56 | 004D: jump_if_false @MAIN_LOOP 57 | 58 | 0039: SMARTMODE == 0 // LOCALVAR EQ INT 59 | 004D: jump_if_false @GETCP 60 | :GOTCP 61 | 62 | // === fix stuff.. 63 | 0019: FIXTMR > 10000 // LOCALVAR CMP INT 64 | 004D: jump_if_false @FIX1 65 | 0006: FIXTMR = 0 66 | 0A8C: write_memory 0x587D4B size 1 value 4 vp 0 67 | 0002: jump @NOFIX 68 | :FIX1 69 | 0019: FIXTMR > 5000 // LOCALVAR CMP INT 70 | 004D: jump_if_false @NOFIX 71 | 0006: FIXTMR = 11000 72 | 0A8C: write_memory 0x587D4B size 1 value 255 vp 0 73 | :NOFIX 74 | // === 75 | 76 | 00A0: store_actor $PLAYER_ACTOR position_to PX PY TEMP 77 | 0AC6: PTR = label @AIRPORTS offset 78 | 79 | 0006: ASPTR = 0x8D06E0 80 | 0007: CLOSESTAS = 100000.0 81 | 0050: gosub @BREAKAIRSTRIP 82 | 83 | :NEXTPTR 84 | 0A8D: X1 = read_memory PTR size 4 virtual_protect 0 85 | 0039: X1 == 0 // LOCALVAR EQ INT 86 | 004D: jump_if_false @MLY 87 | 0002: jump @MAIN_LOOP 88 | :MLY 89 | 000A: PTR += 4 // LOCALVAR PLUS INT 90 | 0A8D: Y1 = read_memory PTR size 4 virtual_protect 0 91 | 000A: PTR += 8 // LOCALVAR PLUS INT 92 | 0A8D: X2 = read_memory PTR size 4 virtual_protect 0 93 | 000A: PTR += 4 // LOCALVAR PLUS INT 94 | 0A8D: Y2 = read_memory PTR size 4 virtual_protect 0 95 | 000A: PTR += 8 // LOCALVAR PLUS INT 96 | 0A8D: TEMP = read_memory PTR size 1 virtual_protect 0 97 | 000A: PTR += 1 // LOCALVAR PLUS INT 98 | 005A: PTR += TEMP // (int) LOCALVAR PLUS INT 99 | 100 | 0087: MX = X2 // (float) GLOCALVAR ASSIGNMENT FLOAT 101 | 0063: MX -= X1 // (float) LOCALVAR MIN FLOAT 102 | 0013: MX *= 0.5 // LOCALVAR MULTIPLY FLOAT 103 | 005B: MX += X1 // (float) LOCALVAR PLUS FLOAT 104 | 0087: MY = Y2 // (float) GLOCALVAR ASSIGNMENT FLOAT 105 | 0063: MY -= Y1 // (float) LOCALVAR MIN FLOAT 106 | 0013: MY *= 0.5 // LOCALVAR MULTIPLY FLOAT 107 | 005B: MY += Y1 // (float) LOCALVAR PLUS FLOAT 108 | 0509: TEMP3 = distance_between_XY MX MY and_XY X1 Y1 109 | 000B: TEMP3 += 40.0 // LOCALVAR PLUS FLOAT 110 | 0509: DISTANCE = distance_between_XY MX MY and_XY PX PY 111 | 112 | 0039: SMARTMODE == 1 // LOCALVAR EQ INT 113 | 004D: jump_if_false @NOSMART 114 | 000B: TEMP3 += 100.0 // LOCALVAR PLUS FLOAT 115 | 0509: TEMP = distance_between_XY MX MY and_XY CX CY 116 | 0025: TEMP3 > TEMP // (float) LOCALVAL CMP FLOAT 117 | 004D: jump_if_false @NEXTPTR 118 | 000F: TEMP3 -= 100.0 // LOCALVAR MINUS FLOAT 119 | 8043: not CX == 0.0 // LOCALVAR EQ FLOAT 120 | 004D: jump_if_false @NEXTPTR 121 | :NOSMART 122 | 123 | 0039: SMARTMODE == 0 // LOCALVAR EQ INT 124 | 004D: jump_if_false @WRITEAIRSTRIP 125 | 0025: CLOSESTAS > DISTANCE // (float) LOCALVAL CMP FLOAT 126 | 004D: jump_if_false @NOAS 127 | 0087: CLOSESTAS = DISTANCE // (float) GLOCALVAR ASSIGNMENT FLOAT 128 | :WRITEAIRSTRIP 129 | 0A8C: write_memory ASPTR size 4 value MX vp 0 130 | 000A: ASPTR += 4 // LOCALVAR PLUS INT 131 | 0A8C: write_memory ASPTR size 4 value MY vp 0 132 | 000A: ASPTR += 4 // LOCALVAR PLUS INT 133 | 0087: TEMP = X1 // (float) GLOCALVAR ASSIGNMENT FLOAT 134 | 0087: TEMP2 = Y1 // (float) GLOCALVAR ASSIGNMENT FLOAT 135 | 0063: TEMP -= X2 // (float) LOCALVAR MIN FLOAT 136 | 0063: TEMP2 -= Y2 // (float) LOCALVAR MIN FLOAT 137 | 0604: get_Z_angle_for_point TEMP TEMP2 store_to TEMP 138 | 000F: TEMP -= 90.0 // LOCALVAR MINUS FLOAT 139 | 0007: TEMP2 = 360.0 // LOCALVAR ASSIGNMENT FLOAT 140 | 0063: TEMP2 -= TEMP // (float) LOCALVAR MIN FLOAT 141 | //0656: get_angle TEMP2 absolute_degrees_to TEMP2 142 | 0A8C: write_memory ASPTR size 4 value TEMP2 vp 0 143 | 000A: ASPTR += 4 // LOCALVAR PLUS INT 144 | 0509: TEMP = distance_between_XY X1 Y1 and_XY X2 Y2 145 | 0013: TEMP *= 2.0 // LOCALVAR MULTIPLY FLOAT 146 | 0A8C: write_memory ASPTR size 4 value TEMP vp 0 147 | 000A: ASPTR += 4 // LOCALVAR PLUS INT 148 | 0019: ASPTR > 0x8D0710 // LOCALVAR CMP INT 149 | 004D: jump_if_false @NOAS 150 | 0006: ASPTR = 0x8D06E0 151 | :NOAS 152 | 153 | 0002: jump @NEXTPTR 154 | 155 | :GETCP 156 | 0006: PTR = 0xC7F158 157 | 0006: TEMP = 0 158 | 0007: CX = 0.0 159 | :NEXTCP 160 | 001B: 32 > TEMP // LOCALVAR CMP INT 161 | 004D: jump_if_false @GOTCP 162 | 000A: TEMP += 1 // LOCALVAR PLUS INT 163 | 000A: PTR += 2 // LOCALVAR PLUS INT 164 | 0A8D: TEMP2 = read_memory PTR size 1 virtual_protect 0 165 | 000A: PTR += 0x36 // LOCALVAR PLUS INT 166 | 0039: TEMP2 == 1 // LOCALVAR EQ INT 167 | 004D: jump_if_false @NEXTCP 168 | 000E: PTR -= 0x38 // LOCALVAR MINUS INT 169 | 000A: PTR += 0x10 // LOCALVAR PLUS INT 170 | 0A8D: CX = read_memory PTR size 4 virtual_protect 0 171 | 000A: PTR += 4 // LOCALVAR PLUS INT 172 | 0A8D: CY = read_memory PTR size 4 virtual_protect 0 173 | 0002: jump @GOTCP 174 | 175 | //============================================================== 176 | 177 | :BREAKAIRSTRIP 178 | 0A8C: write_memory 0x8D06E0 size 4 value 200000.0 vp 0 179 | 0A8C: write_memory 0x8D06F0 size 4 value 200000.0 vp 0 180 | 0A8C: write_memory 0x8D0700 size 4 value 200000.0 vp 0 181 | 0A8C: write_memory 0x8D0710 size 4 value 200000.0 vp 0 182 | 0051: return 183 | 184 | :FIXAIRSTRIP 185 | 0A8C: write_memory 0x8D06E0 size 4 value 1750.0 vp 0 186 | 0A8C: write_memory 0x8D06E4 size 4 value -2494.0 vp 0 187 | 0A8C: write_memory 0x8D06E8 size 4 value 180.0 vp 0 188 | 0A8C: write_memory 0x8D06EC size 4 value 1000.0 vp 0 189 | 0A8C: write_memory 0x8D06F0 size 4 value -1373.0 vp 0 190 | 0A8C: write_memory 0x8D06F4 size 4 value 120.0 vp 0 191 | 0A8C: write_memory 0x8D06F8 size 4 value 315.0 vp 0 192 | 0A8C: write_memory 0x8D06FC size 4 value 1500.0 vp 0 193 | 0A8C: write_memory 0x8D0700 size 4 value 1478.0 vp 0 194 | 0A8C: write_memory 0x8D0704 size 4 value 1461.0 vp 0 195 | 0A8C: write_memory 0x8D0708 size 4 value 90.0 vp 0 196 | 0A8C: write_memory 0x8D070C size 4 value 1200.0 vp 0 197 | 0A8C: write_memory 0x8D0710 size 4 value 175.0 vp 0 198 | 0A8C: write_memory 0x8D0714 size 4 value 2502.0 vp 0 199 | 0A8C: write_memory 0x8D0718 size 4 value 180.0 vp 0 200 | 0A8C: write_memory 0x8D071C size 4 value 1000.0 vp 0 201 | 0051: return 202 | 203 | //============================================================== 204 | 205 | {$INCLUDE ../plhud/plhudairports.txt} 206 | 207 | 0A93: end_custom_thread 208 | --------------------------------------------------------------------------------