No categories assigned
LUA:GetGender
- Last edited 13 years ago by I need to Update My Profile
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