Jump to content

الي عنده خبرة في البرمجة يدخل


Mr.king

Recommended Posts

  • Replies 59
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

-- Server Side  
addEventHandler("onPlayerWasted",root, 
function () 
      local team = getPlayerTeam (source) 
if ( team and getTeamName (team) == ("اسم التيم")) then 
     spawnPlayer ( source, x,y,z, 0,skinid, 0, 0 ) 
elseif ( team and getTeamName (team) == ("اسم التيم")) then 
     spawnPlayer ( source, x,y,z, 0,skinid, 0, 0 ) 
       end 
end 
) 
  
Link to comment

اناحطيت كود لما يموت يروح مكان المهم بس انا نقلت كد السباون حق التيمات في ملف بلاي على ملف brobh.lua

صار زي كذا بس ميبي يشتغل

addEventHandler("onResourceStart", resourceRoot, 
    function() 
        resetMapInfo() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) 
        end 
    end 
) 
  
function spawn(player) 
      local team = getPlayerTeam (player) 
    if ( team and getTeamName (team) == ("br")) then 
     spawnPlayer ( player, 0, 0, 3) 
    elseif ( team and getTeamName (team) == ("bt")) then 
     spawnPlayer ( player, 0, 0, 3) 
  else 
    if not isElement(player) then return end 
    repeat until spawnPlayer ( player, -3363.2329101563, -3000.2883300781, 106.02993011475, 180, 46, 0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
        setTimer(spawn, 1800, 1, source) 
    end 
) 

عدله لاهنت

Link to comment

عشان لما انا حطيت التيميات في ذاك المود حق النافذة لو مت وانا في الحرب يرجعني في الحرب بعدين يوديني في البداية فهمت يعني بلاي يوديك البداية لما انا اموت بلاي يوديني البداية وانا المفروض اكمل الحرب فهمت ابيك تعدله

Link to comment

addEventHandler("onResourceStart", resourceRoot, 
    function() 
        resetMapInfo() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) 
        end 
    end 
) 
  
function spawn(player) 
      local team = getPlayerTeam (player) 
    if ( team and getTeamName (team) == ("br")) then 
     spawnPlayer ( player, 0, 0, 3) 
    elseif ( team and getTeamName (team) == ("bt")) then 
     spawnPlayer ( player, 0, 0, 3) 
  else 
    if not isElement(player) then return end 
    repeat until spawnPlayer ( player, -3363.2329101563, -3000.2883300781, 106.02993011475, 180, 46, 0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
     end 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
        setTimer(spawn, 1800, 1, source) 
    end 
) 
Link to comment
addEventHandler("onResourceStart", resourceRoot, 
    function() 
        resetMapInfo() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) 
        end 
    end 
) 
  
function spawn(player) 
      local team = getPlayerTeam (player) 
    if ( team and getTeamName (team) == ("br")) then 
     spawnPlayer ( player, 0, 0, 3) 
    elseif ( team and getTeamName (team) == ("bt")) then 
     spawnPlayer ( player, 0, 0, 3) 
  else 
    if not isElement(player) then return end 
    repeat until spawnPlayer ( player, -3363.2329101563, -3000.2883300781, 106.02993011475, 180, 46, 0, 0) 
    fadeCamera(player, true) 
    setCameraTarget(player, player) 
    showChat(player, true) 
     end 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
        setTimer(spawn, 1800, 1, source) 
    end 
) 

في عندككـ شي بسيط , إنه إذا كان اللاعب بالتيم

ما رح يظهر الشاشة له + الشات + يحدد الكاميرا عليه , يعني يصير كذآ ,

-- Server Side !

addEventHandler("onResourceStart", resourceRoot, 
    function() 
        resetMapInfo() 
        for i,player in ipairs(getElementsByType("player")) do 
            spawn(player) 
        end 
    end 
) 
  
function spawn(player) 
    local team = getPlayerTeam (player) 
    if ( team and getTeamName (team) == ("br")) then 
        spawnPlayer ( player, 0, 0, 3) 
        fadeCamera(player, true) 
        setCameraTarget(player, player) 
        showChat(player, true) 
    elseif ( team and getTeamName (team) == ("bt")) then 
        spawnPlayer ( player, 0, 0, 3) 
        fadeCamera(player, true) 
        setCameraTarget(player, player) 
        showChat(player, true) 
    else 
        if not isElement(player) then return end 
        repeat until spawnPlayer ( player, -3363.2329101563, -3000.2883300781, 106.02993011475, 180, 46, 0, 0) 
        fadeCamera(player, true) 
        setCameraTarget(player, player) 
        showChat(player, true) 
    end 
end 
  
addEventHandler("onPlayerJoin", root, 
    function() 
        spawn(source) 
    end 
) 
  
addEventHandler("onPlayerWasted", root, 
    function() 
        setTimer(spawn, 1800, 1, source) 
    end 
) 

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