08.04.2014, 10:18
The oldest backup I still same to have is for 0.3b from late 2010. Though this still looks pretty much okay. I've since rewritten some code because of the discovery of functions that I never knew existed, such as clamp(). I had been doing this:
which has since been rewritten as
Now also excessively using STREAMER_EXTRA_ID for easy assignment of a value to a pickup. Money, for instance. Saves a load of headaches because I no longer have to use bloated arrays to keep track of which pickupid has which value.
pawn Code:
robmoney = ((PlayerStats[target][pCurCash]/10) > 50000) ? 50000 : robmoney;
pawn Code:
robmoney = clamp((PlayerStats[target][pCurCash]/10), 0, 50000);