Sign in to follow this  
Followers 0
John

Added a respect factor to items - need help

3 posts in this topic

Hi, so i added this code s players need 20% of the items value in respect to purchase the item

 

	_playerMoney = _playerObject getVariable ["ExileMoney", 0];
	if (_playerMoney < _salesPrice) then
	{
		throw 5;
	};
	_playerRespect = _playerObject getVariable ["ExileScore", 0];
	if (_playerRespect < _salesPrice * 0.2) then
	{
	throw 5;
	//customChat[1, format["You don't have %1 respect to purchase this!", str(_salesPrice * 0.2)]];
	};

im trying to get a message to display to say "This item requires X amount of respect to purchase" but its just not working.. can someone help. Dont care if its a hint, title text, system chat, whatever!

Share this post


Link to post
Share on other sites
_playerMoney = _playerObject getVariable ["ExileMoney", 0];
	if (_playerMoney < _salesPrice) then
	{
		throw 5;
	};
	_playerRespect = _playerObject getVariable ["ExileScore", 0];
	if (_playerRespect < _salesPrice * 0.2) then
	{
	throw 5;
	//customChat[1, format["You don't have %1 respect to purchase this!", str(_salesPrice * 0.2)]];
	};

Change the bottom to this:

 

    _playerRespect = _playerObject getVariable ["ExileScore",0];

    if(_playerRespect < _salesPrice * 0.2)then
    {
        throw "No enough Respect!";
    };    

 

^^I took above from upgrade territory file in case of not enough respect, i think it should work. Any idea how could i use this only on certain items/vehicles?

Share this post


Link to post
Share on other sites

John would u be willing to share ur code or help me out ? Im Trying to make it so some items cost respect and pop tabs , sorta in the same line u are doing^ , or were u ever able to get this working? 

Edited by DIamond

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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.