Jump to content

تعديل الاسلحة


Recommended Posts

السلام عليكم

كيفكم شباب

يعطيكم العافية ياليت تشوفو حل للكود ذا ماقدر اسجن المجرم غير بالعصاء ,تعبت وانا الاحق بالعصا ذذ

ابيها اقدر اسجن بكل الاسلحه واكون شاكرررررررررر لك

Timer = { } 
local jaja = { 
              {3471.8334960938, -893.76837158203, 11.62656211853}, 
              {3494.4184570313, -894.68341064453, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
  
} 
  
Times = { 
    [6] = 360000, 
    [5] = 300000, 
    [4] = 240000, 
    [3] = 180000, 
    [2] = 180000, 
    [1] = 180000, 
} 
  
function jailPlayer(plr, time) 
    if isTimer(Timer[plr]) then killTimer(Timer[plr]) end 
    setElementPosition(plr, unpack(jaja[math.random( #jaja )])) 
    Timer[plr] = setTimer(function(plr) 
        setElementPosition(plr , 1572.9000244141, -1635.4000244141, 13.60000038147) 
    end, time, 1, plr) 
    triggerClientEvent(plr, "unJail", plr, time) 
    setPlayerWantedLevel(plr, 0) 
end 
addEventHandler('onPlayerDamage',root,function(attacker,weapon) 
    if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == '[sWAT]' then 
        if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= '[sWAT]' then 
            if ( weapon == 3 ) then 
                if Times[getPlayerWantedLevel(source)] then 
                    jailPlayer(source, Times[getPlayerWantedLevel(source)]) 
                end 
            end 
        end 
    end 
end ) 
  
addEventHandler("onPlayerLogin", root, function(_, account) 
    local jailT = getAccountData(account, "JailTime") 
    if jailT then 
        jailPlayer(source, jailT) 
        setAccountData(account, "JailTime", false) 
    end 
end) 
  
addEventHandler("onPlayerQuit", root, function( ) 
    if isTimer(Timer[source]) then 
        local account = getPlayerAccount(source) 
        if account and not isGuestAccount(account) then 
            local remaining = getTimerDetails(Timer[source]) 
            setAccountData(account, "JailTime", remaining) 
        end 
        killTimer(Timer[source]) 
        Timer[source] = nil 
    end 
end) 

Link to comment
سطر 31 غير أيدي السلاح للي تبيه ذذ

أو سوي جدول وحط فيه آيديات الآسلحة الي تبيها ذذ

اي ماقدر اسجن غير بالعصاء او سلاح واحد

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

Link to comment

Timer = { } 
local jaja = { 
              {3471.8334960938, -893.76837158203, 11.62656211853}, 
              {3494.4184570313, -894.68341064453, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
  
} 
  
Times = { 
    [6] = 360000, 
    [5] = 300000, 
    [4] = 240000, 
    [3] = 180000, 
    [2] = 180000, 
    [1] = 180000, 
} 
  
function jailPlayer(plr, time) 
    if isTimer(Timer[plr]) then killTimer(Timer[plr]) end 
    setElementPosition(plr, unpack(jaja[math.random( #jaja )])) 
    Timer[plr] = setTimer(function(plr) 
        setElementPosition(plr , 1572.9000244141, -1635.4000244141, 13.60000038147) 
    end, time, 1, plr) 
    triggerClientEvent(plr, "unJail", plr, time) 
    setPlayerWantedLevel(plr, 0) 
end 
addEventHandler('onPlayerDamage',root,function(attacker,weapon) 
    if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == '[sWAT]' then 
        if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= '[sWAT]' then 
                if Times[getPlayerWantedLevel(source)] then 
                    jailPlayer(source, Times[getPlayerWantedLevel(source)]) 
                        end 
                 end 
           end 
    end  
 ) 
  
addEventHandler("onPlayerLogin", root, function(_, account) 
    local jailT = getAccountData(account, "JailTime") 
    if jailT then 
        jailPlayer(source, jailT) 
        setAccountData(account, "JailTime", false) 
    end 
end) 
  
addEventHandler("onPlayerQuit", root, function( ) 
    if isTimer(Timer[source]) then 
        local account = getPlayerAccount(source) 
        if account and not isGuestAccount(account) then 
            local remaining = getTimerDetails(Timer[source]) 
            setAccountData(account, "JailTime", remaining) 
        end 
        killTimer(Timer[source]) 
        Timer[source] = nil 
    end 
end) 
Link to comment
Timer = { } 
local jaja = { 
              {3471.8334960938, -893.76837158203, 11.62656211853}, 
              {3494.4184570313, -894.68341064453, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
  
} 
  
Times = { 
    [6] = 360000, 
    [5] = 300000, 
    [4] = 240000, 
    [3] = 180000, 
    [2] = 180000, 
    [1] = 180000, 
} 
  
function jailPlayer(plr, time) 
    if isTimer(Timer[plr]) then killTimer(Timer[plr]) end 
    setElementPosition(plr, unpack(jaja[math.random( #jaja )])) 
    Timer[plr] = setTimer(function(plr) 
        setElementPosition(plr , 1572.9000244141, -1635.4000244141, 13.60000038147) 
    end, time, 1, plr) 
    triggerClientEvent(plr, "unJail", plr, time) 
    setPlayerWantedLevel(plr, 0) 
end 
addEventHandler('onPlayerDamage',root,function(attacker,weapon) 
    if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == '[sWAT]' then 
        if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= '[sWAT]' then 
                if Times[getPlayerWantedLevel(source)] then 
                    jailPlayer(source, Times[getPlayerWantedLevel(source)]) 
                        end 
                 end 
           end 
    end  
 ) 
  
addEventHandler("onPlayerLogin", root, function(_, account) 
    local jailT = getAccountData(account, "JailTime") 
    if jailT then 
        jailPlayer(source, jailT) 
        setAccountData(account, "JailTime", false) 
    end 
end) 
  
addEventHandler("onPlayerQuit", root, function( ) 
    if isTimer(Timer[source]) then 
        local account = getPlayerAccount(source) 
        if account and not isGuestAccount(account) then 
            local remaining = getTimerDetails(Timer[source]) 
            setAccountData(account, "JailTime", remaining) 
        end 
        killTimer(Timer[source]) 
        Timer[source] = nil 
    end 
end) 

بجرب وقولك [kING] كفو والله ي

Link to comment

Timer = { } 
local jaja = { 
              {3471.8334960938, -893.76837158203, 11.62656211853}, 
              {3494.4184570313, -894.68341064453, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
  
} 
  
Times = { 
    [6] = 360000, 
    [5] = 300000, 
    [4] = 240000, 
    [3] = 180000, 
    [2] = 180000, 
    [1] = 180000, 
} 
  
function jailPlayer(plr, time) 
    if isTimer(Timer[plr]) then killTimer(Timer[plr]) end 
    setElementPosition(plr, unpack(jaja[math.random( #jaja )])) 
    Timer[plr] = setTimer(function(plr) 
        setElementPosition(plr , 1572.9000244141, -1635.4000244141, 13.60000038147) 
    end, time, 1, plr) 
    triggerClientEvent(plr, "unJail", plr, time) 
    setPlayerWantedLevel(plr, 0) 
end 
addEventHandler('onPlayerWasted',root,function(_,attacker) 
    if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == '[sWAT]' then 
        if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= '[sWAT]' then 
                if Times[getPlayerWantedLevel(source)] then 
                    jailPlayer(source, Times[getPlayerWantedLevel(source)]) 
                        end 
                 end 
           end 
    end 
 ) 
  
addEventHandler("onPlayerLogin", root, function(_, account) 
    local jailT = getAccountData(account, "JailTime") 
    if jailT then 
        jailPlayer(source, jailT) 
        setAccountData(account, "JailTime", false) 
    end 
end) 
  
addEventHandler("onPlayerQuit", root, function( ) 
    if isTimer(Timer[source]) then 
        local account = getPlayerAccount(source) 
        if account and not isGuestAccount(account) then 
            local remaining = getTimerDetails(Timer[source]) 
            setAccountData(account, "JailTime", remaining) 
        end 
        killTimer(Timer[source]) 
        Timer[source] = nil 
    end 
end 
) 
Link to comment

Timer = { } 
local jaja = { 
              {3471.8334960938, -893.76837158203, 11.62656211853}, 
              {3494.4184570313, -894.68341064453, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
  
} 
  
Times = { 
    [6] = 360000, 
    [5] = 300000, 
    [4] = 240000, 
    [3] = 180000, 
    [2] = 180000, 
    [1] = 180000, 
} 
  
function jailPlayer(plr, time) 
    if isTimer(Timer[plr]) then killTimer(Timer[plr]) end 
    setElementPosition(plr, unpack(jaja[math.random( #jaja )])) 
    Timer[plr] = setTimer(function(plr) 
        setElementPosition(plr , 1572.9000244141, -1635.4000244141, 13.60000038147) 
    end, time, 1, plr) 
    triggerClientEvent(plr, "unJail", plr, time) 
    setPlayerWantedLevel(plr, 0) 
end 
addEventHandler('onPlayerWasted',root,function(_,attacker) 
    if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == '[sWAT]' then 
        if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= '[sWAT]' then 
                if Times[getPlayerWantedLevel(source)] then 
                    setTimer ( function (  ) 
                    jailPlayer(source, Times[getPlayerWantedLevel(source)]) 
                                  end,2000,1 ) 
                        end 
                 end 
           end 
    end 
 ) 
  
addEventHandler("onPlayerLogin", root, function(_, account) 
    local jailT = getAccountData(account, "JailTime") 
    if jailT then 
        jailPlayer(source, jailT) 
        setAccountData(account, "JailTime", false) 
    end 
end) 
  
addEventHandler("onPlayerQuit", root, function( ) 
    if isTimer(Timer[source]) then 
        local account = getPlayerAccount(source) 
        if account and not isGuestAccount(account) then 
            local remaining = getTimerDetails(Timer[source]) 
            setAccountData(account, "JailTime", remaining) 
        end 
        killTimer(Timer[source]) 
        Timer[source] = nil 
    end 
end 
) 
Link to comment

Timer = { } 
local jaja = { 
              {3471.8334960938, -893.76837158203, 11.62656211853}, 
              {3494.4184570313, -894.68341064453, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
  
} 
  
Times = { 
    [6] = 360000, 
    [5] = 300000, 
    [4] = 240000, 
    [3] = 180000, 
    [2] = 180000, 
    [1] = 180000, 
} 
  
function jailPlayer(plr, time) 
    if isTimer(Timer[plr]) then killTimer(Timer[plr]) end 
    setElementPosition(plr, unpack(jaja[math.random( #jaja )])) 
    Timer[plr] = setTimer(function(plr) 
        setElementPosition(plr , 1572.9000244141, -1635.4000244141, 13.60000038147) 
    end, time, 1, plr) 
    triggerClientEvent(plr, "unJail", plr, time) 
    setPlayerWantedLevel(plr, 0) 
end 
addEventHandler('onPlayerWasted',root,function(_,attacker) 
     setTimer ( function() 
    if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == '[sWAT]' then 
        if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= '[sWAT]' then 
                if Times[getPlayerWantedLevel(source)] then 
                    jailPlayer(source, Times[getPlayerWantedLevel(source)]) 
                          end 
                   end 
             end 
         end, 2000, 1 ) 
    end 
 ) 
  
addEventHandler("onPlayerLogin", root, function(_, account) 
    local jailT = getAccountData(account, "JailTime") 
    if jailT then 
        jailPlayer(source, jailT) 
        setAccountData(account, "JailTime", false) 
    end 
end) 
  
addEventHandler("onPlayerQuit", root, function( ) 
    if isTimer(Timer[source]) then 
        local account = getPlayerAccount(source) 
        if account and not isGuestAccount(account) then 
            local remaining = getTimerDetails(Timer[source]) 
            setAccountData(account, "JailTime", remaining) 
        end 
        killTimer(Timer[source]) 
        Timer[source] = nil 
    end 
end 
) 

الدي بق آيش يقول ؟

Edited by Guest
Link to comment

ججرب

  
    Timer = { } 
    local jaja = { 
                  {3471.8334960938, -893.76837158203, 11.62656211853}, 
                  {3494.4184570313, -894.68341064453, 11.62656211853}, 
                  {3496.6020507813, -904.40509033203, 11.62656211853}, 
                  {3496.6020507813, -904.40509033203, 11.62656211853}, 
      
    } 
      
    Times = { 
        [6] = 360000, 
        [5] = 300000, 
        [4] = 240000, 
        [3] = 180000, 
        [2] = 180000, 
        [1] = 180000, 
    } 
      
    function jailPlayer(plr, time) 
        if isTimer(Timer[plr]) then killTimer(Timer[plr]) end 
        setElementPosition(plr, unpack(jaja[math.random( #jaja )])) 
        Timer[plr] = setTimer(function(plr) 
            setElementPosition(plr , 1572.9000244141, -1635.4000244141, 13.60000038147) 
        end, time, 1, plr) 
        triggerClientEvent(plr, "unJail", plr, time) 
        setPlayerWantedLevel(plr, 0) 
    end 
addEventHandler('onPlayerWasted',root, 
function(_,attacker) 
    setTimer ( function(attacker,source) 
        if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == '[sWAT]' then 
            if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= '[sWAT]' then 
                if Times[getPlayerWantedLevel(source)] then 
                    jailPlayer(source, Times[getPlayerWantedLevel(source)]) 
                end 
            end 
        end 
    end, 2000, 1 ,attacker,source) 
end 
) 
      
    addEventHandler("onPlayerLogin", root, function(_, account) 
        local jailT = getAccountData(account, "JailTime") 
        if jailT then 
            jailPlayer(source, jailT) 
            setAccountData(account, "JailTime", false) 
        end 
    end) 
      
    addEventHandler("onPlayerQuit", root, function( ) 
        if isTimer(Timer[source]) then 
            local account = getPlayerAccount(source) 
            if account and not isGuestAccount(account) then 
                local remaining = getTimerDetails(Timer[source]) 
                setAccountData(account, "JailTime", remaining) 
            end 
            killTimer(Timer[source]) 
            Timer[source] = nil 
        end 
    end 
    ) 
  

Link to comment
Timer = { } 
local jaja = { 
              {3471.8334960938, -893.76837158203, 11.62656211853}, 
              {3494.4184570313, -894.68341064453, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
              {3496.6020507813, -904.40509033203, 11.62656211853}, 
  
} 
  
Times = { 
    [6] = 360000, 
    [5] = 300000, 
    [4] = 240000, 
    [3] = 180000, 
    [2] = 180000, 
    [1] = 180000, 
} 
  
function jailPlayer(plr, time) 
    if isTimer(Timer[plr]) then killTimer(Timer[plr]) end 
    setElementPosition(plr, unpack(jaja[math.random( #jaja )])) 
    Timer[plr] = setTimer(function(plr) 
        setElementPosition(plr , 1572.9000244141, -1635.4000244141, 13.60000038147) 
    end, time, 1, plr) 
    triggerClientEvent(plr, "unJail", plr, time) 
    setPlayerWantedLevel(plr, 0) 
end 
addEventHandler('onPlayerWasted',root,function(_,attacker) 
     setTimer ( function() 
    if attacker and attacker ~= source and getElementType(attacker) == 'player' and getPlayerTeam(attacker) and getTeamName(getPlayerTeam(attacker)) == '[sWAT]' then 
        if getPlayerWantedLevel(source) > 0 and getPlayerTeam(source) and getTeamName(getPlayerTeam(source)) ~= '[sWAT]' then 
                if Times[getPlayerWantedLevel(source)] then 
                    jailPlayer(source, Times[getPlayerWantedLevel(source)]) 
                          end 
                   end 
             end 
         end, 2000, 1 ) 
    end 
 ) 
  
addEventHandler("onPlayerLogin", root, function(_, account) 
    local jailT = getAccountData(account, "JailTime") 
    if jailT then 
        jailPlayer(source, jailT) 
        setAccountData(account, "JailTime", false) 
    end 
end) 
  
addEventHandler("onPlayerQuit", root, function( ) 
    if isTimer(Timer[source]) then 
        local account = getPlayerAccount(source) 
        if account and not isGuestAccount(account) then 
            local remaining = getTimerDetails(Timer[source]) 
            setAccountData(account, "JailTime", remaining) 
        end 
        killTimer(Timer[source]) 
        Timer[source] = nil 
    end 
end 
) 

الدي بق آيش يقول ؟

/server.lua34: unexpected symbol near

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