Jump to content

تصحيح كود إظهار اللاعبين الميتين و الحيين |Thx To K!NG


Recommended Posts

شباب اتمنى توضيح الخطأ في الكود :roll:

الكود عبارة عن اف8 تكتب فيها

info-players

ويظهر لك اللاعبين الميتين والحيين في الشآآت

addCommandHandler ( "info-players", players ) 
function players ( )  
alivePlayers = getAlivePlayers () 
deadPlayers = getDeadPlayers () 
if alivePlayers and deadPlayers then  
outputChatBox("alivePlayers : " .. alivePlayers, source) 
outputChatBox("deadPlayers : " .. deadPlayers, source) 
    
                      end  
      end  

Edited by Guest
Link to comment

addCommandHandler ( "info-players", 
function() 
alivePlayers = getAlivePlayers () 
deadPlayers = getDeadPlayers () 
    if alivePlayers and deadPlayers then 
    outputChatBox("alivePlayers : " .. alivePlayers,source,255,0,255,true) 
    outputChatBox("deadPlayers : " .. deadPlayers,source,255,0,255,true) 
    end 
end) 
Link to comment
addCommandHandler ( "info-players", 
function() 
alivePlayers = getAlivePlayers () 
deadPlayers = getDeadPlayers () 
    if alivePlayers and deadPlayers then 
    outputChatBox("alivePlayers : " .. alivePlayers,source,255,0,255,true) 
    outputChatBox("deadPlayers : " .. deadPlayers,source,255,0,255,true) 
    end 
end) 

لازم تعرف اللاعب

addCommandHandler ( "info-players", 
function (source) 
alivePlayers = getAlivePlayers () 
deadPlayers = getDeadPlayers () 
    if alivePlayers and deadPlayers then 
    outputChatBox("alivePlayers : " .. alivePlayers,source,255,0,255,true) 
    outputChatBox("deadPlayers : " .. deadPlayers,source,255,0,255,true) 
    end 
end) 
Link to comment
ضآوي ,

global 'alivePlayers (a table value)

لأنه جدول جرب

addCommandHandler ( "info-players", 
function (source) 
    if alivePlayers and deadPlayers then 
for _,ap in ipairs (getAlivePlayers ()) do 
    outputChatBox("alivePlayers : " .. getPlayerName(ap),source,255,0,255,true) 
end 
for _,dp in ipairs (getDeadPlayers ()) do 
    outputChatBox("deadPlayers : " .. getPlayerName(dp),source,255,0,255,true) 
end 
    end 
end) 
Edited by Guest
Link to comment

ضاوي , للمعلوميه ما يحتاج تعريف لان السورس معرف ,

+

addCommandHandler ( "info-players", 
function(source) 
alivePlayers = getAlivePlayers() 
deadPlayers = getDeadPlayers () 
if ( alivePlayers) then 
    liveList = "N/A" 
    for i,v in ipairs(alivePlayers) do 
        if (liveList == "N/A" ) then 
            liveList = getPlayerName ( v ) 
    outputChatBox("alivePlayers : " .. liveList,source,255,0,255,true) 
    if (deadPlayers) then 
    DeadList = "N/A" 
    for i,D in ipairs(deadPlayers) do 
    if ( DeadList == "N/A" ) then 
    DeadList = getPlayerName ( D ) 
    outputChatBox("alivePlayers : " .. DeadList,source,255,0,255,true) 
                            end 
                        end 
                    end 
                end 
            end 
        end 
    end 
) 
Edited by Guest
Link to comment
ضآوي ,

global 'alivePlayers (a table value)

لأنه جدول جرب

addCommandHandler ( "info-players", 
function (source) 
    if alivePlayers and deadPlayers then 
for _,ap in ipairs (getAlivePlayers ()) do 
    outputChatBox("alivePlayers : " .. ap,source,255,0,255,true) 
end 
for _,dp in ipairs (getDeadPlayers ()) do 
    outputChatBox("deadPlayers : " .. dp,source,255,0,255,true) 
end 
    end 
end) 

مايصير شي , لايطلع الميتين ولا الحيين ولا يطلع مشكلة ولا شي ,,

:roll:

Link to comment
ضآوي ,

global 'alivePlayers (a table value)

لأنه جدول جرب

