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
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>
 
By Anik

Revision as of 14:10, 10 March 2016

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);
}
}

By Anik