The-King Posted January 13, 2014 Share Posted January 13, 2014 طلب كود اعتقال يعني قبض و ابيها يكون ما في لاق Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 كيف يعني اعتقال يعني اشرح لنا كيف تبيه خطوه خطوه احنا ما نقرأ افكارك ذذ Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 كيف يعني اعتقال يعني اشرح لنا كيف تبيه خطوه خطوه احنا ما نقرأ افكارك ذذ طيب ليش بس انت تعملني كذا ابي قبض يعني شرطي انا ضرب واحد عليها نجوم يقبض عليها مو يروح السجن عليطول Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 ههه لا ما اعاملك بشكل موب زين , يعني جد تخيل واحد يجي يقولك ابي كود الشرطه تلحق الحراميه , انت يعني كيف بتفهم وش الي بيصير وكيف ومتى -__-" addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then -- ... كودك end end end ) ^ لا تحسب انه يسوي شيء هالكود انا سويته كذا لأنك ما فهمتني كيف يقبض عليه ؟ يعني وش يسوي بالضبط ؟ Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 ههه لا ما اعاملك بشكل موب زين , يعني جد تخيل واحد يجي يقولك ابي كود الشرطه تلحق الحراميه , انت يعني كيف بتفهم وش الي بيصير وكيف ومتى -__-" addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then -- ... كودك end end end ) ^ لا تحسب انه يسوي شيء هالكود انا سويته كذا لأنك ما فهمتني كيف يقبض عليه ؟ يعني وش يسوي بالضبط ؟ اخي لو انا شرطي اوكي في واحد علية نجمة ابي ايش اسوي اضربة بي العصا ينقبض عليها يمشي وريا اودي ماركر يروح السجن Link to comment
al-Kobra Posted January 14, 2014 Share Posted January 14, 2014 #Event 'onPlayerDamage' getElementType setControlState toggleAllControls getDistanceBetweenPoints3D #Event 'onMarkerHit' createMarker setElementPosition اتوقع في بعد Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 لم يتم التجربه local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleAllControls(source,false,true,false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) setControlState(source,'forwards',true) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end ) Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 لم يتم التجربه local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleAllControls(source,false,true,false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) setControlState(source,'forwards',true) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end ) طيب انا لسة مجربتش الكود بس هو لما يخش في المكان ال انا احددو كيف هيخرج منو عاوزو يخرج بس تايم انا احددو Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 تحتاج انك تسوي داتا وتحط قيمتها اللاعب المهجوم عليه عشان بعدين تقدر تنقله لأن الكود اساسا لازم تمر انت بالاول على الماركر وبعدين هو يمر وراك , يعني هو بيتحقق من المسافه بينكم , تحتاج انك تضيفها setElementPosition وانا بالاساس ما ضفت Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 تحتاج انك تسوي داتا وتحط قيمتها اللاعب المهجوم عليه عشان بعدين تقدر تنقلهلأن الكود اساسا لازم تمر انت بالاول على الماركر وبعدين هو يمر وراك , يعني هو بيتحقق من المسافه بينكم , تحتاج انك تضيفها setElementPosition وانا بالاساس ما ضفت ممكن تحطها ؟ Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 انت كل طلباتك اكواد جاهزه حاول تسوي شيء ,, كلها تسوي داتا وانتهت السالفه setElementData getElementData setElementPosition Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 لم يتم التجربه local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleAllControls(source,false,true,false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) setControlState(source,'forwards',true) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end ) تم تجربة الكود بس مشكلة كبييير لما اضربة بس العصا يشمي وريا بعدين يهرب كيف ؟ يعني يقدر يطلع السلاح و يقجدر يسوي كل شيئ Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 (edited) جرب, -- Server Side # local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end toggleAllControls(source,false,false,false) toggleControl(source,'forwards',true) setControlState(source,'forwards',true) Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleControl(source,'forwards',false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end ) Edited January 14, 2014 by Guest Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 جرب, -- Server Side # local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end toggleAllControls(source,false,true,false) toggleControl(source,'forwards',true) setControlState(source,'forwards',true) Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleControl(source,'forwards',false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end ) تمام بس يقدر يدوس W ويمشي Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 انسخه مره ثانيه , وما يحتاج تسوي اقتباس مافي رد بعدي ذذ Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 يقدر يحرك الموس و يمشي في المكان ال يبيها Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 جرب, -- Server Side # local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end toggleAllControls(source,false,false,false) toggleControl(source,'forwards',true) setControlState(source,'forwards',true) Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleControl(source,'forwards',false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end ) Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 جرب, -- Server Side # local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end toggleAllControls(source,false,false,false) toggleControl(source,'forwards',true) setControlState(source,'forwards',true) Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleControl(source,'forwards',false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' then toggleAllControls(plr,true,true,true) end end ) اخي يريت تسويلي اخر طلب بس لو ماركر دخلت فيها يوديني مكان انا احط احدثياتو Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 (edited) جرب, -- Server Side # local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end if not getElementData(source,'getPlayerFromData') then setElementData(source,'getPlayerFromData',source) end toggleAllControls(source,false,true,false) toggleControl(source,'forwards',true) setControlState(source,'forwards',true) Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleControl(source,'forwards',false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' and getElementData(plr,'getPlayerFromData') then toggleAllControls(getElementData(plr,'getPlayerFromData'),true,true,true) setElementPosition(getElementData(plr,'getPlayerFromData'),x,y,z) end end ) Edited January 14, 2014 by Guest Link to comment
The-King Posted January 14, 2014 Author Share Posted January 14, 2014 جرب, -- Server Side # local Timer = {} local marker = createMarker(...) addEventHandler('onPlayerDamage',root,function(attacker) if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == 'Police' then if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= 'Police' then if isTimer(Timer[source]) then killTimer(Timer[source]) Timer[source] = nil end if not getElementData(source,'getPlayerFromData') then setElementData(source,'getPlayerFromData',source) end toggleAllControls(source,false,false,false) toggleControl(source,'forwards',true) setControlState(source,'forwards',true) Timer[source] = setTimer(function() local rx,ry,rz,ax,ay,az,px,py,pz = getElementRotation(attacker),getElementPosition(attacker),getElementPosition(source) setElementRotation(source,rx,ry,rz) if getDistanceBetweenPoints3D(ax,ay,az,px,py,pz) <= 5 then toggleControl(source,'forwards',false) else toggleControl(source,'forwards',true) setControlState(source,'forwards',true) end end,50,0,source) end end end ) addEventHandler('onMarkerHit',marker,function(plr) if getElementType(plr) == 'player' and getElementData(plr,'getPlayerFromData') then toggleAllControls(getElementData(plr,'getPlayerFromData'),true,true,true) setElementPosition(getElementData(plr,'getPlayerFromData')[size=150],x,y,z)[/size] end end ) سويت الاحدثيات ال هي ذي و دخلتو في الماركر ال فوق في الكود ال انا مسوي احدثيتا ما راح + قاعد يخرف كذا يمشي في مكان لوحدو كذا Link to comment
فاّرس Posted January 14, 2014 Share Posted January 14, 2014 ماراح ينقلك انت راح ينقل المخطوف فقط ! + انسخه مره ثانيه عدلت شيء بسيط , + انت تقول يمديه يلف بالماوس ! ما يقدر لأني مسوي تايمر كل شوي يعدل اتجاهه, /debugscript 3 تأكد جرب الكود ! وافتح الديبوق وشوف وش يطلع لك Link to comment
Recommended Posts