No categories assigned

LUA:SetPlayerHistory

Revision as of 19:53, 28 January 2016 by Jabantiz (talk | contribs) (Created page with "{{PageHeaderChild|LUA|SetPlayerHistory}} = LUA Functions: SetPlayerHistory() = Sets the LUA history value for the player ==== Syntax ==== SetPlayerHistory(param1, param2, para...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

LUA - SetPlayerHistory

Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker


LUA Functions: SetPlayerHistory()

Sets the LUA history value for the player


Syntax

SetPlayerHistory(param1, param2, param3, [param4])


Parameters

Required - param1 (Spawn), param2 (int32), param3 (int32)
param1 is the player we want to set the values on
param2 is event ID for the history
param3 is value1 of the history
Optional - param4 (int32)
param4 is value2 of the history


Usage

function hailed(NPC, Spawn)
     SetPlayerHistory(Spawn, 1, 1)
end

When hailed this NPC will set value1 of the players history with an ID of 1 to 1


Notes

Can only be used on a player

Not related to character history

LUA history will be saved in the DB so it will persist across zones and server restarts