addCommandHandler ( "info-players", 
function (source) 
    if alivePlayers and deadPlayers then 
for _,ap in ipairs (getAlivePlayers ()) do 
    outputChatBox("alivePlayers : " .. ap,source,255,0,255,true) 
end 
for _,dp in ipairs (getDeadPlayers ()) do 
    outputChatBox("deadPlayers : " .. dp,source,255,0,255,true) 
end 
    end 
end) 

مايصير شي , لايطلع الميتين ولا الحيين ولا يطلع مشكلة ولا شي ,,

:roll:

شوف ردي عدلته

addCommandHandler ( "info-players", 
function (source) 
    if alivePlayers and deadPlayers then 
for _,ap in ipairs (getAlivePlayers ()) do 
    outputChatBox("alivePlayers : " .. getPlayerName(ap),source,255,0,255,true) 
end 
for _,dp in ipairs (getDeadPlayers ()) do 
    outputChatBox("deadPlayers : " .. getPlayerName(dp),source,255,0,255,true) 
end 
    end 
end) 
Link to comment
ضاوي , للمعلوميه ما يحتاج تعريف لان السورس معرف ,

+

addCommandHandler ( "info-players", 
function(source) 
alivePlayers = getAlivePlayers() 
deadPlayers = getDeadPlayers () 
if ( alivePlayers) then 
    liveList = "N/A" 
    for i,v in ipairs(alivePlayers) do 
        if (liveList == "N/A" ) then 
            liveList = getPlayerName ( v ) 
    outputChatBox("alivePlayers : " .. liveList,source,255,0,255,true) 
    if (deadPlayers) then 
    DeadList = "N/A" 
    for i,D in ipairs(deadPlayers) do 
    if ( DeadList == "N/A" ) then 
    DeadList = getPlayerName ( D ) 
    outputChatBox("alivePlayers : " .. DeadList,source,255,0,255,true) 
                            end 
                        end 
                    end 
                end 
            end 
        end 
    end 
) 

ليه ما يحتاج تعريف

؟ function(source) طيب ليه حطيت بالفنكشن كذا

addCommandHandler

لازم له تعريف اذا كان بالسيرفر بس لو كان كلنت مو لازم

Link to comment

خربطت وجيت

addCommandHandler ( "info-players", 
function ( ) 
alivePlayers = getAlivePlayers () 
deadPlayers = getDeadPlayers () 
PlayersNA = getPlayerName ( alivePlayers ) 
PlayersND = getPlayerName ( deadPlayers ) 
if alivePlayers and deadPlayers then 
outputChatBox("alivePlayers : " .. alivePlayers .. ":" .. PlayersNA, source) 
outputChatBox("deadPlayers : " .. deadPlayers .. ":" .. PlayersND 
, source) 
    
                      end 
      end 
) 

Link to comment
addCommandHandler ( "info-players", 
    function ( player ) 
        if ( getAlivePlayers ( ) ) then 
            for _, alivePlayers in ipairs ( getAlivePlayers ( ) ) do 
                outputChatBox("alivePlayers : " .. getPlayerName ( alivePlayers ), source, 255, 0, 255, true ) 
            end 
        end 
        if ( getDeadPlayers ( ) ) then 
            for _, deadPlayers in ipairs ( getDeadPlayers ( ) ) do 
                outputChatBox("deadPlayers : " .. getPlayerName ( deadPlayers ), player, 255, 0, 255, true ) 
            end 
        end 
    end 
) 

Link to comment
addCommandHandler ( "info-players", 
    function ( player ) 
        if ( getAlivePlayers ( ) ) then 
            for _, alivePlayers in ipairs ( getAlivePlayers ( ) ) do 
                outputChatBox("alivePlayers : " .. getPlayerName ( alivePlayers ), source, 255, 0, 255, true ) 
            end 
        end 
        if ( getDeadPlayers ( ) ) then 
            for _, deadPlayers in ipairs ( getDeadPlayers ( ) ) do 
                outputChatBox("deadPlayers : " .. getPlayerName ( deadPlayers ), player, 255, 0, 255, true ) 
            end 
        end 
    end 
) 

كفوووووووووووووووووووووووووو ضبط ولله انك بطل

