Mike269 Posted August 27, 2015 Posted August 27, 2015 Hello guys, I am making a server and the save system doesn't Works right because everytime I die, my skin changes and I lose weapons, please help me, what should I edit here? local spawnpoint addEventHandler("onResourceStart", resourceRoot, function() spawnpoint = getRandomSpawnPoint() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) function spawn(player) if not isElement(player) then return end if get("spawnreset") == "onSpawn" then spawnpoint = getRandomSpawnPoint() end exports.spawnmanager:spawnPlayerAtSpawnpoint(player,spawnpoint,false) repeat until setElementModel(player,math.random(312)) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end function getRandomSpawnPoint () local spawnpoints = getElementsByType("spawnpoint") return spawnpoints[math.random(1,#spawnpoints)] end addEventHandler("onPlayerJoin", root, function() spawn(source) end ) addEventHandler("onPlayerQuit",root, function () if getPlayerCount() == 1 and get("spawnreset") == "onServerEmpty" then spawnpoint = getRandomSpawnPoint() end end ) addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 1800, 1, source) end )
xeon17 Posted August 27, 2015 Posted August 27, 2015 If you made your own spawn system, then you should create your own spawn stuff . A unique GangWar gamemode waiting for you!Click here for more information.
Mike269 Posted August 27, 2015 Author Posted August 27, 2015 I didn't make my own spawn system, that's broph.. from "play" gamemode...
xeon17 Posted August 27, 2015 Posted August 27, 2015 I didn't make my own spawn system, that's broph.. from "play" gamemode... I know, i've recommended you to create your own spawns system in my last post... A unique GangWar gamemode waiting for you!Click here for more information.
Mike269 Posted August 27, 2015 Author Posted August 27, 2015 oh, I would but I don't know how:/ I am not really good in scripting but I am trying...
xeon17 Posted August 27, 2015 Posted August 27, 2015 Check getAccountData if you use accountData to save the player data. Also check the function spawnPlayer A unique GangWar gamemode waiting for you!Click here for more information.
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