You want the multiplier to depend on the player's current level? It's a nice idea, added in my to-do list.
For now, you can use this sub-plugin:
Code:
#include <amxmodx>
#include <crxranks>
const Float:XP_GET_MULTIPLIER = 1.5
const Float:XP_LOSE_MULTIPLIER = 0.5
public plugin_init()
{
register_plugin("CRXRanks: XP Multipliers", "1.0", "OciXCrom")
}
public crxranks_user_receive_xp(id, iXP, CRXRanks_XPSources:iSource)
{
if(iSource != CRXRANKS_XPS_ADMIN)
{
return floatround(iXP * crxranks_get_user_level(id) * (iXP > 0 ? XP_GET_MULTIPLIER : XP_LOSE_MULTIPLIER))
}
return CRXRANKS_CONTINUE
}
It works like this: XP = XP * player's current level * multiplier
Bear in mind that the XP is a round number, so amounts such as 4.5 will be rounded down.
Quote:
|
And please make all mysql queries asynchronous if not do it before.
|
I'm not familiar with what that means. A quick search told me that SQL_ThreadQuery is a asynchronous function and it's used in the plugin.
__________________