#Rmad~> Posted March 22, 2014 Share Posted March 22, 2014 السلام عليكم ياخوان انا عدلت مود ال play وواجهتني مشكلة انه لما اخش السيرفر تجي الشاشة على السماء مايدخلني الرسباون ولما اموت تقعد الكاميرا على الاعب وتطلع لفوق addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) Spawn = { [1] = {221.51188659668,1856.4104003906,12.736205101013}, [2] = {212.51364135742,1855.6560058594,13.034799575806}, [3] = {221.51188659668,1856.4104003906,12.736205101015}, } Skin = {282,285,287} function spawn(player) if not isElement(player) then return end local x,y,z = unpack(Spawn[math.random(#Spawn)]) spawnPlayer( source, x, y, z ) setElementModel( source, Skin[math.random(#Skin)] ) end addEventHandler("onResourceStart", getRootElement(),sl) addEventHandler("onPlayerSpawn", getRootElement(),sl) addEventHandler("onPlayerJoin", getRootElement(),sl) function sl() spawn(source) end addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 5000, 1, source) end ) Link to comment
#DRAGON!FIRE Posted March 22, 2014 Share Posted March 22, 2014 شي اكيد الكود هريسة لانه .. وش تبي تسوي ؟ ! Link to comment
#Rmad~> Posted March 22, 2014 Author Share Posted March 22, 2014 شي اكيد الكود هريسة لانه .. وش تبي تسوي ؟ ! كيف هريسة يازاحف ؟؟؟ بغيت اثبت ثلاث بدايات عشوائية وشخصيات 3 عشوائية .. Link to comment
oPIXz Posted March 22, 2014 Share Posted March 22, 2014 resources/[gamemodes]/play/play.zip افتحه ثم افتح ملف broph.map spawnpoint دور على الاصلي عندي 4 سباونات ضيف وعدل عليها Link to comment
#Rmad~> Posted March 22, 2014 Author Share Posted March 22, 2014 resources/[gamemodes]/play/play.zipافتحه ثم افتح ملف broph.map spawnpoint دور على الاصلي عندي 4 سباونات ضيف وعدل عليها مافهمت عليك ابد لو في امكانية تصححو الكود الي فوق عشان اشوف وش اخطأئي Link to comment
oPIXz Posted March 22, 2014 Share Posted March 22, 2014 انت مو قلت قيم مود بلاي ؟ يعني ما يحتاج تسوي هالسكربت عشان يغير السباون القيم مود له سباون انت تغيره من الملف اللي قلت لك ملف القيم مود deathmatch\resources\[gamemodes]\[play] المسار هذا broph.map -- والشخصيات في نفس المسار افتح broph.lua وغير الفنشكن الاصلي باللي تحت local skins = { "0", "1", "2", } 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,skins[math.random(1,#skins)]) fadeCamera(player, true) setCameraTarget(player, player) showChat(player, true) end 0 1 2 ارقام الشخصيات اللي تبيها Link to comment
abu5lf Posted March 22, 2014 Share Posted March 22, 2014 السلام عليكمياخوان انا عدلت مود ال play وواجهتني مشكلة انه لما اخش السيرفر تجي الشاشة على السماء مايدخلني الرسباون ولما اموت تقعد الكاميرا على الاعب وتطلع لفوق addEventHandler("onResourceStart", resourceRoot, function() resetMapInfo() for i,player in ipairs(getElementsByType("player")) do spawn(player) end end ) Spawn = { [1] = {221.51188659668,1856.4104003906,12.736205101013}, [2] = {212.51364135742,1855.6560058594,13.034799575806}, [3] = {221.51188659668,1856.4104003906,12.736205101015}, } Skin = {282,285,287} function spawn(player) if not isElement(player) then return end local x,y,z = unpack(Spawn[math.random(#Spawn)]) spawnPlayer( source, x, y, z ) setElementModel( source, Skin[math.random(#Skin)] ) end addEventHandler("onResourceStart", getRootElement(),sl) addEventHandler("onPlayerSpawn", getRootElement(),sl) addEventHandler("onPlayerJoin", getRootElement(),sl) function sl() spawn(source) end addEventHandler("onPlayerWasted", root, function() setTimer(spawn, 5000, 1, source) end ) جرب gRandomSpawn = { { 221, 1856, 12 }; { 212, 1855, 13 }; { 221, 1856, 12 }; }; gRandomSkin = { 282, 285, 287; }; function sRandomSpawnPlayer( thePlayer ) spawnPlayer( thePlayer, unpack( gRandomSpawn[ math.random( #gRandomSpawn ) ] ) ) setElementModel( thePlayer, gRandomSkin[ math.random( #gRandomSkin ) ] ) fadeCamera( thePlayer, true ) setCameraTarget( thePlayer ) end function onEvent( eventName ) if eventName == 'onPlayerJoin' then sRandomSpawnPlayer( source ) else setTimer( sRandomSpawnPlayer, 5000, 1, source ) end end addEventHandler( 'onPlayerJoin', getRootElement( ), onEvent ) addEventHandler( 'onPlayerWasted', getRootElement( ), onEvent ) addEventHandler( 'onResourceStart', resourceRoot, function( ) for _, aPlayer in next, getElementsByType 'player' do sRandomSpawnPlayer( aPlayer ) end end ) Link to comment
#DRAGON!FIRE Posted March 22, 2014 Share Posted March 22, 2014 جرب gRandomSpawn = { { 221, 1856, 12 }; { 212, 1855, 13 }; { 221, 1856, 12 }; }; gRandomSkin = { 282, 285, 287; }; function sRandomSpawnPlayer( thePlayer ) spawnPlayer( thePlayer, unpack( gRandomSpawn[ math.random( #gRandomSpawn ) ] ) ) setElementModel( thePlayer, gRandomSkin[ math.random( #gRandomSkin ) ] ) fadeCamera( thePlayer, true ) setCameraTarget( thePlayer ) end function onEvent( eventName ) if eventName == 'onPlayerJoin' then sRandomSpawnPlayer( source ) else setTimer( sRandomSpawnPlayer, 5000, 1, source ) end end addEventHandler( 'onPlayerJoin', getRootElement( ), onEvent ) addEventHandler( 'onPlayerWasted', getRootElement( ), onEvent ) addEventHandler( 'onResourceStart', resourceRoot, function( ) for _, aPlayer in next, getElementsByType 'player' do sRandomSpawnPlayer( aPlayer ) end end ) onPlayerJoin Link to comment
abu5lf Posted March 22, 2014 Share Posted March 22, 2014 جرب gRandomSpawn = { { 221, 1856, 12 }; { 212, 1855, 13 }; { 221, 1856, 12 }; }; gRandomSkin = { 282, 285, 287; }; function sRandomSpawnPlayer( thePlayer ) spawnPlayer( thePlayer, unpack( gRandomSpawn[ math.random( #gRandomSpawn ) ] ) ) setElementModel( thePlayer, gRandomSkin[ math.random( #gRandomSkin ) ] ) fadeCamera( thePlayer, true ) setCameraTarget( thePlayer ) end function onEvent( eventName ) if eventName == 'onPlayerJoin' then sRandomSpawnPlayer( source ) else setTimer( sRandomSpawnPlayer, 5000, 1, source ) end end addEventHandler( 'onPlayerJoin', getRootElement( ), onEvent ) addEventHandler( 'onPlayerWasted', getRootElement( ), onEvent ) addEventHandler( 'onResourceStart', resourceRoot, function( ) for _, aPlayer in next, getElementsByType 'player' do sRandomSpawnPlayer( aPlayer ) end end ) onPlayerJoin ? Link to comment
iPrestege Posted March 22, 2014 Share Posted March 22, 2014 جرب gRandomSpawn = { { 221, 1856, 12 }; { 212, 1855, 13 }; { 221, 1856, 12 }; }; gRandomSkin = { 282, 285, 287; }; function sRandomSpawnPlayer( thePlayer ) spawnPlayer( thePlayer, unpack( gRandomSpawn[ math.random( #gRandomSpawn ) ] ) ) setElementModel( thePlayer, gRandomSkin[ math.random( #gRandomSkin ) ] ) fadeCamera( thePlayer, true ) setCameraTarget( thePlayer ) end function onEvent( eventName ) if eventName == 'onPlayerJoin' then sRandomSpawnPlayer( source ) else setTimer( sRandomSpawnPlayer, 5000, 1, source ) end end addEventHandler( 'onPlayerJoin', getRootElement( ), onEvent ) addEventHandler( 'onPlayerWasted', getRootElement( ), onEvent ) addEventHandler( 'onResourceStart', resourceRoot, function( ) for _, aPlayer in next, getElementsByType 'player' do sRandomSpawnPlayer( aPlayer ) end end ) onPlayerJoin Huh? Link to comment
#DRAGON!FIRE Posted March 22, 2014 Share Posted March 22, 2014 , بـ الغلط ما انتبهت للكود Link to comment
abu5lf Posted March 22, 2014 Share Posted March 22, 2014 مافيه مشكلة.. P.S: احذفها eventName لصاحب الموضوع سطر 20 حطيت بالغلط Link to comment
#Rmad~> Posted March 22, 2014 Author Share Posted March 22, 2014 مافيه مشكلة..P.S: احذفها eventName لصاحب الموضوع سطر 20 حطيت بالغلط يعطيك العافية عاشق الرجاء اغلاق الموضوع ## 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