1. Hey All,

    I'm new to working in C# or with any game coding at all. Came from Web Development in JS so it's been a bit of a smack in the face learning so far.

    I'm just trying to figure out how to obtain all the variables or objects within a class, for example:
    object OnPlayerDie(BasePlayer player, HitInfo info)
    {
    *FIND ALL VARS/OBJS in player*
    *FIND ALL VAR/OBJS in info*
    }

    In JS you could literally print any object by using the print command(Rudimentary I know).

    Any help would be appreciated as up until now, making my plugin has been me going through a lot of other plugins that utilise the hooks and gathering all the information on different objects/vars returned in that hook.
     
  2. Oh. man its not a js) that iterate all fields you should use "Reflection"(Type).GetFields(ALL binding flags)
     
  3. You can either use visual studios intellisense (harder if you don't know what your doing) or use a decompiler like JustDecompile to open your servers Assembly-CSharp.dll file. Here you can get all information on variables, components and methods... you just have to do a bit of digging :p
     
  4. Thanks heaps!!!
    I'm well on my way now!!

    JustDecompile is a huuuuuuuuuuuuuuge help. Thanks!
     
  5. 46 Minutes later,

    I have literally fixed every problem in my plugin and reduced it's total line height by 200 or so...

    I'll leave you to imagine what was going on with those extra 200 lines.. Thank you both once again! I really appreciate it.
    [DOUBLEPOST=1512927795][/DOUBLEPOST]I wasn't able to even find simple stuff before like Entity ID's.. (net.ID).................. ARGAHSDHASLK
    Thank you again.