ItsMods

Full Version: Addon Api Documentation website
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
@pieter i disabled account registration and comments.

I thought comments can be usefull... but you're rightWink
documentations shouldnt have comments or any other interaction then explaining how shit works Smile

see it as adding a comment section to every wikipedia page Tongue
Comments were activated because when i made the website, i thought about good comments on php.net, so i thought some comments can be useful...

But without comments it will be proper for sureWink
The comments on php.net helped me a lot.
Altough it would be more useful if people didn't had to register to place comments
@Ich1994 did it already :/
(07-15-2012, 19:47)narkos Wrote: [ -> ]Also what is that:
Code:
int Entity_World //Integer holding the EntityNum of 'World'
int AddonFrameInterval //Integer holding the interval of OnAddonFrame in milliseconds
Is that like global addon variables available in all the plugins?

Thx in advance for the answers!

Very good job!

Entity_World: Every entity has it's own number (ID). The last entity (2047) is the world entity. The entity which includes everything. It is needed if you for example want to display a hudelement to everyone.

AddonFrameInterval: The event OnAddonFrame is triggered by a thread in the addon. This thread has a specific interval which is currently 250ms (4FPS). However since this number could change one time in the developement I created this constant variable which holds this interval so plugin developers can use this instead of a number. For example if you want to do something every second:

CSHARP Code
  1. private int counter = 0;
  2.  
  3. public override void OnAddonFrame()
  4. {
  5. counter++;
  6. if(counter==1000/AddonFrameInterval)
  7. {
  8. counter = 0;
  9. //do your stuff here
  10. //exectued every second
  11. }
  12. }
Thank you!

Will the next addon update have more variables like this? Is it usefull to create a new section for 'variables' as 'functions', 'events' and 'Struct/Enums' sections in the doc?
Or should i had them in 'Struct/Enums' section?

I saw in a post that you already added weaponbuilder to the next addon update? Can i get more infos yet to integrate to the doc? Wink

Thanks!
Pages: 1 2