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

4 years ago

Advertisement
December 01, 2020, 12:46:31 am

Author Topic: Steam id finder  (Read 130 times)

Kesarion

  • Newbie
  • *
  • Posts: 20
    • View Profile
Steam id finder
« on: November 06, 2020, 12:10:05 am »
Code: [Select]
--[[ script that will print the steamid of any player
 /steamid numberid  gives the steamid  of the player that has that id
 /mysteamid         gives the players personal steamid
 ]]--
function mysteamid(args)
 local playerthatasked = args.player
 local words = args.text:split(" ")
 if #words == 1 and words[1]== "/mysteamid" then
if IsValid(playerthatasked) then
local ysrmid= "Your STEAM ID is "
local steamfinder2=playerthatasked:GetSteamId().id
playerthatasked:SendChatMessage(ysrmid..tostring(steamfinder2),Color(100, 149, 237))
end
end
end
function steamfinderothers(args)
 local playerthatasked = args.player
 local playertofind
 local words = args.text:split(" ")
if #words == 2 and words[1] == "/steamid" then
for player in Server:GetPlayers() do
if player:GetId()== tonumber(words[2]) then playertofind = player 
end
end
if IsValid(playerthatasked) and IsValid(playertofind) then -- if both players are online
local steamidfinder1=playertofind:GetSteamId().id
local steaminfotxt =" 's STEAM ID is "
playerthatasked:SendChatMessage(tostring(playertofind:GetName())..steaminfotxt..tostring(steamidfinder1), Color(100, 149, 237))
elseif IsValid(playerthatasked) and not IsValid(playertofind) then -- if the target  player is not online
local playernotfoundmessage= "This player is no longer in the game"
playerthatasked:SendChatMessage(playernotfoundmessage, Color( 255,100,100))
return true
end
end
end

Events:Subscribe("PlayerChat",mysteamid)
Events:Subscribe("PlayerChat",steamfinderothers)

Make a folder with the name of the script and a Server folder in witch you will put all of above with .lua ending.
commands:
 /steamid numberid  gives the steamid  of the player that has that id from the F6 menu with the players.This was done because people can use multiple alphabets and special characters.
 /mysteamid         gives the players personal steamid

Pretty simple
I might add images later.
« Last Edit: November 06, 2020, 12:13:31 am by Kesarion »