Streaming::startPlayerSwitch: Difference between revisions
(yay) |
(yay) |
||
| Line 1: | Line 1: | ||
// this enum comes directly from R* so don't edit this<br>enum ePlayerSwitchTypes<br>{<br> SWITCH_TYPE_AUTO,<br> SWITCH_TYPE_LONG,<br> SWITCH_TYPE_MEDIUM,<br> SWITCH_TYPE_SHORT<br>};<br><br>Use GET_IDEAL_PLAYER_SWITCH_TYPE for the best switch type.<br><br>----------------------------------------------------<br><br>Examples from the decompiled scripts:<br><br>STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 0, 3);<br>STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 2050, 3);<br>STREAMING::START_PLAYER_SWITCH(PLAYER::PLAYER_PED_ID(), l_832._f3, 1024, 3);<br>STREAMING::START_PLAYER_SWITCH(g_141F27, PLAYER::PLAYER_PED_ID(), 513, v_14);<br><br>Note: DO NOT, use SWITCH_TYPE_LONG with flag 513. It leaves you stuck in the clouds. You'll have to call STOP_PLAYER_SWITCH() to return to your ped.<br><br>Flag 8 w/ SWITCH_TYPE_LONG will zoom out 3 steps, then zoom in 2/3 steps and stop on the 3rd and just hang there.<br>Flag 8 w/ SWITCH_TYPE_MEDIUM will zoom out 1 step, and just hang there. | // this enum comes directly from R* so don't edit this<br>enum ePlayerSwitchTypes<br>{<br> SWITCH_TYPE_AUTO,<br> SWITCH_TYPE_LONG,<br> SWITCH_TYPE_MEDIUM,<br> SWITCH_TYPE_SHORT<br>};<br><br>Use GET_IDEAL_PLAYER_SWITCH_TYPE for the best switch type.<br><br>----------------------------------------------------<br><br>Examples from the decompiled scripts:<br><br>STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 0, 3);<br>STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 2050, 3);<br>STREAMING::START_PLAYER_SWITCH(PLAYER::PLAYER_PED_ID(), l_832._f3, 1024, 3);<br>STREAMING::START_PLAYER_SWITCH(g_141F27, PLAYER::PLAYER_PED_ID(), 513, v_14);<br><br>Note: DO NOT, use SWITCH_TYPE_LONG with flag 513. It leaves you stuck in the clouds. You'll have to call STOP_PLAYER_SWITCH() to return to your ped.<br><br>Flag 8 w/ SWITCH_TYPE_LONG will zoom out 3 steps, then zoom in 2/3 steps and stop on the 3rd and just hang there.<br>Flag 8 w/ SWITCH_TYPE_MEDIUM will zoom out 1 step, and just hang there. | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript">streaming.startPlayerSwitch(from, to, flags, switchType);</syntaxhighlight> | <syntaxhighlight lang="javascript">mp.game.streaming.startPlayerSwitch(from, to, flags, switchType);</syntaxhighlight> | ||
=== Required Arguments === | === Required Arguments === | ||
*'''from:''' Ped handle or object | *'''from:''' Ped handle or object | ||
| Line 11: | Line 11: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
todo | // todo | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
{{ | {{Streaming_s_function_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
[[Category:TODO: Example]] | [[Category:TODO: Example]] | ||
Revision as of 21:32, 6 May 2017
// this enum comes directly from R* so don't edit this
enum ePlayerSwitchTypes
{
SWITCH_TYPE_AUTO,
SWITCH_TYPE_LONG,
SWITCH_TYPE_MEDIUM,
SWITCH_TYPE_SHORT
};
Use GET_IDEAL_PLAYER_SWITCH_TYPE for the best switch type.
----------------------------------------------------
Examples from the decompiled scripts:
STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 0, 3);
STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 2050, 3);
STREAMING::START_PLAYER_SWITCH(PLAYER::PLAYER_PED_ID(), l_832._f3, 1024, 3);
STREAMING::START_PLAYER_SWITCH(g_141F27, PLAYER::PLAYER_PED_ID(), 513, v_14);
Note: DO NOT, use SWITCH_TYPE_LONG with flag 513. It leaves you stuck in the clouds. You'll have to call STOP_PLAYER_SWITCH() to return to your ped.
Flag 8 w/ SWITCH_TYPE_LONG will zoom out 3 steps, then zoom in 2/3 steps and stop on the 3rd and just hang there.
Flag 8 w/ SWITCH_TYPE_MEDIUM will zoom out 1 step, and just hang there.
Syntax
mp.game.streaming.startPlayerSwitch(from, to, flags, switchType);
Required Arguments
- from: Ped handle or object
- to: Ped handle or object
- flags: int
- switchType: int
Return value
- Undefined
Example
// todo