Jump to content

تعديل مود PLAY


Recommended Posts

السلام عليكم

ياخوان انا عدلت مود ال 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
resources/[gamemodes]/play/play.zip

افتحه ثم افتح ملف

broph.map

spawnpoint دور على

الاصلي عندي 4 سباونات ضيف وعدل عليها

مافهمت عليك ابد :(

لو في امكانية تصححو الكود الي فوق عشان اشوف وش اخطأئي

Link to comment

انت مو قلت قيم مود بلاي ؟

يعني ما يحتاج تسوي هالسكربت عشان يغير السباون

القيم مود له سباون انت تغيره

من الملف اللي قلت لك ملف القيم مود

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
السلام عليكم

ياخوان انا عدلت مود ال 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

جرب

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

جرب

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

جرب

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

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