xX|KeMo|Xx Posted February 21, 2013 Share Posted February 21, 2013 اخبآأركم عسآكم بخير بدخل بالموضوع مباشره انا عامل كود لما يموت الواحد يرجع لمقر التيم حقه بس الكود يسبب لاق هذا كود 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 ) end end ) تقدر تشفون لي حل بسرعه ولي يسأل شنو المشكله المشكله الكود يسبب لاق Link to comment
xX|KeMo|Xx Posted February 21, 2013 Author Share Posted February 21, 2013 .............................................................................................. Link to comment
TAPL Posted February 21, 2013 Share Posted February 21, 2013 الكود مافيه أي شي اللاق من جهازك أو من سيرفرك Link to comment
xX|KeMo|Xx Posted February 21, 2013 Author Share Posted February 21, 2013 آلكّود لمآ يمـُـوٍتّ يسوي وآرب وتروح آلشخصيه + آلآسلحه آنآ ابيه مثل آلديث مآتش يرجع للوآرب مـُـعّ آلآسلحه وآلشخصيه مـُـوٍ يصير لـُـه وآرب لآنه يرجع بـُـسّرعه ويسبب لآق ذذِ Link to comment
TAPL Posted February 21, 2013 Share Posted February 21, 2013 حط تايمر يرجع مثلاً بعد ثانيتين + رتب كودك مره ثانية addEventHandler("onPlayerWasted", root, function () setTimer(function(source) local team = getPlayerTeam(source) if (team and getTeamName(team) == ("آسّم آلِتِيًم")) then local skinid = getElementModel(source) spawnPlayer(source, x, y, z, 0, skinid) end end, 2000, 1, source) end) Solidsnake14 و ذا كود حفظ الأسلحة لما اللاعب يموت و ترجيعها لما يصير له سباون لـ local playerWeapons = { } addEventHandler ( "onPlayerWasted", root, function ( ) if ( not playerWeapons [ source ] ) then playerWeapons [ source ] = { } end for slot = 0, 12 do local weapon = getPedWeapon ( source, slot ) if ( weapon > 0 ) then local ammo = getPedTotalAmmo ( source, slot ) if ( ammo > 0 ) then playerWeapons [ source ] [ weapon ] = ammo end end end end ) addEventHandler ( "onPlayerSpawn", root, function ( ) if ( playerWeapons [ source ] ) then for weapon, ammo in pairs ( playerWeapons [ source ] ) do giveWeapon ( source, tonumber ( weapon ), tonumber ( ammo ) ) end end playerWeapons [ source ] = nil end ) Link to comment
xX|KeMo|Xx Posted February 21, 2013 Author Share Posted February 21, 2013 حط تايمريرجع مثلاً بعد ثانيتين + رتب كودك مره ثانية addEventHandler("onPlayerWasted", root, function () setTimer(function(source) local team = getPlayerTeam(source) if (team and getTeamName(team) == ("آسّم آلِتِيًم")) then local skinid = getElementModel(source) spawnPlayer(source, x, y, z, 0, skinid) end end, 2000, 1, source) end) Solidsnake14 و ذا كود حفظ الأسلحة لما اللاعب يموت و ترجيعها لما يصير له سباون لـ local playerWeapons = { } addEventHandler ( "onPlayerWasted", root, function ( ) if ( not playerWeapons [ source ] ) then playerWeapons [ source ] = { } end for slot = 0, 12 do local weapon = getPedWeapon ( source, slot ) if ( weapon > 0 ) then local ammo = getPedTotalAmmo ( source, slot ) if ( ammo > 0 ) then playerWeapons [ source ] [ weapon ] = ammo end end end end ) addEventHandler ( "onPlayerSpawn", root, function ( ) if ( playerWeapons [ source ] ) then for weapon, ammo in pairs ( playerWeapons [ source ] ) do giveWeapon ( source, tonumber ( weapon ), tonumber ( ammo ) ) end end playerWeapons [ source ] = nil end ) شكرآأ بوفيك اذا فيه مشكله اشكرك مره ثانيه *ِذذِ Link to comment
xX|KeMo|Xx Posted February 21, 2013 Author Share Posted February 21, 2013 شكرا لك تابل الكود شغال لكن لما اموت يسوي لي وارب وانا ميت وبعدين ينتظر 5 ثوان ويعطيني شخصية + ضفت الاسلحه بنفس الكود افضل ما تقدر تحل لي المشكلةة هذي وشكرا addEventHandler("onPlayerWasted", root, function () setTimer(function(source) local team = getPlayerTeam(source) if (team and getTeamName(team) == ("Grove")) then local skinid = getElementModel(source) spawnPlayer(source, -1819.62439, -1610.32141, 23.01563, 0, skinid) giveWeapon ( source , 16, 1 ) giveWeapon ( source , 31, 200 ) giveWeapon ( source , 24, 200 ) end end, 5000, 1, source) end) Link to comment
iMr.Dawix~# Posted February 21, 2013 Share Posted February 21, 2013 شكرا لك تابل الكود شغاللكن لما اموت يسوي لي وارب وانا ميت وبعدين ينتظر 5 ثوان ويعطيني شخصية + ضفت الاسلحه بنفس الكود افضل ما تقدر تحل لي المشكلةة هذي وشكرا addEventHandler("onPlayerWasted", root, function () setTimer(function(source) local team = getPlayerTeam(source) if (team and getTeamName(team) == ("Grove")) then local skinid = getElementModel(source) spawnPlayer(source, -1819.62439, -1610.32141, 23.01563, 0, skinid) giveWeapon ( source , 16, 1 ) giveWeapon ( source , 31, 200 ) giveWeapon ( source , 24, 200 ) end end, 5000, 1, source) end) addEventHandler("onPlayerWasted", root, function () setTimer(function(source) local team = getPlayerTeam(source) if (team and getTeamName(team) == ("Grove")) then local skinid = getElementModel(source) spawnPlayer(source, -1819.62439, -1610.32141, 23.01563, 0, skinid) giveWeapon ( source , 16, 1 ) giveWeapon ( source , 31, 200 ) giveWeapon ( source , 24, 200 ) end end, 1000, 1, source)----هنا الوقت بعد الإند end) Link to comment
xX|KeMo|Xx Posted February 21, 2013 Author Share Posted February 21, 2013 ^ احلف؟ ................ Link to comment
xX|KeMo|Xx Posted February 21, 2013 Author Share Posted February 21, 2013 شكرا لك تابل الكود شغاللكن لما اموت يسوي لي وارب وانا ميت وبعدين ينتظر 5 ثوان ويعطيني شخصية + ضفت الاسلحه بنفس الكود افضل ما تقدر تحل لي المشكلةة هذي وشكرا addEventHandler("onPlayerWasted", root, function () setTimer(function(source) local team = getPlayerTeam(source) if (team and getTeamName(team) == ("Grove")) then local skinid = getElementModel(source) spawnPlayer(source, -1819.62439, -1610.32141, 23.01563, 0, skinid) giveWeapon ( source , 16, 1 ) giveWeapon ( source , 31, 200 ) giveWeapon ( source , 24, 200 ) end end, 5000, 1, source) end) addEventHandler("onPlayerWasted", root, function () setTimer(function(source) local team = getPlayerTeam(source) if (team and getTeamName(team) == ("Grove")) then local skinid = getElementModel(source) spawnPlayer(source, -1819.62439, -1610.32141, 23.01563, 0, skinid) giveWeapon ( source , 16, 1 ) giveWeapon ( source , 31, 200 ) giveWeapon ( source , 24, 200 ) end end, 1000, 1, source)----هنا الوقت بعد الإند end) وش قصدك ممكن توضح؟ هذي قصتي Link to comment
iPrestege Posted February 21, 2013 Share Posted February 21, 2013 كود تابل شغال صحيح ~ Link to comment
xX|KeMo|Xx Posted February 21, 2013 Author Share Posted February 21, 2013 كود تابل شغال صحيح ~ ايه صح بس نسيت كود معه وخلبط كل شيء ع العموم مشكورين شبآأب Link to comment
iPrestege Posted February 21, 2013 Share Posted February 21, 2013 No Problem And Big Thanks To TAPL . 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