function set_99ovr()
-- Get Players Table
local players_table = LE.db:GetTable("players")
local current_record = players_table:GetFirstRecord()
local playerid = 0
while current_record > 0 do
playerid = players_table:GetRecordFieldValue(current_record, "playerid")
if (playerid == VPRO_PLAYERID) then
for j=1, #fields_to_edit do
players_table:SetRecordFieldValue(current_record, fields_to_edit[j], 99)
end
current_record = players_table:GetNextValidRecord()
end
LOGGERogError(string.format("Can't find player %d to apply 99ovr", VPRO_PLAYERID))
end
function handle_vpro_reset(events_manager, event_id, event)
-- Events that reset the vpro attributes
if (
event_id == ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED or
event_id == ENUM_CM_EVENT_MSG_USER_MATCH_COMPLETED_IN_TOURNAMENT or
event_id == ENUM_CM_EVENT_MSG_USER_INTERNATIONAL_MATCH_COMPLETED or
event_id == ENUM_CM_EVENT_MSG_ENTERED_HUB_FIRST_TIME or
event_id == ENUM_CM_EVENT_MSG_POST_LOAD_PREPARE
) then
set_99ovr()
end
end