Jump to content

Como não perder as armas ou skins


Recommended Posts

Olá, atualmente uso esse spawnconfig no meu servidor mas toda vez que eu morro ele reseta skin e armas! Estou montando um servidor e gostaria que as armas e skins não sumissem!!

codigo do spawnconfig:

 

-- Configurações para quando um jogador morrer
	-- XYZ coördinates
	local spawnX = 1128.925
	local spawnY = -1467.630
	local spawnZ = 15.735
	-- Armas e tiros
	local spawnWeapon = 0
	local spawnAmmo = 0
	-- Pele do jogador
	local spawnSkin = 0

-- Definições para as quantidades de dinheiro
	-- Dinheiro por matar um jogador 
	local killerMoney = 250
	-- O dinheiro retirado do jogador quando morrem
	local deadPlayerMoney = 50

-- Functions
-- This function spawns players when they join
function spawnOnJoin()
	spawnPlayer(source, joinX, joinY, joinZ, 0 )
	fadeCamera(source, true)
	setCameraTarget(source, source)
	outputChatBox(joinMessage, source)
	giveWeapon(source, joinWeapon, joinAmmo)
	givePlayerMoney(source, joinMoney)
end

-- This function spawns players after they died
function spawnOnDead(ammo, killer, weapon, bodypart)
	takePlayerMoney(source, deadPlayerMoney)
	if (killer) and (killer ~= source) then
		givePlayerMoney(killer, killerMoney)
	end
	setTimer(spawnPlayer, 3000, 1, source, spawnX, spawnY, spawnZ, 0, spawnSkin)
	setCameraTarget(source, source)
	setTimer(giveWeapon, 3000, 1, source, spawnWeapon, spawnAmmo)
end

-- Event handlers
addEventHandler("onPlayerJoin", getRootElement(), spawnOnJoin)
addEventHandler("onPlayerWasted", getRootElement(), spawnOnDead)

Alguém consegue me fortalecer?
 

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...