MOGA672002 Posted May 23, 2018 Share Posted May 23, 2018 function select() local account = getPlayerAccount(source) local x, y, z, rot = 2700.04272, -2327.13013, 13.33250, 269 local skin = 29 local team = getTeamFromName("Unemployed") setAccountData(account, "WWRPG.playerX", x) setAccountData(account, "WWRPG.playerY", y) setAccountData(account, "WWRPG.playerZ", z) setAccountData(account, "WWRPG.playerRot", rot) setAccountData(account, "WWRPG.playerSkin", skin) setAccountData(account, "WWRPG.playerInt", 0) setAccountData(account, "WWRPG.playerDim", 0) setAccountData(account, "WWRPG.playerTeam", "Unemployed") fadeCamera(source, true) spawnPlayer(source, x, y, z, rot, skin, 0, team) local dimension = getFreeDimension() cleanNotUsedBoats() if isElement(boats[source]) then destroyElement(boats[source]) end boats[source] = createVehicle(493, 2731.7016601563, -2322.798828125, 2, 0, 0, 359) setElementFrozen(boats[source], true) setElementDimension(boats[source], dimension) setElementDimension(source, dimension) triggerClientEvent(source,"startIntro",source,dimension) end https://imgur.com/a/Qvpf9WQ what the problem with this line spawnPlayer(source, x, y, z, rot, skin, 0, team) Link to comment
Dimos7 Posted May 23, 2018 Share Posted May 23, 2018 its need dimension too and interior Link to comment
MOGA672002 Posted May 23, 2018 Author Share Posted May 23, 2018 tell me what should i do ? or edit the code then post it please Link to comment
Dimos7 Posted May 23, 2018 Share Posted May 23, 2018 you ned on more 0 and after put team Link to comment
MOGA672002 Posted May 23, 2018 Author Share Posted May 23, 2018 like this spawnPlayer(source, x, y, z, rot, skin, 0, 0, team) ? please edit it and post it as i am not aprogrammer so i cant fix it Link to comment
Dimos7 Posted May 23, 2018 Share Posted May 23, 2018 function select() local account = getPlayerAccount(source) local x, y, z, rot = 2700.04272, -2327.13013, 13.33250, 269 local skin = 29 local team = getTeamFromName("Unemployed") setAccountData(account, "WWRPG.playerX", x) setAccountData(account, "WWRPG.playerY", y) setAccountData(account, "WWRPG.playerZ", z) setAccountData(account, "WWRPG.playerRot", rot) setAccountData(account, "WWRPG.playerSkin", skin) setAccountData(account, "WWRPG.playerInt", 0) setAccountData(account, "WWRPG.playerDim", 0) setAccountData(account, "WWRPG.playerTeam", "Unemployed") fadeCamera(source, true) spawnPlayer(source, x, y, z, rot, skin, 0, 0,team) local dimension = getFreeDimension() cleanNotUsedBoats() if isElement(boats[source]) then destroyElement(boats[source]) end boats[source] = createVehicle(493, 2731.7016601563, -2322.798828125, 2, 0, 0, 359) setElementFrozen(boats[source], true) setElementDimension(boats[source], dimension) setElementDimension(source, dimension) triggerClientEvent(source,"startIntro",source,dimension) end Link to comment
itHyperoX Posted May 24, 2018 Share Posted May 24, 2018 but for position saving you can use setAccountData(account, "WWRPG.POS", toJSON({x, y, z})) --then use it local accData = getAccountData(account, "WWRPG.POS") local playerX, playerY, playerZ = unpack(fromJSON(accData)) Link to comment
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