Rendril Posted July 22, 2010 Report Posted July 22, 2010 (edited) [b]array[/b] mdsi_item_heat(); [b]Returns[/b] -Amount of heat that has been stored in the item. -Players that have had heat stored in the item -How much heat each player has stored The return array is in this form: array(2) { ["current"] => total heat ["players"]=> array( ["player name"]=> heat stored by player, ["player name2"]=> heat stored by player, ["player name3"]=> heat stored by player, etc ) } } All the heat that has ever been stored will be returned. Later on heat might gradually decrease over time or be able to get retrieved through other functions. Example 1: [code] @va = mdsi_item_heat(); echo 'The box has ' . @va['current'] . ' heat in it'; [/code] Shows how much heat is in the item. Example 2: [code] @vp = mdsi_item_heat(); foreach(@vp['players'] as @vk => @vh){ echo @vk . ' has stored ' . @vh . ' heat<br />'; } echo 'In total ' . count(@vp['players']) . ' have stored heat in talisman'; [/code] Makes a list of players that stored heat in the item and how much. [i]The function is intended for item use only (hence the mdsi) but can be used in any clickable at present.[/i] Edited June 25, 2012 by Chewett Quote
Kaya Posted June 24, 2012 Report Posted June 24, 2012 I think the final line in the second example should say: [CODE]echo 'In total ' . count(@vp['players']) . ' have stored heat in talisman';[/CODE] Quote
Root Admin Chewett Posted June 25, 2012 Root Admin Report Posted June 25, 2012 [quote name='samon' timestamp='1340581700' post='115971'] I think the final line in the second example should say: [CODE]echo 'In total ' . count(@vp['players']) . ' have stored heat in talisman';[/CODE] [/quote] that would make sense, i have edited the above example. Thank you. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.