1. Post #1
    vipersoul's Avatar
    April 2009
    173 Posts
    Hey. I need to tell if the player has a certain gamemode (For this, I need to check if the player has TF2). Any clues as to how I would do this? Thanks.

  2. Post #2
    Gold Member
    HeavyMtl123's Avatar
    December 2007
    1,803 Posts
    May I ask why you need to find out what games a player has?

    And even so, i don't think there is a way.

  3. Post #3
    vipersoul's Avatar
    April 2009
    173 Posts
    Because I'm using a TF2 model as my entity, and for people without TF2 it becomes an error. I just want to prevent this by checking if they have it, and if not - I can change the model to a different one.

  4. Post #4
    Gold Member
    HeavyMtl123's Avatar
    December 2007
    1,803 Posts
    I'm not sure you can check if a player has a certain game :/

    You could just use a custom model as an entity, then it would be appropriate to use the ResourceAddFile command.

  5. Post #5
    vipersoul's Avatar
    April 2009
    173 Posts
    We need no custom model. The TF2 model suits my needs fine.

  6. Post #6
    Gold Member
    HeavyMtl123's Avatar
    December 2007
    1,803 Posts
    Yeah, but if people do not have TF2, then it is better to use a custom model, and then force clients to download it, instead of seeing errors.

  7. Post #7
    vipersoul's Avatar
    April 2009
    173 Posts
    I would rather just get a way to check if TF2 is mounted or something.

  8. Post #8
    Gold Member
    thejjokerr's Avatar
    December 2007
    2,113 Posts
    Perhaps, not sure, you could use File.Find to check if the player has got the models you need?

  9. Post #9
    Gold Member
    HeavyMtl123's Avatar
    December 2007
    1,803 Posts
    Perhaps, not sure, you could use File.Find to check if the player has got the models you need?
    Doesn't that check only the Gmod Directory?

  10. Post #10
    Gold Member
    Jamie932's Avatar
    July 2008
    2,590 Posts
    Perhaps, not sure, you could use File.Find to check if the player has got the models you need?
    That only checks GMod directory.

    Ninjad.

  11. Post #11
    sintwins's Avatar
    November 2009
    712 Posts
    How about you default it to either the tf2 model or a custom model and allow the client to change it using a console command ?

  12. Post #12
    King of the Oil Refinery
    Tobba's Avatar
    December 2008
    6,225 Posts
    isnt there a GetMountedContent function or something?

  13. Post #13
    Gold Member
    Jamie932's Avatar
    July 2008
    2,590 Posts
    isnt there a GetMountedContent function or something?
    I think thats only for use with the server.

  14. Post #14
    King of the Oil Refinery
    Tobba's Avatar
    December 2008
    6,225 Posts
    Reply With Quote Edit / Delete Reply Sweden Show Events Useful Useful x 1 (list)

  15. Post #15
    Gold Member
    HeavyMtl123's Avatar
    December 2007
    1,803 Posts
    Wow, for some reason i've had a sudden surge of learning more coding, and have gotten much further with my gamemode.

    ONTOPIC: Listen to Tobba

  16. Post #16
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts
    If that doesn't work, you could always convert their steamid to their community id, http.Get the steam community website in xml mode and check there.

  17. Post #17
    Gold Member

    April 2009
    726 Posts
    If that doesn't work, you could always convert their steamid to their community id, http.Get the steam community website in xml mode and check there.
    But with private profiles that wont work?
    Reply With Quote Edit / Delete Reply Denmark Show Events Agree Agree x 1 (list)

  18. Post #18
    Gold Member
    Crazy Quebec's Avatar
    May 2008
    2,449 Posts
    You want to display a different model clientside for players that don't have tf2? If it's a prop with physics it could easilly look very weird.

  19. Post #19
    |FlapJack|'s Avatar
    July 2009
    6,138 Posts
    But with private profiles that wont work?
    I'm pretty sure Steam returns gameinfo for private profiles too.

    Edited:

    Or not.

    http://steamcommunity.com/id/--YouLo...tab=all/&xml=1

  20. Post #20
    vipersoul's Avatar
    April 2009
    173 Posts
    Thanks guys. You have been a great help.