Last active
August 29, 2015 14:13
-
-
Save RobSis/ec96da95655abab08394 to your computer and use it in GitHub Desktop.
Civil War is a Cleo mod for GTA: San Andreas.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Civil War is Cleo mod for San Andreas. | |
// It toggles bunch of cheats to create civil war-like | |
// settings and adds counter of kills since last death. | |
// Type CIVILWAR to enable/disable the mod, and Tab to | |
// hide/show the counter. | |
// | |
// http://gist.github.com/RobSis/ | |
{$CLEO .cs} | |
:CIVILWAR | |
03A4: name_thread "CIVILWAR" | |
11@ = 0 // is cheat enabled? | |
22@ = 1 // is kill counter enabled? | |
0001: wait 2000 ms | |
:RIOT_MAIN | |
0001: wait 0 ms | |
0050: gosub @COUNTER | |
if or | |
11@ == 0 | |
8AB0: not key_pressed 9 // Tab | |
0AA0: gosub_if_false @COUNTER_TOGGLE | |
// see http://gtag.gtagaming.com/forums/index.php?showtopic=355 | |
0A8D: 0@ = read_memory 0x969110 size 4 virtual_protect 0 | |
0A8D: 1@ = read_memory 0x969114 size 4 virtual_protect 0 | |
if | |
85AE: 0@s != "RAWLIVIC" // @s == 'short' | |
0AA0: gosub_if_false @CHEATS_TOGGLE | |
0002: jump @RIOT_MAIN | |
:COUNTER | |
if and | |
11@ == 1 | |
22@ == 1 | |
004D: jump_if_false @COUNTER_END | |
0652: 1@ = integer_stat 176 | |
03F0: enable_text_draw 1 | |
033F: set_text_draw_letter_size 0.5 1.5 | |
0340: set_text_draw_RGBA 156 156 156 255 | |
0343: set_text_draw_linewidth 1000.0 | |
0349: set_text_draw_font 3 | |
081C: draw_text_outline 2 RGBA 0 0 0 255 | |
033E: set_draw_text_position 37.0 20.0 GXT 'DEAD' // "Wasted" | |
033F: set_text_draw_letter_size 1.0 3.0 | |
0340: set_text_draw_RGBA 156 156 156 255 | |
0343: set_text_draw_linewidth 1000.0 | |
0349: set_text_draw_font 3 | |
081C: draw_text_outline 2 RGBA 0 0 0 255 | |
045A: draw_text_1number 37.0 30.0 GXT 'NUMBER' number 1@ | |
:COUNTER_END | |
0051: return | |
:COUNTER_TOGGLE | |
if | |
22@ == 0 | |
004D: jump_if_false @COUNTER_DISABLE | |
:COUNTER_ENABLE | |
22@ = 1 | |
0001: wait 200 ms | |
0051: return | |
:COUNTER_DISABLE | |
22@ = 0 | |
0001: wait 200 ms | |
0051: return | |
:CHEATS_TOGGLE | |
if | |
11@ == 0 | |
004D: jump_if_false @CHEATS_DISABLE | |
:CHEATS_ENABLE | |
11@ = 1 | |
03E5: show_text_box 'CHEAT1' // "Cheat activated" | |
0A8C: write_memory 0x6127CD size 4 value 32 virtual_protect 1 // replace rocket launcher with smg | |
0002: jump @CHEATS_DO | |
:CHEATS_DISABLE | |
11@ = 0 | |
03E5: show_text_box 'CHEAT8' // "Cheat deactivated" | |
0A8C: write_memory 0x6127CD size 4 value 35 virtual_protect 1 | |
0002: jump @CHEATS_DO | |
:CHEATS_DO | |
0A8C: write_memory 0x969110 size 4 value 0x0 virtual_protect 0 // Clear (part) of buffer to prevent cheat looping | |
0A8C: write_memory 0x969175 size 1 value 11@ virtual_protect 0 // Peds Riot (Chaos Mode) | |
0A8C: write_memory 0x96914F size 1 value 11@ virtual_protect 0 // Aggressive Drivers | |
0A8C: write_memory 0x96913E size 1 value 11@ virtual_protect 0 // Peds Attack Each Other, Get Golfclub | |
0A8C: write_memory 0x96913F size 1 value 11@ virtual_protect 0 // Have Bounty on Head | |
0A8C: write_memory 0x969171 size 1 value 11@ virtual_protect 0 // Never Wanted | |
// disappearing pedestrians fix (from Junior_Djjr's Mod Mix Sets) | |
0A8C: write_memory 0x6121CD 4 -1869574000 1 | |
0A8C: write_memory 0x6121D1 2 37008 1 | |
0A8C: write_memory 0x6121D3 1 144 1 | |
// radius for peds to appear (10.0 is default) | |
0A8C: write_memory 0x871008 4 200 1 | |
0051: return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment