Quote:
Originally Posted by Deszzz
Hey Ocixcrom, I took a look at your keywords website for this plugin and I was wondering if there is a possibility to add a function where if player die he loses XP (die by another player instead of suicide).
|
Good idea, I will add this in the next update. Until I do that, you can use this short sub-plugin:
PHP Code:
#include <amxmodx>
#include <crxranks>
public plugin_init()
{
register_plugin("CRXRanks: Death Event", "1.0", "OciXCrom")
register_event("DeathMsg", "OnPlayerKilled", "a")
}
public OnPlayerKilled()
crxranks_give_user_xp(read_data(2), _, "death", CRXRANKS_XPS_REWARD)
After you added it, just use the "death" keyword in the [XP Rewards] section and assign a negative value of XP that you want players to lose when they die. For example:
death = -5
Quote:
Originally Posted by LithuanianJack
Perfect! No errors now.
I have additional request for plugin's author ociX. I want to do "web stats" with this plugin, but I need more data inserting - kills, headshots, deaths. Can you add these things saving to SQL?
P.s. I agree with Deszzz's request. Possibility to add a function where if player die he loses XP would be great.
|
Great, I'll have a look at the edited code and will update the main plugin soon.
Kills, headshots and deaths aren't really related to my plugin, I don't find it logical to add them. You can use the standard CSStats plugin to retrieve this information.
__________________