#StrOnG_,) Posted January 23, 2016 Share Posted January 23, 2016 السلام عليكم عندي مشكلة بهذي الاكواد وهي انا مسوي لما يموت يتحقق انه بدمنشن 3 واذا كان بدمنشن 3 يعطيه واذا كان بدمنشن أخر ما يعطيه اسلحة سيرفر Weapon2 = { "MP5", "AK-47", "Tec-9", "Deagle", } addEventHandler( "onPlayerWasted", root, function() if ( getElementDimension ( localPlayer ) ) == 0 then Randoms2 = 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 ) Link to comment
Mr.Ronaldo Posted January 23, 2016 Share Posted January 23, 2016 Weapon2 = { "MP5", "AK-47", "Tec-9", "Deagle", } addEventHandler( "onPlayerWasted", root, function() if ( getElementDimension ( source ) ) == 3 then Randoms2 = 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 ) Link to comment
#StrOnG_,) Posted January 23, 2016 Author Share Posted January 23, 2016 Weapon2 = { "MP5", "AK-47", "Tec-9", "Deagle", } addEventHandler( "onPlayerWasted", root, function() if ( getElementDimension ( source ) ) == 3 then Randoms2 = 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 ) عندك اند ناقصص + ما يعطي اسلحة Link to comment
Mr.Ronaldo Posted January 23, 2016 Share Posted January 23, 2016 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 ) جرب Link to comment
#|_oskar_|# Posted January 23, 2016 Share Posted January 23, 2016 جرب Weapon2 = { "MP5", "AK-47", "Tec-9", "Deagle", } addEventHandler( "onPlayerWasted", root, function() if ( getElementDimension ( source ) ) == 0 then setTimer ( function() setWeapon = getWeaponIDFromName (Weapon2 [ math.random ( #Weapon2 ) ]) giveWeapon ( source,setWeapon,8000, true ) outputChatBox(setWeapon,source,255,255,0,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 )] end, 2500,1) end end) Link to comment
Abdul KariM Posted January 24, 2016 Share Posted January 24, 2016 جرب Weapon2 = { "MP5", "AK-47", "Tec-9", "Deagle", } addEventHandler( "onPlayerWasted", root, function() if ( getElementDimension ( source ) ) == 0 then setTimer ( function() setWeapon = getWeaponIDFromName (Weapon2 [ math.random ( #Weapon2 ) ]) giveWeapon ( source,setWeapon,8000, true ) outputChatBox(setWeapon,source,255,255,0,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 )] end, 2500,1) end end) يقولك دمنشن 3 موب 0 وهو حاط بكوده بعد 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