I was trying to get a table of every skin and their correspondent voice (because I couldn't find them), but while I was trying to print it, FileWrite only writes the first line.
Technically, the idea is that each second the game changes the player skin (as I couldn't manage to create a ped and retrieve a voice), and gets the skin id, and voice ids, and prints it, giving a nice table with all of them:
addCommandHandler ( "gv",
function ()
local localFile = fileCreate("test.csv")
fileWrite(localFile, "PEDMODEL, VOICETYPE, VOICENAME;")
local i = 0
setTimer(function ()
setElementModel(localPlayer, i)
local voiceType, voiceName = getPedVoice(localPlayer)
fileWrite(localFile, tostring(i)..", "..tostring(voiceType)..", "..tostring(voiceName)..";")
i = i + 1
end, 1000, 10)
fileClose(localFile)
end
)