Boose

Script Help

5 posts in this topic

Can some one help me with this 1 line Im looking to change this - 

_curRespect = _victim getVariable ["ExileScore", 0];

					_newrespect = _curRespect - 666;
					_victim setVariable ["ExileScore", _newrespect ];
					ExileClientPlayerScore = _newRespect;
					(owner _victim) publicVariableClient "ExileClientPlayerScore";
					ExileClientPlayerScore = nil;
					format["setAccountMoneyAndRespect:%1:%2:%3", _victim getVariable ["ExileMoney", 0], _newRespect, (getPlayerUID _victim)] call ExileServer_system_database_query_fireAndForget;

 

 Something like this But i cant figure out how to Get a percentager of the victims Exilescore

_curRespect = _victim getVariable ["ExileScore", 0];

                    _newrespect = _curRespect - (_curRespect %10);
                    _victim setVariable ["ExileScore", _newrespect ];
                    ExileClientPlayerScore = _newRespect;
                    (owner _victim) publicVariableClient "ExileClientPlayerScore";
                    ExileClientPlayerScore = nil;
                    format["setAccountMoneyAndRespect:%1:%2:%3", _victim getVariable ["ExileMoney", 0], _newRespect, (getPlayerUID _victim)] call ExileServer_system_database_query_fireAndForget;

 

Edited by Digital Purge
1 person likes this

Share this post


Link to post
Share on other sites

10% is represented as 0.10, 1.00 being 100%, to get 10% of _curRespect we take _curRespect and multiply it by 0.10, which will return the value of 10%.

_newRespect = _curRespect - (_curRespect * 0.10);

 

2 people like this

Share this post


Link to post
Share on other sites
Advertisement

10% is represented as 0.10, 1.00 being 100%, to get 10% of _curRespect we take _curRespect and multiply it by 0.10, which will return the value of 10%.

_newRespect = _curRespect - (_curRespect * 0.10);

 

Thanks very much dude - surprising that when you stare at something for long enough you miss the obvious !  

 

Have a *cookie* :) 

1 person likes this

Share this post


Link to post
Share on other sites

I like this idea SOO MUCH!! Making rep "transferable" through kills!

Getting going tomorrow, :) was trying to make a minus and plus respect kind of thing but then realized you can't have minus respect other wise  you cannot build/extend a territory lol 

Share this post


Link to post
Share on other sites
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.