No categories assigned

LUA:GetClassName

Revision as of 17:46, 16 October 2012 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: GetClassName() = Returns the class name for the given spawn. ==== Syntax ==== var = GetClassName(param1) ==== Parameters ==== ; Required - ''param1'' (Spawn)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.