Scripting/Squirrel/Functions/Player.SpectateTarget: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "== Example == <pre>function onPlayerCommand( player, cmd, text ) { if ( cmd == "spectate" ) { local plr = FindPlayer( text ); if ( !p...") |
(No difference)
|
Revision as of 09:21, 8 January 2015
Example
function onPlayerCommand( player, cmd, text ) { if ( cmd == "spectate" ) { local plr = FindPlayer( text ); if ( !plr ) MessagePlayer( "Error: Player '" + text + "' is not online.", player ); else player.SpectateTarget = plr; } }