Gallagher Posted January 4, 2014 Posted January 4, 2014 how can I make the player spawn each time with a skin? the default is spawn with skin id 73, how to make it spawn with 73, 75, or 76? function spawnDayZPlayer(player) triggerClientEvent(player, "sex", player) local number = math.random(table.size(spawnPositions)) local x,y,z = spawnPositions[number][1],spawnPositions[number][2],spawnPositions[number][3] spawnPlayer (player, x,y,z+0.5, math.random(0,360), 73, 0, 0) fadeCamera (player, true)
Gallagher Posted January 4, 2014 Author Posted January 4, 2014 just replace your 73 with math.random(73,76) did not work as I expected, I mean, spawn with the skins 73, 75,76 or 285 for i, data in ipairs(playerDataTable) do if data[1] == "skin" then setElementModel(localPlayer, 73) end end end addEvent("sex",true) addEventHandler("sex",root,sexo) ----------------------------------------------------------------------- ----------------------------------------------------------------------- -- Se não manja nem mexe aqui \/ function playersexo() showCursor(false) destroyElement(wal) destroyElement(fundo) destroyElement(mulher) destroyElement(home) if(source ~= mulher) then setElementModel(localPlayer, 73) for i, data in ipairs(playerDataTable) do if data[1] == "skin" then setElementData(localPlayer, data[1], 73) -- "73" ID da sua skin homem. end end end
TAPL Posted January 5, 2014 Posted January 5, 2014 skins = {73, 75, 76, 285} ------------------------------------------- skins[math.random(#skins)] -- random skin from the table.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now