No categories assigned

LUA:AddSpawnAccess

Revision as of 19:59, 15 October 2012 by Jabantiz (talk | contribs) (Created page with "= LUA Functions: AddSpawnAccess() = Adds access to a private spawn for the given spawn. ==== Syntax ==== AddSpawnAccess(param1, param2) ==== Parameters ==== ; Required - ''pa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA Functions: AddSpawnAccess()

Adds access to a private spawn for the given spawn.


Syntax

AddSpawnAccess(param1, param2)


Parameters

Required - param1 (Spawn), param2 (Spawn)
param1 is the private spawn
param2 is the spawn gaining access to the private spawn

Usage

function hailed(NPC, Spawn)
    -- Get a pointer to the closest spawn in the zone with a DB id of 120001
    private_spawn = GetSpawn(Spawn, 120001)
    -- Add access to the player to be able to see the private spawn
    AddSpawnAccess(private_spawn, Spawn)
end

This will allow the player to see the private spawn.