• 0
Erzengel

Remove 150 Respect

Question

hey, iam trying to remove 150 respect from a player via script. i did add this to the script:

 

_target = player;
_curRespect = _target getVariable ["ExileScore", 0];

if(_curRespect < 150) then

{
			
					_newRespect = _curRespect - 150;
					_target setVariable ["ExileScore", _newRespect];
					ExileClientPlayerScore = _newRespect;
					(owner _target) publicVariableClient "ExileClientPlayerScore";
					ExileClientPlayerScore = _newRespect;
					format["setAccountMoneyAndRespect:%1:%2:%3", _target getVariable ["ExileMoney", 0], _newRespect, (getPlayerUID _target)] call ExileServer_system_database_query_fireAndForget;
                     
}
                     
else
                     
{
                     
};

when executing the script the respect icon in xm8 shows -150  and after relog the respect is not gone. However when i use + 150 it works..

 

anyone got any idea what i did wrong ? :-)

Edited by Erzengel

Share this post


Link to post
Share on other sites

0 answers to this question

There have been no answers to this question yet

Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.