[HELP] Change skin to a specific person code

A friend made this code, but id doesn’t work for me, is it correct or…?

local firstspawn = 0
AddEventHandler(‘playerSpawned’, function(spawn)
if firstspawn = 1
if GetPlayerName(PlayerId()) == “XBillyX” then
ChangeToSkin(“g_m_m_armboss_01”)
SetPedComponentVariation(GetPlayerPed(-1), 0, 0, 0, 0)
SetPedComponentVariation(GetPlayerPed(-1), 2, 1, 0, 0)
SetPedComponentVariation(GetPlayerPed(-1), 3, 0, 0, 0)
SetPedComponentVariation(GetPlayerPed(-1), 4, 0, 1, 0)
end

end
end)

Do you know how to do it correctly? thanks

What is playerSpawned event ? (https://wiki.fivem.net/wiki/Server_events)
What is the code of ChangeToSkin ?