Difference between revisions of "LUA:GetClassName"

(Created page with "= LUA Functions: GetClassName() = Returns the class name for the given spawn. ==== Syntax ==== var = GetClassName(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn)...")
 
(No difference)

Latest revision as of 17:46, 16 October 2012

LUA Functions: GetClassName()

Returns the class name for the given spawn.


Syntax

var = GetClassName(param1)


Parameters

Required - param1 (Spawn)
param1 is the spawn whos class name we are getting


Usage

function hailed(NPC, Spawn)
    Say(NPC, "Your class is " .. GetClassName(Spawn) .. "!")
end

This makes the NPC respond to the player who hails it with the players class name.