Scripting/Squirrel/Functions/Player.IsOnFire: Difference between revisions

From Vice City Multiplayer
Jump to navigation Jump to search
Caution icon
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with " == Syntax == <pre>player.IsOnFire;</pre> == Example == <pre>if ( cmd == "playeronfire" ) { local plr = FindPlayer( text ); MessagePlayer(plr.IsOnFire+"",player); }</pre>")
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This function Returns if the Player Is On Fire or Not.


== Syntax ==
== Syntax ==
<pre>player.IsOnFire;</pre>
<pre>player.IsOnFire</pre>
 
== Arguements ==
'''N/A'''
 
== Return value ==
 
* ''bool'' '''toggled''' - '''true''' or '''false'''


== Example ==
== Example ==
<pre>if ( cmd == "playeronfire" )
<source lang="D">
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "playeronfire" )
{
{
local plr = FindPlayer( text );
local plr = FindPlayer( text );
MessagePlayer(plr.IsOnFire+"",player);
MessagePlayer(plr.IsOnFire+"",player);
}</pre>
}
}
</source>
 
== Related Functions ==
 
{{Scripting/Squirrel/Functions/Player_Functions}}
[[Category:Scripting/Squirrel/Functions/Player_Functions]]

Latest revision as of 18:49, 30 January 2017

This function Returns if the Player Is On Fire or Not.

Syntax

player.IsOnFire

Arguements

N/A

Return value

  • bool toggled - true or false

Example

function onPlayerCommand( player, cmd, text )
{
if ( cmd == "playeronfire" )
{
local plr = FindPlayer( text );
MessagePlayer(plr.IsOnFire+"",player);
}
}

Related Functions

Player Game Functions

These functions exist for compatibility with the R2 Squirrel server.