Resource edit. (id Script)

Hey, i have a /id command but it only shows on the screen of who types /id. Could someone help make it so it shows on everyone’s screen?

– Code by Titch2000 2017
– Free to modify or improve but please give credit if sharing it.
TriggerEvent(‘es:addCommand’, ‘id’, function(source, args, user)
local firstName = tostring(args[2])
local lastName = tostring(args[3])
local randomNum = math.random(4)
local randomNum2 = math.random(1)
local randomNum3 = math.random(10)
local randomNum4 = math.random(5)
local dob = randomNum
local address = randomNum
local expires = randomNum2
if randomNum == 1 then – sets DOB
dob = “1968”
end

if randomNum == 2 then -- sets DOB
	dob = "1976"
end

if randomNum == 3 then -- sets DOB
	dob = "1982"
end

if randomNum == 4 then -- sets DOB
	dob = "1990"
end

if randomNum == 1 then -- sets Address
	address = "19 Burch Ave"
end

if randomNum == 2 then -- sets Address
	address = "32 Winston Rd"
end

if randomNum == 3 then -- sets Address
	address = "51 NewPort S.t"
end

if randomNum == 4 then -- sets Address
	address = "61 Grand View"
end

if randomNum == 1 then -- sets Expire date
	expires = "13/09/2021"
end


TriggerClientEvent('chatMessage', source, "[ID]", {255, 255, 255}, "^2 Name: " ..firstName.. " " ..lastName.. " ")
TriggerClientEvent('chatMessage', source, "[ID]", {255, 255, 255}, "^2 ----------------------------")
TriggerClientEvent('chatMessage', source, "[ID]", {255, 255, 255}, "^2 Dob: " ..dob.. " ")
TriggerClientEvent('chatMessage', source, "[ID]", {255, 255, 255}, "^2 Address: " ..address.. " ")
TriggerClientEvent('chatMessage', source, "[ID]", {255, 255, 255}, "^2 Expires: " ..expires.. " ")

end)

– Code by Titch2000 2017
– Free to modify or improve but please give credit if sharing it.
TriggerEvent(‘es:addCommand’, ‘id’, function(source, args, user)
local firstName = tostring(args[2])
local lastName = tostring(args[3])
local randomNum = math.random(4)
local randomNum2 = math.random(1)
local randomNum3 = math.random(10)
local randomNum4 = math.random(5)
local dob = randomNum
local address = randomNum
local expires = randomNum2
if randomNum == 1 then – sets DOB
dob = "1968"
end

if randomNum == 2 then -- sets DOB
	dob = "1976"
end

if randomNum == 3 then -- sets DOB
	dob = "1982"
end

if randomNum == 4 then -- sets DOB
	dob = "1990"
end

if randomNum == 1 then -- sets Address
	address = "19 Burch Ave"
end

if randomNum == 2 then -- sets Address
	address = "32 Winston Rd"
end

if randomNum == 3 then -- sets Address
	address = "51 NewPort S.t"
end

if randomNum == 4 then -- sets Address
	address = "61 Grand View"
end

if randomNum == 1 then -- sets Expire date
	expires = "13/09/2021"
end


TriggerClientEvent('chatMessage', -1, "[ID]", {255, 255, 255}, "^2 Name: " ..firstName.. " " ..lastName.. " ")
TriggerClientEvent('chatMessage', -1, "[ID]", {255, 255, 255}, "^2 ----------------------------")
TriggerClientEvent('chatMessage', -1, "[ID]", {255, 255, 255}, "^2 Dob: " ..dob.. " ")
TriggerClientEvent('chatMessage', -1, "[ID]", {255, 255, 255}, "^2 Address: " ..address.. " ")
TriggerClientEvent('chatMessage', -1, "[ID]", {255, 255, 255}, "^2 Expires: " ..expires.. " ")
-- To fix issue you needed to change the "source" in TriggerClientEvent to a "-1"
-- That will trigger the event for all players and not just the invoker player.
end)

Could have just asked me and i could have saved you the time :stuck_out_tongue: @Kevin_Fisher