No categories assigned
LUA:GetPlayerHistory
- Last edited 9 years ago by I need to Update My Profile
LUA - GetPlayerHistory
Return to: LUA | Tutorials | Portal | Forum | Project Manager | Bug Tracker
LUA Functions: GetPlayerHistory()
Gets a lua history value for a player
Syntax
GetPlayerHistory(param1, param2)
Parameters
- Required - param1 (Spawn), param2 (int32)
- param1 is the player we want to check
- param2 is event id of the history we want
Returns
Value1 and Value2 of the history
Usage
function hailed(NPC, Spawn)
if GetPlayerHistory(Player, 1) == 1 then
Say(NPC, "Hello there!")
end
end
This NPC will only reply if the history, with an event id of 1, has a value1 equal to 1
Notes
Can only be used on a player
This is not related to character history
If you want both value1 and value2 you would do
local val1, val2 GetPlayerHistory(Player, ID)