Gameplay::createIncidentWithEntity: Difference between revisions
(yay) |
(yay) |
||
| Line 1: | Line 1: | ||
p0 could be type (valueused in scripts: 14, 7, 5, 3, 11)<br>p1 is a return from get_player_ped() in am_gang_call.c, but player_ped_id() in other (non am) scripts.<br>p3 is usually 0f or 3f<br><br>=====================================================<br>enum IncidentTypes{<br> FireDepartment = 3,<br> Paramedics = 5,<br> Police = 7,<br> PedsInCavalcades = 11, <br> Merryweather = 14<br>};<br><br>As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f. <br><br>Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV).<br><br>Side Note 2: I say it breaks as if you call this proper,<br>if(CREATE_INCIDENT) etc it will return false if you do as I said above.<br>===================================================== | p0 could be type (valueused in scripts: 14, 7, 5, 3, 11)<br>p1 is a return from get_player_ped() in am_gang_call.c, but player_ped_id() in other (non am) scripts.<br>p3 is usually 0f or 3f<br><br>=====================================================<br>enum IncidentTypes{<br> FireDepartment = 3,<br> Paramedics = 5,<br> Police = 7,<br> PedsInCavalcades = 11, <br> Merryweather = 14<br>};<br><br>As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f. <br><br>Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV).<br><br>Side Note 2: I say it breaks as if you call this proper,<br>if(CREATE_INCIDENT) etc it will return false if you do as I said above.<br>===================================================== | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript">gameplay.createIncidentWithEntity(p0, p1, p2, p3, outIncident);</syntaxhighlight> | <syntaxhighlight lang="javascript">mp.game.gameplay.createIncidentWithEntity(p0, p1, p2, p3, outIncident);</syntaxhighlight> | ||
=== Required Arguments === | === Required Arguments === | ||
*'''p0:''' int | *'''p0:''' int | ||
| Line 12: | Line 12: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> | ||
todo | // todo | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
{{ | {{Gameplay_s_function_c}} | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
[[Category:TODO: Example]] | [[Category:TODO: Example]] | ||
Revision as of 21:06, 6 May 2017
p0 could be type (valueused in scripts: 14, 7, 5, 3, 11)
p1 is a return from get_player_ped() in am_gang_call.c, but player_ped_id() in other (non am) scripts.
p3 is usually 0f or 3f
=====================================================
enum IncidentTypes{
FireDepartment = 3,
Paramedics = 5,
Police = 7,
PedsInCavalcades = 11,
Merryweather = 14
};
As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f.
Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV).
Side Note 2: I say it breaks as if you call this proper,
if(CREATE_INCIDENT) etc it will return false if you do as I said above.
=====================================================
Syntax
mp.game.gameplay.createIncidentWithEntity(p0, p1, p2, p3, outIncident);
Required Arguments
- p0: int
- p1: Entity handle or object
- p2: int
- p3: float
- outIncident: int
Return value
- int
Example
// todo