KillPlayer: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
Line 12: Line 12:
  player = [[GetPlayerFromID]] ( 1 )
  player = [[GetPlayerFromID]] ( 1 )
  if ( [[KillPlayer]] ( player ) )
  if ( [[KillPlayer]] ( player ) )
  [[serverChat]] ( [[GetPlayerName]] ( " was eliminated." ) )
  [[serverChat]] ( [[GetPlayerName]], " was eliminated." )
  end
  end

Revision as of 18:36, 26 March 2006

Description

This function kills the specified player. It returns a boolean value (true or false) depending on whether the function passed or failed.

Syntax

bool KillPlayer ( player )

Required Arguments

  • player: A player object referencing the specified player

Example

player = GetPlayerFromID ( 1 )
if ( KillPlayer ( player ) )
serverChat ( GetPlayerName, " was eliminated." )
end