No categories assigned
LUA:CompareSpawns
- Last edited 12 years ago by I need to Update My Profile
LUA Functions: CompareSpawns()
Compares the given spawns
Syntax
CompareSpawns(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (Spawn)
- param1 is the first spawn to compare
- param2 is the second spawn to compare
Usage
function hailed(NPC, Spawn)
local target = GetTarget(NPC)
if target ~= nil and CompareSpawns(target, Spawn) then
Say(NPC, "I have you targeted")
end
end
This will have the spawn say whether the player who hailed it is also its target
Notes
Returns a bool, true if the spawns are the same.