xRaMx Posted February 26, 2014 Share Posted February 26, 2014 ابي اعرف لو كودي ذا صح قبل اجربه اذا هو بتيم معين , وقتل اي حد يروح مقتول مكان معين local team1 = createTeam( "team1", 0, 255, 0 ) addEvent( "SetPTeam", true ) addEventHandler( "SetPTeam", root, function( ) setPlayerTeam( client, team1 ) giveWeapon( client, 31, 500 ) outputChatBox("You Now Take Job Killer", client) end ) addEventHandler ( "onPlayerWasted", root, function( attacker ) if getPlayerTeam( source ) == getTeamFromName( "team1" )then local x, y, z = 10, 15, 2 --change or remove if defined somewhere else spawnPlayer( source, x, y, z, 0, getElementModel(source)) end end ) Link to comment
فاّرس Posted February 26, 2014 Share Posted February 26, 2014 سطر14 استبدله بهذا if getPlayerTeam( source ) and getPlayerTeam( source ) == getTeamFromName( "team1" ) then راح تواجه مشكله مع السباون فالافضل تستخدم التايمر play لو كنت مشغل Link to comment
xRaMx Posted February 26, 2014 Author Share Posted February 26, 2014 سطر14 استبدله بهذا if getPlayerTeam( source ) and getPlayerTeam( source ) == getTeamFromName( "team1" ) then راح تواجه مشكله مع السباون فالافضل تستخدم التايمر play لو كنت مشغل باقي صحيح ؟؟ + وهل ممكن تسوي لي تايمر ومشكور واتمنى تشرح الي سويته عشان استفيد Link to comment
PaiN^ Posted February 26, 2014 Share Posted February 26, 2014 الكود صحيح . و بالنسبة للتايمر, يمديك تتجنبه وامسحه وراح يضبط onPlayerWasted و دور على الحدث Play روح لمود Link to comment
فاّرس Posted February 26, 2014 Share Posted February 26, 2014 ^ team1 نفترض ان اللاعب ماهو في التيم ما راح يسوي سباون ! Link to comment
xRaMx Posted February 26, 2014 Author Share Posted February 26, 2014 بس للحين ما فهمت ليش اوقف play -- +1 هل اكواد باقيه صحيحه ام هريسس ؟ Link to comment
PaiN^ Posted February 26, 2014 Share Posted February 26, 2014 عشان فيه حدث راح يتعارض مع الحدث اللي في مودك Play راح توقف وباقي اكوادك صحيح Link to comment
GtaSa-Dz Posted February 26, 2014 Share Posted February 26, 2014 اسف على تدخل موضوع لكن ليش تايمر يا ذي بيست ما زال هو بيقفل Play Link to comment
فاّرس Posted February 26, 2014 Share Posted February 26, 2014 (edited) ما يحتاج تايمر play اذا مو مستخدم صاحب الموضوع انت تقصد بو قتلت احد وانت في تيم معين يسوي سباون للمقتول صح؟ -- Server Side # local team1 = createTeam( "team1", 0, 255, 0 ) addEvent( "SetPTeam", true ) addEventHandler( "SetPTeam", root, function( ) setPlayerTeam( client, team1 ) giveWeapon( client, 31, 500 ) outputChatBox("You Now Take Job Killer", client) end ) addEventHandler ( "onPlayerWasted", root, function( attacker ) if attacker and attacker ~= source and getElementType(attacker) == 'plaer' then if getPlayerTeam( attacker ) and getPlayerTeam( attacker ) == getTeamFromName( "team1" ) then local x, y, z = 10, 15, 2 -- احداثيات السباون اذا كان في التيم spawnPlayer( source, x, y, z, 0, getElementModel(source)) end end end ) Edited February 26, 2014 by Guest Link to comment
Recommended Posts