Difference between revisions of "021F"

From GTAMods Wiki
Jump to navigation Jump to search
m
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Icon|3}} '''SET_ALL_TAXI_LIGHTS'''
+
{{OpCode
<hr />
+
| games      = {{Icon|3}}
'''Description'''
+
| command    = SET_ALL_TAXI_LIGHTS
: Sets all taxi roof lights
+
| description = Sets all taxi roof lights
'''Syntax'''
+
| syntax1    = 021F: set_all_taxi_lights [''int'']
: 021F: set_all_taxi_lights [''int'']
+
| p1t        = [''int'']
'''Parameter'''
+
| p1d        = 0 = roof lights off (default), {{hint|1|or any value other than 0}} = roof lights on
: [''int'']
+
}}
:: 0 = roof lights off (default), {{hint|1|or any value other than 0}} = roof lights on
 
  
 
This opcode allows all taxis to spawn with their roof lights turned on. Anything that can spawn a taxi like [[00A5]], [[014B]], or natural traffic, is affected. Taxis that are already spawned are not affected by this opcode. This opcode was never called in the [[Main.scm|original script]] of GTA III.
 
This opcode allows all taxis to spawn with their roof lights turned on. Anything that can spawn a taxi like [[00A5]], [[014B]], or natural traffic, is affected. Taxis that are already spawned are not affected by this opcode. This opcode was never called in the [[Main.scm|original script]] of GTA III.
Line 13: Line 12:
 
== For Vice City ==
 
== For Vice City ==
 
This opcode does not exist in Vice City but leftover code allows for this effect. 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.
 
This opcode does not exist in Vice City but leftover code allows for this effect. 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.
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
:opcode_021F
+
<span class="nl">:opcode_021F</span>
// 0@ - input param (set)
+
<span class="c1">// 0@ - input param (set)</span>
05DF: write_memory 0xA10ABB size 1 value 0@ virtual_protect 0
+
05DF: write_memory <span class="m">0xA10ABB</span> size <span class="m">1</span> value <span class="nv">0@</span> virtual_protect <span class="m">0</span>  <span class="c1">// CAutomobile::m_sAllTaxiLights</span>
05F6: ret 0
+
05F6: ret <span class="m">0</span>
</syntaxhighlight>
+
}}
 +
 
 
Use this line as a substitute for opcode 021F. This can be placed anywhere within the external script:
 
Use this line as a substitute for opcode 021F. This can be placed anywhere within the external script:
<syntaxhighlight lang="scm">
+
{{Pre|class=sb-code|1=
05F5: call_scm_func @opcode_021F inputs 1 set [int]
+
05F5: call_scm_func <span class="nl">@opcode_021F</span> inputs <span class="m">1</span> set [int]
</syntaxhighlight>
+
}}
  
 
== Keywords ==
 
== Keywords ==
Line 28: Line 28:
  
 
== See also ==
 
== See also ==
* [[0216]], sets single taxi roof light
+
* {{Icon|t}} [[0216]], sets single taxi roof light
 
 
[[Category:OpCodes]]
 
[[Category:Code Snippets]]
 

Latest revision as of 07:52, 8 December 2016

GTA III SET_ALL_TAXI_LIGHTS


Description
Sets all taxi roof lights
Syntax
021F: set_all_taxi_lights [int]
Parameter
[int]
0 = roof lights off (default), 1 = roof lights on

This opcode allows all taxis to spawn with their roof lights turned on. Anything that can spawn a taxi like 00A5, 014B, or natural traffic, is affected. Taxis that are already spawned are not affected by this opcode. This opcode was never called in the original script of GTA III.

For Vice City

This opcode does not exist in Vice City but leftover code allows for this effect. 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.

:opcode_021F
// 0@ - input param (set)
05DF: write_memory 0xA10ABB size 1 value 0@ virtual_protect 0  // CAutomobile::m_sAllTaxiLights
05F6: ret 0

Use this line as a substitute for opcode 021F. This can be placed anywhere within the external script:

05F5: call_scm_func @opcode_021F inputs 1 set [int]

Keywords

set, toggle, all, taxi, cab, cabbie, light, lights

See also

  • GTA III Vice City San Andreas 0216, sets single taxi roof light