Calalin Posted November 26, 2012 Author Share Posted November 26, 2012 Hi all,Can you help me please ?I will want add a new function on my item.An item which changes the access.For exemple, If a player equip the item "moderator power" he is going access 2.And when he unequip he lose this access ^^It's an exemple, of course ^^Thanks ! Link to comment Share on other sites More sharing options...
abhi2011 Posted November 27, 2012 Share Posted November 27, 2012 Make the Item_Type whatever you want (Should be equipable) then make a new data type say AccessAdd or something in ItemRec (Server & client) Then in use item, depending open which type of item it is (Helmet, legs etc) in the case after all checks add this line of code.```if item(itemnum).AccessAdd > 0 thenif player(index).access <= item(itemnum).accessadd thenplayer(index).access = item(itemnum).accessaddend ifend if```Code modification might be neccessary. For unequipping it might be this code```if item(itemnum).accessadd > 0 thenplayer(index).access = player(index).access - item(itemnum).accessadd```again code modification might be neccessary. Link to comment Share on other sites More sharing options...
Calalin Posted November 28, 2012 Author Share Posted November 28, 2012 Thanks for your answer ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)I have seen this tuto : http://www.touchofdeathforums.com/community/index.php?/topic/128933-all-ver-script-system/page__hl__%2Bitem+%2BscriptedIt's functional for me ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now