#StrOnG_,) Posted January 13, 2016 Share Posted January 13, 2016 السلام عليكم local SpawnsTable, Timers = { --[[ { PositionX = 0, PositionY = 0, PositionZ = 0, Rotation = 0, Skins = { 0, 0, 0, 0, 0 }, -- عشوائي هنا ، حط رقم واحد عشان شخصية وحدة Interior = 0, Dimension = 0, TeamName = "TeamName" } ]] ZombiesSpawns = { -- جدول سباون الزومبي ، تقدر تحط أكثر من جدول داخله والسباون يكون عشوائي { PositionX = 1564.63367, PositionY = 2732.67627, PositionZ = 10.67188, Rotation = 0, Skins = { 70 }, Interior = 0, Dimension = 3, TeamName = "Zombie" } }, OtherPlayersSpawns = { -- هنا سباون إلي مو في تيم الزومبي ، السباون عشوائي { PositionX = 1462.01501, PositionY = 2774.28125, PositionZ = 10.82031, Rotation = 0, Skins = { 294 }, Interior = 0, Dimension = 3 }, { PositionX = -3484.45850, PositionY = -3018.41724, PositionZ = 12.90781, Rotation = 0, Skins = { 294 }, Interior = 0, Dimension = 0 } } }, {} function SpawnPlayer( ... ) local Player = select( 1, ... ) if ( isElement( Player ) ) then fadeCamera( Player, false ) showChat( Player, false ) if ( isTimer( Timers[Player] ) ) then killTimer( Timers[Player] ) end Timers[Player] = setTimer( function( ... ) spawnPlayer( ... ) fadeCamera( Player, true ) showChat( Player, true ) Timers[Player] = nil end, 1000, 1, ... ) end end addEventHandler( "onPlayerWasted", root, function() local SpawnDetails = SpawnsTable[( ( getPlayerTeam( source ) or nil ) == getTeamFromName( "Zombie" ) and "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 ) الاكواد هذي لما انتحر يرسبن بالاماكن الموجودة لكن المشكلة لو انتحرت اكثر من مره يغير الدمنشن حقه تلقائي انا ما ابيه يغير الدمنشن حقه اتمنى تصححوه لي وشكرآ Link to comment
Simple. Posted January 13, 2016 Share Posted January 13, 2016 في سطر 23 , 35 الدمنشن 3 وفي سطر 44 الدمنشن 0 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