s7BaT Posted May 11, 2016 Share Posted May 11, 2016 (edited) السلام عليكم عندي مشكله وهي اذا مات اللاعب وهو في العالم الوهمي 1 مثلا يرجع للعالم 0 انا ما ابيه يرجع للعالم الوهمي 0 Edited May 11, 2016 by Guest Link to comment
Me[Z]oO Posted May 11, 2016 Share Posted May 11, 2016 السلام عليكمعندي مشكله وهي اذا مات اللاعب وهو في العالم الوهمي 1 مثلا يرجع للعالم 0 انا ما ابيه يرجع للعالم الوهمي 0 setAccountData getAccountData Link to comment
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 السلام عليكمعندي مشكله وهي اذا مات اللاعب وهو في العالم الوهمي 1 مثلا يرجع للعالم 0 انا ما ابيه يرجع للعالم الوهمي 0 setAccountData getAccountData هاذي الحصول على بيانات الحساب كيف استفيد منها Link to comment
Me[Z]oO Posted May 11, 2016 Share Posted May 11, 2016 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 ) Link to comment
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 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 ) ماضبط Link to comment
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 انا مسوي شرط ما يسوي سباون الاعب الا اذا العالم الوهمي 1 Link to comment
Me[Z]oO Posted May 11, 2016 Share Posted May 11, 2016 انا مسوي شرط ما يسوي سباون الاعب الا اذا العالم الوهمي 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 ) Link to comment
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 انا مسوي شرط ما يسوي سباون الاعب الا اذا العالم الوهمي 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 ) ماضبط Link to comment
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 انت فهمت قصدي والا اطرح الكود Link to comment
Me[Z]oO Posted May 11, 2016 Share Posted May 11, 2016 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
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 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
Me[Z]oO Posted May 11, 2016 Share Posted May 11, 2016 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
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 --================================================================================================ 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
Me[Z]oO Posted May 11, 2016 Share Posted May 11, 2016 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
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 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
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 هات الاكواد قبل التعديل 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
iMr.SFA7 Posted May 11, 2016 Share Posted May 11, 2016 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
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 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
iMr.SFA7 Posted May 11, 2016 Share Posted May 11, 2016 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
s7BaT Posted May 11, 2016 Author Share Posted May 11, 2016 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
Me[Z]oO Posted May 11, 2016 Share Posted May 11, 2016 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
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