Quote:
Originally Posted by MarkFL
Do you mean then a deduction based only on the points being issued at the time, and not on the cumulative total of active points? If so, I would have to investigate to see how to retrieve that value.
The code I posted does exactly the opposite of that...it uses $userinfo['ipoints'] which does not include the points currently being given, but rather the number of points accumulated by the user before the current infraction.
edit: Try using the hook location "infraction_update_complete", and at that hook, the points for the current infraction is in $vbulletin->GPC['points']. Then you can base the rep deduction on that and update the user table. 
|
No, the current script works fine. I want it to deduct based on the current active points, so using ipoints is correct.
However, I don't want to issue and deduction when the user is only issued a warning (infraction without points).