Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

2 years ago

Advertisement
July 18, 2019, 03:38:10 pm

Author Topic: Profile Picture Utilities  (Read 3618 times)

LordNoob

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
Profile Picture Utilities
« on: January 14, 2015, 08:09:09 pm »

About



As per the readme, the script is in very early stages.

This is a module which allows users to extend their own scripts by allowing easy access to player profile pictures.
You may configure the script in shared/settings.lua.

Note: the script requires an API key. Insert your API key into the field that asks for it in shared/settings.lua. If you don't do this, the script will warn you. You may get an API key at https://steamcommunity.com/dev/apikey

If you do use the script, and run into an issue, please report it using the issue tracker.

Credit to Trix, Jman100 and SK83RJOSH who helped with the installation of LuaSocket!


« Last Edit: January 17, 2015, 03:58:09 pm by LordNoob »

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: Profile Picture Utilities
« Reply #1 on: January 15, 2015, 01:22:43 am »
Nice job, You beat me to it. I wanted to test this out but i run my server on linux. Not familiar with the luasocket but i believe i need to replace the core.dll with a core.so?

LordNoob

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
Re: Profile Picture Utilities
« Reply #2 on: January 15, 2015, 04:01:40 pm »
Nice job, You beat me to it. I wanted to test this out but i run my server on linux. Not familiar with the luasocket but i believe i need to replace the core.dll with a core.so?

Correct. Get it from here: http://wiki.jc-mp.com/Lua/Third_Party_Modules

Edit: With the new update you may need to find linux binaries of a JSON module.
« Last Edit: January 15, 2015, 06:10:02 pm by LordNoob »

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: Profile Picture Utilities
« Reply #3 on: January 15, 2015, 10:20:58 pm »
Nice job, You beat me to it. I wanted to test this out but i run my server on linux. Not familiar with the luasocket but i believe i need to replace the core.dll with a core.so?

Correct. Get it from here: http://wiki.jc-mp.com/Lua/Third_Party_Modules

Edit: With the new update you may need to find linux binaries of a JSON module.

Thanks. You left your key in the config! Where can i find the json binaries? Cheers.
« Last Edit: January 15, 2015, 10:26:41 pm by Darwood37 »

LordNoob

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
Re: Profile Picture Utilities
« Reply #4 on: January 15, 2015, 10:36:48 pm »
Nice job, You beat me to it. I wanted to test this out but i run my server on linux. Not familiar with the luasocket but i believe i need to replace the core.dll with a core.so?

Correct. Get it from here: http://wiki.jc-mp.com/Lua/Third_Party_Modules

Edit: With the new update you may need to find linux binaries of a JSON module.

Thanks. You left your key in the config! Where can i find the json binaries? Cheers.

I don't know, try Googling.

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: Profile Picture Utilities
« Reply #5 on: January 15, 2015, 10:44:08 pm »
Tried, round and round i go :o no luck, yet!

LordNoob

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
Re: Profile Picture Utilities
« Reply #6 on: January 16, 2015, 12:17:40 am »
Tried, round and round i go :o no luck, yet!

I don't think it uses any DLLs, so you can try the version in the repo.

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: Profile Picture Utilities
« Reply #7 on: January 16, 2015, 12:28:25 am »
failed to run Download.lua line 7 .
module 'json' not found
multiple file not found errors 'json.so'

Any clues? I know json.so needs to be there.

Update, it does not :) Got it running on linux. pretty damn clever if you ask me.
« Last Edit: January 16, 2015, 02:36:56 am by Darwood37 »

iDevious

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Profile Picture Utilities
« Reply #8 on: January 26, 2015, 02:50:11 pm »
fucking hate packages:
http://prntscr.com/5x9lqu

LordNoob

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
Re: Profile Picture Utilities
« Reply #9 on: January 26, 2015, 04:08:08 pm »

iDevious

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Profile Picture Utilities
« Reply #10 on: January 26, 2015, 09:09:13 pm »

LordNoob

  • Sr. Member
  • ****
  • Posts: 349
    • View Profile
Re: Profile Picture Utilities
« Reply #11 on: January 26, 2015, 09:17:21 pm »
No idea what to say then - except it worked for me, but I didn't use the dedicated server setup.

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: Profile Picture Utilities
« Reply #12 on: April 01, 2015, 06:02:19 am »
I am having some issues with my server, it is having issues with connecting to the steam API, a problem the host is working on, however, sometimes the connection will timeout and sometimes i will get the following error:
/server/_init.lua:58: attempt to perform arithmetic on a nil value

below is the code in question:
Code: [Select]
pcall(callback, data and data:sub(data:find("\r\n\r\n") + 4, #data)) -- We don't really care if this succeeds, we just want to avoid an error
end)

Do you have any idea how i can stop the script error? Thanks.

Jman100

  • Sr. Member
  • ****
  • Posts: 325
    • View Profile
Re: Profile Picture Utilities
« Reply #13 on: April 01, 2015, 08:00:41 am »
Just a friendly FYI 0.1.5 will have Player:GetAvatar() which will automatically get the players steam avatar using the jcmp api without needing additional packages :D

http://wiki.jc-mp.com/Changelog#0.1.5_-_Next_release

Darwood37

  • Donator
  • Hero Member
  • *****
  • Posts: 690
    • View Profile
Re: Profile Picture Utilities
« Reply #14 on: April 11, 2015, 12:19:28 pm »
Just a friendly FYI 0.1.5 will have Player:GetAvatar() which will automatically get the players steam avatar using the jcmp api without needing additional packages :D

http://wiki.jc-mp.com/Changelog#0.1.5_-_Next_release

Cheers, was aware but the error was driving me mad. My host has now corrected the problem so i am no longer seeing it. Seemed to only happen when the call initiated the connection then lost it immediately.