Difference between revisions of "LUA:GetGender"
(Created page with "= LUA Functions: GetGender() = Returns the current gender id for the given spawn. ==== Syntax ==== var = GetGender(param1) ==== Parameters ==== ; Required - ''param1'' (Spaw...") |
(No difference)
|
Latest revision as of 15:34, 17 October 2012
LUA Functions: GetGender()
Returns the current gender id for the given spawn.
Syntax
var = GetGender(param1)
Parameters
- Required - param1 (Spawn)
- param1 is the spawn whos gender we are checking
Usage
function hailed(NPC, Spawn)
if GetGender(Spawn) == 1 then
Say(NPC, "You're male!")
else
Say(NPC, "You're female!")
end
end
This makes the NPC respond to the player who hails it with their gender.
Notes
0 = Female 1 = Male