Weapon2 = {
"MP5",
"AK-47",
"Tec-9",
"Deagle",
}
addEventHandler( "onPlayerWasted", root,
function()
if ( getElementDimension ( source ) ) == 3 then
Randoms2 = unpack(Weapon2[math.random(#Weapon2)])
setWeapon = getWeaponIDFromName ( Randoms2 )
giveWeapon ( source, setWeapon,8000, true )
local SpawnDetails = SpawnsTable[( ( getPlayerTeam( source ) or nil ) == getTeamFromName( "Zombie" ) and "Zombies" or getElementDimension( source ) == 3 and "Non-Zombies" or "OtherPlayers" ).."Spawns"] SpawnDetails = SpawnDetails[math.random( #SpawnDetails )]
SpawnPlayer( source, SpawnDetails["PositionX"], SpawnDetails["PositionY"], SpawnDetails["PositionZ"], SpawnDetails["Rotation"], SpawnDetails["Skins"][math.random( #SpawnDetails["Skins"] )], SpawnDetails["Interior"], SpawnDetails["Dimension"], SpawnDetails["TeamName"] and getTeamFromName( SpawnDetails["TeamName"] ) )
end
end
)
جرب