Difference between revisions of "0367"

From GTAMods Wiki
Jump to navigation Jump to search
(code for vc)
m
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Icon|3}}
+
{{OpCode
<hr />
+
| games      = {{Icon|3}}
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
+
| command    = START_KILL_FRENZY_HEADSHOT
'''Description'''
+
| description = Initiates a headshot rampage
: Initiates a headshot rampage
+
| syntax1    = 0367: init_gta3_rampage '[''string'']' [''int1''] [''int2''] [''int3''] [''int4''] [''int5''] [''int6''] [''int7''] [''int8'']
'''Syntax'''
+
| p1t        = [''string'']
: 0367: init_gta3_rampage '[''string'']' [''int1''] [''int2''] [''int3''] [''int4''] [''int5''] [''int6''] [''int7''] [''int8'']
+
| p1d        = [[GXT]] key to display at the start of the rampage. The text is small and yellow and fades in and out
'''Parameter'''
+
| p2t        = [''int1'']
: [''string'']
+
| p2d        = [[Weapon#GTA III|Weapon type]]
:: [[GXT]] string that is displayed at the beginning of the rampage. The text is small and yellow and fades in and out
+
| p3t        = [''int2'']
: [''int1'']
+
| p3d        = Time in milliseconds allowed for the rampage
:: [[Weapon#GTA3|Weapon]] index number
+
| p4t        = [''int3'']
: [''int2'']
+
| p4d        = Number of targets required to complete rampage
:: Time in milliseconds allowed for the rampage
+
| p5t        = [''int4'']
: [''int3'']
+
| p5d        = Target #1 model index as defined in the [[PEDS|PEDS section]] of the [[IDE]] file; also acceptable is model's [[DFF]] name with a hash character. Use ''-1'' for any ped.
:: Number of targets required to complete rampage
+
| p6t        = [''int5'']
: [''int4'']
+
| p6d        = Target #2, use ''-1'' if target #2 is not needed
:: Target #1 character model ID number as defined in the [[PEDS|PEDS section]] of the [[IDE]] file; also acceptable is model's [[DFF]] name with a hash character. Use -1 for any ped.
+
| p7t        = [''int6'']
: [''int5'']
+
| p7d        = Target #3, use ''-1'' if target #3 is not needed
:: Target #2, use -1 if target #2 is not needed
+
| p8t        = [''int7'']
: [''int6'']
+
| p8d        = Target #4, use ''-1'' if target #4 is not needed
:: Target #3, use -1 if target #3 is not needed
+
| p9t        = [''int8'']
: [''int7'']
+
| p9d        = Normally set to ''0'', but if set to ''1'', completing the rampage will display the GXT key <code>KF_3</code>, which does not exist by default in the GXT file, and so will display the text as "KF&deg;3 missing". The text is light green and fades in and out while it scrolls up at the same time.
:: Target #4, use -1 if target #4 is not needed
+
}}
: [''int8'']
 
:: Normally set to 0, but if set to 1, completing the rampage will display the GXT string <code>KF_3</code>, which does not exist by default in the GXT file, and so will display the text as "KF&deg;3 missing". The text is light green and fades in and out while it scrolls up at the same time.
 
}}</onlyinclude>
 
  
This opcode initiates a rampage that requires headshots to complete the rampage. When the rampage starts, a small magenta timer appears on the right side of the screen and will count down to 0. An orange counter appears below indicating the number of headshots of the target models needed to complete the rampage. The player character will be given the set weapon with unlimited ammo and weapon scrolling is disabled. Of course, the rampage can only be completed with weapons that can shoot the head off the peds. The M16 and Sniper Rifle can instantly cause a headshot but any guns that fire bullets have a chance to cause a headshot. When the timer reaches ten seconds, beeps are sounded until the rampage ends. When the timer reaches three seconds, the timer will flash.
+
This opcode initiates a rampage that requires headshots to complete the rampage. When the rampage starts, a small magenta timer appears on the right side of the screen and will count down to 0. An orange counter appears below indicating the number of headshots of the target models needed to complete the rampage. The player character will be given the set weapon with 30000 ammo and weapon scrolling is disabled. Of course, the rampage can only be completed with weapons that can shoot the head off the peds. The M16 and Sniper Rifle can instantly cause a headshot but any guns that fire bullets have a chance to cause a headshot. When the timer reaches ten seconds, beeps are sounded until the rampage ends. When the timer reaches three seconds, the timer will flash.
  
Initiating another rampage while the current one is in progress will instantly ends the previous one and starts the next one. But after the rampage ends, the weapon from the previous rampage does not disappear and will give the player max ammo for that weapon.
+
Although not recommended, initiating another rampage while the current one is in progress will instantly end the previous one and start the next one. But after the rampage ends, the weapon from the previous rampage does not disappear and will give the player max ammo for that weapon.
  
 
== For Vice City ==
 
== For Vice City ==
 
This opcode does not exist in Vice City, but the function that starts rampages still allows headshot-only rampages. The following example, using Sanny Builder with [[CLEO]] for Vice City in an external script (not the main one), and tested on US v1.0, should work similarly to this opcode. Place this at the end of the file:
 
This opcode does not exist in Vice City, but the function that starts rampages still allows headshot-only rampages. The following example, using Sanny Builder with [[CLEO]] for Vice City in an external script (not the main one), and tested on US v1.0, should work similarly to this opcode. Place this at the end of the file:
<source lang="scm">
+
{{Pre|class=sb-code|1=
:opcode_0367_supplement
+
<span class="nl">:opcode_0367_supplement</span>
while true
+
<span class="k">while</span> <span class="k">true</span>
     wait 0
+
     <span class="k">wait</span> <span class="m">0</span>
     01FA: 0@ = rampage_status
+
     01FA: <span class="nv">0@</span> = rampage_status
     if
+
     <span class="k">if</span>
         0@ == 1  // make sure rampage has started
+
         <span class="nv">0@</span> == <span class="m">1</span> <span class="c1">// make sure rampage has started</span>
     then
+
     <span class="k">then</span>
         05DF: write_memory 0xA10B94 size 1 value 1 virtual_protect 0  // enables headshot-only
+
         05DF: write_memory <span class="m">0xA10B94</span> size <span class="m">1</span> value <span class="m">1</span> virtual_protect <span class="m">0</span> <span class="c1">// enables headshot-only</span>
 
         break
 
         break
     end
+
     <span class="k">end</span>
end
+
<span class="k">end</span>
05F6: ret 0
+
05F6: ret <span class="m">0</span>
</source>
+
}}
 +
 
 
Use this line as a supplement for opcode 01F9. This can be placed on the line just below 01F9 within the external script:
 
Use this line as a supplement for opcode 01F9. This can be placed on the line just below 01F9 within the external script:
<source lang="scm">
+
{{Pre|class=sb-code|1=
 
01F9: ...
 
01F9: ...
05F5: call_scm_func @opcode_0367_supplement inputs 0
+
05F5: call_scm_func <span class="nl">@opcode_0367_supplement</span> inputs <span class="m">0</span>
</source>
+
}}
  
 
== Keywords ==
 
== Keywords ==
Line 57: Line 55:
  
 
== See also ==
 
== See also ==
* [[01F9]], for general rampage
+
* {{Icon|t}} [[01F9]], for general rampage
  
[[Category:OpCodes]][[Category:Code Snippets]]
+
[[Category:Code Snippets]]

Latest revision as of 02:46, 9 July 2017

GTA III START_KILL_FRENZY_HEADSHOT


Description
Initiates a headshot rampage
Syntax
0367: init_gta3_rampage '[string]' [int1] [int2] [int3] [int4] [int5] [int6] [int7] [int8]
Parameter
[string]
GXT key to display at the start of the rampage. The text is small and yellow and fades in and out
[int1]
Weapon type
[int2]
Time in milliseconds allowed for the rampage
[int3]
Number of targets required to complete rampage
[int4]
Target #1 model index as defined in the PEDS section of the IDE file; also acceptable is model's DFF name with a hash character. Use -1 for any ped.
[int5]
Target #2, use -1 if target #2 is not needed
[int6]
Target #3, use -1 if target #3 is not needed
[int7]
Target #4, use -1 if target #4 is not needed
[int8]
Normally set to 0, but if set to 1, completing the rampage will display the GXT key KF_3, which does not exist by default in the GXT file, and so will display the text as "KF°3 missing". The text is light green and fades in and out while it scrolls up at the same time.

This opcode initiates a rampage that requires headshots to complete the rampage. When the rampage starts, a small magenta timer appears on the right side of the screen and will count down to 0. An orange counter appears below indicating the number of headshots of the target models needed to complete the rampage. The player character will be given the set weapon with 30000 ammo and weapon scrolling is disabled. Of course, the rampage can only be completed with weapons that can shoot the head off the peds. The M16 and Sniper Rifle can instantly cause a headshot but any guns that fire bullets have a chance to cause a headshot. When the timer reaches ten seconds, beeps are sounded until the rampage ends. When the timer reaches three seconds, the timer will flash.

Although not recommended, initiating another rampage while the current one is in progress will instantly end the previous one and start the next one. But after the rampage ends, the weapon from the previous rampage does not disappear and will give the player max ammo for that weapon.

For Vice City

This opcode does not exist in Vice City, but the function that starts rampages still allows headshot-only rampages. The following example, using Sanny Builder with CLEO for Vice City in an external script (not the main one), and tested on US v1.0, should work similarly to this opcode. Place this at the end of the file:

:opcode_0367_supplement
while true
    wait 0
    01FA: 0@ = rampage_status
    if
        0@ == 1  // make sure rampage has started
    then
        05DF: write_memory 0xA10B94 size 1 value 1 virtual_protect 0  // enables headshot-only
        break
    end
end
05F6: ret 0

Use this line as a supplement for opcode 01F9. This can be placed on the line just below 01F9 within the external script:

01F9: ...
05F5: call_scm_func @opcode_0367_supplement inputs 0

Keywords

init, rampage, head shot, kill frenzy

See also

  • GTA III Vice City San Andreas 01F9, for general rampage