Link to comment
addCommandHandler ( "info-players", 
    function ( player ) 
        if ( getAlivePlayers ( ) ) then 
            for _, alivePlayers in ipairs ( getAlivePlayers ( ) ) do 
                outputChatBox("alivePlayers : " .. getPlayerName ( alivePlayers ), source, 255, 0, 255, true ) 
            end 
        end 
        if ( getDeadPlayers ( ) ) then 
            for _, deadPlayers in ipairs ( getDeadPlayers ( ) ) do 
                outputChatBox("deadPlayers : " .. getPlayerName ( deadPlayers ), player, 255, 0, 255, true ) 
            end 
        end 
    end 
) 

فيه سورس سطر 5 نسيتها انت

addCommandHandler ( "info-players", 
    function ( player ) 
        if ( getAlivePlayers ( ) ) then 
            for _, alivePlayers in ipairs ( getAlivePlayers ( ) ) do 
                outputChatBox("alivePlayers : " .. getPlayerName ( alivePlayers ), player, 255, 0, 255, true ) 
            end 
        end 
        if ( getDeadPlayers ( ) ) then 
            for _, deadPlayers in ipairs ( getDeadPlayers ( ) ) do 
                outputChatBox("deadPlayers : " .. getPlayerName ( deadPlayers ), player, 255, 0, 255, true ) 
            end 
        end 
    end 
) 

+ لآهنت ابي اعرف وش الفرق بين كودي وكودك ماحس فيه فرق:D

addCommandHandler ( "info-players", 
function (source) 
    if alivePlayers and deadPlayers then 
for _,ap in ipairs (getAlivePlayers ()) do 
    outputChatBox("alivePlayers : " .. getPlayerName(ap),source,255,0,255,true) 
end 
for _,dp in ipairs (getDeadPlayers ()) do 
    outputChatBox("deadPlayers : " .. getPlayerName(dp),source,255,0,255,true) 
end 
    end 
end) 

Edited by Guest
Link to comment
addCommandHandler ( "info-players", 
    function ( player ) 
        if ( getAlivePlayers ( ) ) then 
            for _, alivePlayers in ipairs ( getAlivePlayers ( ) ) do 
                outputChatBox("alivePlayers : " .. getPlayerName ( alivePlayers ), source, 255, 0, 255, true ) 
            end 
        end 
        if ( getDeadPlayers ( ) ) then 
            for _, deadPlayers in ipairs ( getDeadPlayers ( ) ) do 
                outputChatBox("deadPlayers : " .. getPlayerName ( deadPlayers ), player, 255, 0, 255, true ) 
            end 
        end 
    end 
) 

فيه سورس سطر 5 نسيتها انت

addCommandHandler ( "info-players", 
    function ( player ) 
        if ( getAlivePlayers ( ) ) then 
            for _, alivePlayers in ipairs ( getAlivePlayers ( ) ) do 
                outputChatBox("alivePlayers : " .. getPlayerName ( alivePlayers ), player, 255, 0, 255, true ) 
            end 
        end 
        if ( getDeadPlayers ( ) ) then 
            for _, deadPlayers in ipairs ( getDeadPlayers ( ) ) do 
                outputChatBox("deadPlayers : " .. getPlayerName ( deadPlayers ), player, 255, 0, 255, true ) 
            end 
        end 
    end 
) 

لول سوري نسيت اعدلها .. لأني عدلت على كودكـ انت كنت حاط سورس ..

كفوووووووووووووووووووووووووو ضبط ولله انك بطل

.. حياكـ

#Edit:

لآهنت ابي اعرف وش الفرق بين كودي وكودك ماحس فيه فرق:D
addCommandHandler ( "info-players", 
function (source) 
    if alivePlayers and deadPlayers then 
for _,ap in ipairs (getAlivePlayers ()) do 
    outputChatBox("alivePlayers : " .. getPlayerName(ap),source,255,0,255,true) 
end 
for _,dp in ipairs (getDeadPlayers ()) do 
    outputChatBox("deadPlayers : " .. getPlayerName(dp),source,255,0,255,true) 
end 
    end 
end) 

أنت كودكـ مايجيب اللاعبين الميتين او العايشين لين يكون فيه لاعبين ميتين + عايشين

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

+

مهو معرفات deadPlayers والمتغير alivePlayers عندكـ المتغير ..

أتمنى إنكـ فهمت الفرق !

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