Jump to content

طلب كود


The-King

Recommended Posts

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

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

ابي قبض

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

Link to comment

ههه لا ما اعاملك بشكل موب زين , يعني جد تخيل واحد يجي يقولك ابي كود الشرطه تلحق الحراميه , :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:

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

Link to comment
ههه لا ما اعاملك بشكل موب زين , يعني جد تخيل واحد يجي يقولك ابي كود الشرطه تلحق الحراميه , :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:

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

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

Link to comment

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

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

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

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

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

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

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

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

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

ممكن تحطها ؟

Link to comment
لم يتم التجربه

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

جرب,

-- 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
Link to comment
جرب,

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

جرب,

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

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

جرب,

-- 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
Link to comment
جرب,

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

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

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

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

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