Jump to content

spawn skins math.random


Gallagher

Recommended Posts

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) 

Link to comment
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 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...