Jump to content

طلب كود


The-King

Recommended Posts

Posted
كيف يعني اعتقال يعني اشرح لنا كيف تبيه خطوه خطوه احنا ما نقرأ افكارك ذذ

طيب ليش بس انت تعملني كذا

ابي قبض

يعني شرطي انا ضرب واحد عليها نجوم يقبض عليها مو يروح السجن عليطول

Posted

ههه لا ما اعاملك بشكل موب زين , يعني جد تخيل واحد يجي يقولك ابي كود الشرطه تلحق الحراميه , :shock:

انت يعني كيف بتفهم وش الي بيصير وكيف ومتى -__-"

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 
) 

^ لا تحسب انه يسوي شيء هالكود :lol:

انا سويته كذا لأنك ما فهمتني كيف يقبض عليه ؟ يعني وش يسوي بالضبط ؟

Posted
ههه لا ما اعاملك بشكل موب زين , يعني جد تخيل واحد يجي يقولك ابي كود الشرطه تلحق الحراميه , :shock:

انت يعني كيف بتفهم وش الي بيصير وكيف ومتى -__-"

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 
) 

^ لا تحسب انه يسوي شيء هالكود :lol:

انا سويته كذا لأنك ما فهمتني كيف يقبض عليه ؟ يعني وش يسوي بالضبط ؟

اخي لو انا شرطي اوكي في واحد علية نجمة ابي ايش اسوي اضربة بي العصا ينقبض عليها يمشي وريا اودي ماركر يروح السجن

Posted

لم يتم التجربه

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 
) 
Posted
لم يتم التجربه

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 
) 

طيب انا لسة مجربتش الكود بس هو لما يخش في المكان ال انا احددو كيف هيخرج منو عاوزو يخرج بس تايم انا احددو

Posted

تحتاج انك تسوي داتا وتحط قيمتها اللاعب المهجوم عليه عشان بعدين تقدر تنقله

لأن الكود اساسا لازم تمر انت بالاول على الماركر وبعدين هو يمر وراك , يعني هو بيتحقق من المسافه بينكم ,

تحتاج انك تضيفها setElementPosition وانا بالاساس ما ضفت

Posted
تحتاج انك تسوي داتا وتحط قيمتها اللاعب المهجوم عليه عشان بعدين تقدر تنقله

لأن الكود اساسا لازم تمر انت بالاول على الماركر وبعدين هو يمر وراك , يعني هو بيتحقق من المسافه بينكم ,

تحتاج انك تضيفها setElementPosition وانا بالاساس ما ضفت

ممكن تحطها ؟

Posted

انت كل طلباتك اكواد جاهزه حاول تسوي شيء ,,

كلها تسوي داتا وانتهت السالفه

setElementData 
getElementData 
setElementPosition 

Posted
لم يتم التجربه

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 
) 

تم تجربة الكود بس مشكلة كبييير لما اضربة بس العصا يشمي وريا بعدين يهرب كيف ؟ يعني يقدر يطلع السلاح و يقجدر يسوي كل شيئ

Posted (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 by Guest
Posted
جرب,

-- 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 ويمشي

Posted

جرب,

-- 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 
) 
Posted
جرب,

-- 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 
) 

اخي يريت تسويلي اخر طلب بس لو ماركر دخلت فيها يوديني مكان انا احط احدثياتو

Posted (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 by Guest
Posted
جرب,

-- 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 
) 

سويت الاحدثيات ال هي ذي و دخلتو في الماركر ال فوق في الكود ال انا مسوي احدثيتا ما راح + قاعد يخرف كذا يمشي في مكان لوحدو كذا

Posted

ماراح ينقلك انت راح ينقل المخطوف فقط ! + انسخه مره ثانيه عدلت شيء بسيط , + انت تقول يمديه يلف بالماوس ! ما يقدر لأني مسوي تايمر كل شوي يعدل اتجاهه,

/debugscript 3 تأكد جرب الكود ! وافتح الديبوق وشوف وش يطلع لك

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...