Jump to content

مطلوب كود


charaf12

Recommended Posts

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

)

الحقوق : The Best

Link to comment
الكود غير شغال ارجو الافادة
    local Timer = {} -- الوقت 
local marker = createMarker ( الاحداثيات, 1.0, "ring", 1, 255, 255, 0, 0 ); 
      
    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 
    ) 

Link to comment
الكود غير شغال ارجو الافادة

    local Timer = {} -- الوقت 
local marker = createMarker ( الاحداثيات, 1.0, "ring", 1, 255, 255, 0, 0 ); 
      
    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 

1.0 الا في بداية فنكشن الماركر من وين جايبها ؟ :evil:

Link to comment
اوك متاسف كتير

لاهنتو اشرح لي الكود

الحين انت وش طالب تو ؟

مو تقول عطوني مود الاعتقال ؟

الحين تقول اشرحوهه لي؟

ههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههههآ

حشيش فآخر قدن قدن ض2

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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