Jump to content

تمت الافاده من قبل SFA7


Recommended Posts

السلام عليكم

عندي مشكله وهي اذا مات اللاعب وهو في العالم الوهمي 1 مثلا

يرجع للعالم 0

انا ما ابيه يرجع للعالم الوهمي 0

Edited by Guest
Link to comment
السلام عليكم

عندي مشكله وهي اذا مات اللاعب وهو في العالم الوهمي 1 مثلا

يرجع للعالم 0

انا ما ابيه يرجع للعالم الوهمي 0

setAccountData 
getAccountData 

Link to comment
السلام عليكم

عندي مشكله وهي اذا مات اللاعب وهو في العالم الوهمي 1 مثلا

يرجع للعالم 0

انا ما ابيه يرجع للعالم الوهمي 0

setAccountData 
getAccountData 

هاذي الحصول على بيانات الحساب كيف استفيد منها

Link to comment
addEventHandler('onPlayerWasted',root,  
function() 
    local vAcc = getPlayerAccount(source)  
        if not vAcc or isGuestAccount(vAcc) then return end 
            setAccountData(vAcc,'Mezo',( getElementDimension ( source ) )  
    end  
) 
  
addEventHandler('onPlayerSpawn',root,  
function(_,acc)  
    local v_Data = getAccountData(acc,'Mezo')  
        if ( v_Data ) then 
            setElementDimension ( source, vData ) 
        end 
    end  
)  

:cry::cry:

Link to comment
addEventHandler('onPlayerWasted',root,  
function() 
    local vAcc = getPlayerAccount(source)  
        if not vAcc or isGuestAccount(vAcc) then return end 
            setAccountData(vAcc,'Mezo',( getElementDimension ( source ) )  
    end  
) 
  
addEventHandler('onPlayerSpawn',root,  
function(_,acc)  
    local v_Data = getAccountData(acc,'Mezo')  
        if ( v_Data ) then 
            setElementDimension ( source, vData ) 
        end 
    end  
)  

:cry::cry:

ماضبط

Link to comment
انا مسوي شرط ما يسوي سباون الاعب الا اذا العالم الوهمي 1
  
  
addEventHandler('onPlayerWasted',root, 
function() 
    local vAcc = getPlayerAccount(source) 
        if not vAcc or isGuestAccount(vAcc) then return end 
            setAccountData(vAcc,'Mezo',( getElementDimension ( source ) ) 
    end 
) 
  
addEventHandler('onPlayerSpawn',root, 
function() 
    local acc = getAccountName ( getPlayerAccount ( source ) ) 
    local v_Data = getAccountData(acc,'Mezo') 
        if v_Data and getElementDimension ( source ) == 1  then 
            setElementDimension ( source, vData ) 
        end 
    end 
) 

:cry::cry:

Link to comment
انا مسوي شرط ما يسوي سباون الاعب الا اذا العالم الوهمي 1
  
  
addEventHandler('onPlayerWasted',root, 
function() 
    local vAcc = getPlayerAccount(source) 
        if not vAcc or isGuestAccount(vAcc) then return end 
            setAccountData(vAcc,'Mezo',( getElementDimension ( source ) ) 
    end 
) 
  
addEventHandler('onPlayerSpawn',root, 
function() 
    local acc = getAccountName ( getPlayerAccount ( source ) ) 
    local v_Data = getAccountData(acc,'Mezo') 
        if v_Data and getElementDimension ( source ) == 1  then 
            setElementDimension ( source, vData ) 
        end 
    end 
) 

:cry::cry:

ماضبط

Link to comment
  
  
addEventHandler('onPlayerWasted',root, 
function() 
if getElementDimension(source) == 1 then 
setElementData(source,"Mezo",true) 
end 
end 
) 
  
addEventHandler('onPlayerSpawn',root, 
function() 
if getElementData(source,"Mezo") then 
setElementDimension(source,1) 
end 
end 
) 
  

Link to comment
  
  
addEventHandler('onPlayerWasted',root, 
function() 
if getElementDimension(source) == 1 then 
setElementData(source,"Mezo",true) 
end 
end 
) 
  
addEventHandler('onPlayerSpawn',root, 
function() 
if getElementData(source,"Mezo") then 
setElementDimension(source,1) 
end 
end 
) 
  

انت حاط حدث اذا الاعب سوى سباون انا مسوي شرط قبل ما يسوي الاعب سباون يتحقق اذا الاعب في اعالم الوهمي 1 يسوي سباون

Link to comment
  
addEventHandler('onPlayerWasted',root, 
function() 
if getElementDimension(source) == 1 then 
setElementData(source,"Mezo",true) 
end 
end 
) 
  
addEventHandler('onPlayerSpawn',root, 
function() 
if getElementData(source,"Mezo") then 
setElementDimension(source,1) 
end 
end 
) 

احذف كودك وحط ذا بداله انا مسويه ! :|

Link to comment

--================================================================================================

function spawn() 
    if getElementData(source,"Mezo") then 
        setElementDimension(source,1) 
     
    if ( getElementDimension ( source ) == 1 ) then  
        TeamName = getTeamName ( getPlayerTeam ( source ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        ---===================================================================================== 
        if (TeamName) == "Blue" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
    end 
end end 
--=============================================================================================== 
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
        setElementData(source,"Mezo",true) 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 

كودي بعد ما ضفت كودك ماتغير شي

Link to comment
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
        setElementData(source,"Mezo",true) 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 
  
function spawn() 
        TeamName = getTeamName ( getPlayerTeam ( source ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        if (TeamName) == "Blue" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
    end 
  
addEventHandler('onPlayerSpawn',root, 
function() 
if getElementData(source,"Mezo") then 
setElementDimension(source,1) 
end 
end 
) 

Link to comment
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
        setElementData(source,"Mezo",true) 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 
  
function spawn() 
        TeamName = getTeamName ( getPlayerTeam ( source ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        if (TeamName) == "Blue" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
    end 
  
addEventHandler('onPlayerSpawn',root, 
function() 
if getElementData(source,"Mezo") then 
setElementDimension(source,1) 
end 
end 
) 

والله تعبتك معي وما ضبط

Link to comment
هات الاكواد قبل التعديل
addEventHandler ( "onResourceStart", resourceRoot, 
    function() 
        teams = { 
            createTeam ( "Red", 255, 0, 0 ), 
            createTeam ( "Blue", 0, 0, 255 ), 
        } 
  
        for c, v in ipairs ( teams ) do 
            setElementDimension ( v, 1 ) 
        end 
    end 
) 
--============================================================================================= 
function setDimension ()     
    setElementDimension ( source, 1 ) 
end 
addEvent( "setDimension", true ) 
addEventHandler( "setDimension", root, setDimension ) 
--============================================================================================= 
function SelectTeam ( PlayerTeam )   
    if ( getElementDimension ( source ) == 1 ) then  
        local TheTeam = getTeamFromName(PlayerTeam) 
        setPlayerTeam(source, TheTeam) 
        spawn() 
        setElementDimension ( source, 1 ) 
    end 
end 
addEvent( "SelectTeam", true ) 
addEventHandler( "SelectTeam", root, SelectTeam ) 
  
  
--================================================================================================ 
function spawn() 
    if ( getElementDimension ( source ) == 1 ) then  
        TeamName = getTeamName ( getPlayerTeam ( source ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        ---===================================================================================== 
        if (TeamName) == "Blue" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        else 
        outputChatBox("خطأ") 
    end 
end 
--=============================================================================================== 
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 

ملف سيرفر كله

Link to comment
addEventHandler ( "onResourceStart", resourceRoot, function() 
    createTeam ( "Red", 255, 0, 0 ) 
    createTeam ( "Blue", 0, 0, 255 ) 
end) 
--============================================================================================= 
function setDimension ()    
    setElementDimension ( source, 1 ) 
end 
addEvent( "setDimension", true ) 
addEventHandler( "setDimension", root, setDimension ) 
--============================================================================================= 
function SelectTeam ( PlayerTeam )  
    if ( getElementDimension ( source ) == 1 ) then 
        local TheTeam = getTeamFromName(PlayerTeam) 
        setPlayerTeam(source, TheTeam) 
        spawn(source) 
        setElementDimension ( source, 1 ) 
    end 
end 
addEvent( "SelectTeam", true ) 
addEventHandler( "SelectTeam", root, SelectTeam ) 
  
  
--================================================================================================ 
function spawn(player) 
    if ( getElementDimension ( player ) == 1 and getPlayerTeam ( player ) ) then 
        TeamName = getTeamName ( getPlayerTeam ( player ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(player,true) 
            setCameraTarget(player,player) 
            spawnPlayer (player, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        ---===================================================================================== 
        if (TeamName) == "Blue" then 
            fadeCamera(player,true) 
            setCameraTarget(player,player) 
            spawnPlayer (player, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        else 
        outputChatBox("خطأ", player) 
    end 
end 
--=============================================================================================== 
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 

!هذا ايش يسوي؟ لأنه لو أرسبن لاعب الحدث بيصير لكل اللاعبين closee الحدث

Link to comment
addEventHandler ( "onResourceStart", resourceRoot, function() 
    createTeam ( "Red", 255, 0, 0 ) 
    createTeam ( "Blue", 0, 0, 255 ) 
end) 
--============================================================================================= 
function setDimension ()    
    setElementDimension ( source, 1 ) 
end 
addEvent( "setDimension", true ) 
addEventHandler( "setDimension", root, setDimension ) 
--============================================================================================= 
function SelectTeam ( PlayerTeam )  
    if ( getElementDimension ( source ) == 1 ) then 
        local TheTeam = getTeamFromName(PlayerTeam) 
        setPlayerTeam(source, TheTeam) 
        spawn(source) 
        setElementDimension ( source, 1 ) 
    end 
end 
addEvent( "SelectTeam", true ) 
addEventHandler( "SelectTeam", root, SelectTeam ) 
  
  
--================================================================================================ 
function spawn(player) 
    if ( getElementDimension ( player ) == 1 and getPlayerTeam ( player ) ) then 
        TeamName = getTeamName ( getPlayerTeam ( player ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(player,true) 
            setCameraTarget(player,player) 
            spawnPlayer (player, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        ---===================================================================================== 
        if (TeamName) == "Blue" then 
            fadeCamera(player,true) 
            setCameraTarget(player,player) 
            spawnPlayer (player, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        else 
        outputChatBox("خطأ", player) 
    end 
end 
--=============================================================================================== 
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 

!هذا ايش يسوي؟ لأنه لو أرسبن لاعب الحدث بيصير لكل اللاعبين closee الحدث

هذا عشان يشيل الزر الي ضغط عليه الاعب عشن يسوي سباون بعد ما اختار الفريق

Link to comment
addEventHandler ( "onResourceStart", resourceRoot, function() 
    createTeam ( "Red", 255, 0, 0 ) 
    createTeam ( "Blue", 0, 0, 255 ) 
end) 
--============================================================================================= 
function setDimension ()   
    setElementDimension ( source, 1 ) 
end 
addEvent( "setDimension", true ) 
addEventHandler( "setDimension", root, setDimension ) 
--============================================================================================= 
function SelectTeam ( PlayerTeam ) 
    if ( getElementDimension ( source ) == 1 ) then 
        local TheTeam = getTeamFromName(PlayerTeam) 
        setPlayerTeam(source, TheTeam) 
        spawn(source) 
        setElementDimension ( source, 1 ) 
    end 
end 
addEvent( "SelectTeam", true ) 
addEventHandler( "SelectTeam", root, SelectTeam ) 
  
  
--================================================================================================ 
function spawn(player) 
    if ( getElementDimension ( player ) == 1 and getPlayerTeam ( player ) ) then 
        TeamName = getTeamName ( getPlayerTeam ( player ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(player,true) 
            setCameraTarget(player,player) 
            spawnPlayer (player, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ( player, "closee", player ) 
        end 
        ---===================================================================================== 
        if (TeamName) == "Blue" then 
            fadeCamera(player,true) 
            setCameraTarget(player,player) 
            spawnPlayer (player, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ( player, "closee", player ) 
        end 
        else 
        outputChatBox("خطأ", player) 
    end 
end 
--=============================================================================================== 
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 

Link to comment
addEventHandler ( "onResourceStart", resourceRoot, function() 
    createTeam ( "Red", 255, 0, 0 ) 
    createTeam ( "Blue", 0, 0, 255 ) 
end) 
--============================================================================================= 
function setDimension ()   
    setElementDimension ( source, 1 ) 
end 
addEvent( "setDimension", true ) 
addEventHandler( "setDimension", root, setDimension ) 
--============================================================================================= 
function SelectTeam ( PlayerTeam ) 
    if ( getElementDimension ( source ) == 1 ) then 
        local TheTeam = getTeamFromName(PlayerTeam) 
        setPlayerTeam(source, TheTeam) 
        spawn(source) 
        setElementDimension ( source, 1 ) 
    end 
end 
addEvent( "SelectTeam", true ) 
addEventHandler( "SelectTeam", root, SelectTeam ) 
  
  
--================================================================================================ 
function spawn(player) 
    if ( getElementDimension ( player ) == 1 and getPlayerTeam ( player ) ) then 
        TeamName = getTeamName ( getPlayerTeam ( player ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(player,true) 
            setCameraTarget(player,player) 
            spawnPlayer (player, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ( player, "closee", player ) 
        end 
        ---===================================================================================== 
        if (TeamName) == "Blue" then 
            fadeCamera(player,true) 
            setCameraTarget(player,player) 
            spawnPlayer (player, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ( player, "closee", player ) 
        end 
        else 
        outputChatBox("خطأ", player) 
    end 
end 
--=============================================================================================== 
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 

اتحداااك يكبير انت يكبير ضبط شكرا

Link to comment
addEventHandler ( "onResourceStart", resourceRoot, 
    function() 
        teams = { 
            createTeam ( "Red", 255, 0, 0 ), 
            createTeam ( "Blue", 0, 0, 255 ), 
        } 
  
        for c, v in ipairs ( teams ) do 
            setElementDimension ( v, 1 ) 
        end 
    end 
) 
  
--============================================================================================= 
function SelectTeam ( PlayerTeam )  
    if ( getElementDimension ( source ) == 1 ) then 
        local TheTeam = getTeamFromName(PlayerTeam) 
        setPlayerTeam(source, TheTeam) 
        spawn() 
        setElementDimension ( source, 1 ) 
    end 
end 
addEvent( "SelectTeam", true ) 
addEventHandler( "SelectTeam", root, SelectTeam ) 
  
  
--================================================================================================ 
function spawn() 
    if ( getElementDimension ( source ) == 1 ) then 
        TeamName = getTeamName ( getPlayerTeam ( source ) ) 
        if (TeamName) == "Red" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2462.13135, -1713.80273, 13.51884, math.random (0,288), 46, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        ---===================================================================================== 
        if (TeamName) == "Blue" then 
            fadeCamera(source,true) 
            setCameraTarget(source,source) 
            spawnPlayer (source, 2514.08179 ,-1663.66248 ,13.59749, math.random (0,288), 45, 0,1) 
            triggerClientEvent ("closee", root ) 
        end 
        else 
        outputChatBox("خطأ") 
    end 
end 
--=============================================================================================== 
function player_Wasted() 
    if ( getElementDimension ( source ) == 1 ) then 
    setElementData(source,"Mezo",true) 
        setTimer(spawn, 1800, 1, source) 
    end 
end 
addEventHandler ( "onPlayerWasted", root, player_Wasted ) 
  
addEventHandler('onPlayerSpawn',root, 
function() 
if getElementData(source,"Mezo") then 
setElementDimension(source,1) 
end 
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...