Scripting/Squirrel/Functions/Player.Frozen: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
No edit summary |
No edit summary |
||
| Line 31: | Line 31: | ||
</pre> | </pre> | ||
'''Note''' - FindPlayer can be worked out with text/name or id of the player--[[User:Jayant|Jayant]] ([[User talk:Jayant|talk]]) 11: | '''Note''' - FindPlayer can be worked out with text/name or id of the player.To unfreeze any player.IsFrozen = false; | ||
--[[User:Jayant|Jayant]] ([[User talk:Jayant|talk]]) 11:46, 8 January 2015 (UTC) | |||
Revision as of 11:46, 8 January 2015
Syntax
player.IsFrozen = true; player.IsFrozen = false;
Example
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "free" )
{
local plr = FindPlayer( text ); // text/player name
if (!plr) MessagePlayer( "Error: Player '" + text + "' is not online.", player );//Checking player
else player.IsFrozen = true;//Finally freeze him
}
if ( cmd == "free" )
{
local plr = FindPlayer( 0 ); // Player ID
if (!plr) MessagePlayer( "Error: Player '" + text + "' is not online.", player );//Checking player
else player.IsFrozen = true;//Finally freeze him
}
}
Note - FindPlayer can be worked out with text/name or id of the player.To unfreeze any player.IsFrozen = false;