reapi icon indicating copy to clipboard operation
reapi copied to clipboard

Add RewardAccount as a native enum and not as a custom one

Open metita opened this issue 4 years ago • 2 comments

RewardRules is the only one working natively on ReAPI, you need to add manually the RewardAccount enum to your plugin and do some tricks to make it works.

for ( new i = 0 ; i < _:RewardRules ; i++ )
{
     rg_set_account_rules( RewardRules:i, 0 );
}

You can call that on AddAccount_Pre and you will effectively block RewardRules, but you cannot call the same way RewardAccount because RewardAccount cannot be call'd natively, because ReAPI does not include it yet, but it is marked as a custom enum (not sure why?)

Can we add RewardAccount into ReAPI natively so we can use rg_set_account_rules with RewardAccount the same way as RewardRules and without having to add the enum to our plugin.

Take as an example REWARD_KILLED_ENEMY, that for won't cover it, or just add REWARD_KILLED_ENEMY and more kill rewards to the original RewardRules enum, so that cover everything.

metita avatar Jun 13 '20 03:06 metita

@s1lentq Do you think REWARD_KILLED_ENEMY, REWARD_KILLED_VIP, REWARD_VIP_HAS_SELF_RESCUED can be added into RewardRules? so we can do the this and block all rewards in the game.

for ( new i = 0 ; i < _:RewardRules ; i++ )
{
     rg_set_account_rules( RewardRules:i, 0 );
}

metita avatar Jun 15 '20 21:06 metita

@metita check RewardType into cssdk_const.inc. You can block these rewards in AddAccount pre.

fl0werD avatar Aug 14 '20 22:08 fl0werD