Jump to content

مساعدة - منع الهكر في سيرفر


mr.Extreme

Recommended Posts

ما ادري اذا عندك الفري روم الاصلي الي مو معدل ,

ولكن التعديل يكون في الوظيفه حق السياره ,

fr_client.lua : Create vehicle window

سطر 926 بعد الوظيفه انزل سطر وحط هذا الكود

local vehicleWidth = { 
[400] = 3.03, [401] = 3.30, [402] = 2.90, [403] = 5.30, [404] = 3.21, [405] = 3.37, [406] = 6.60, [407] = 4.89, [408] = 5.90, [409] = 4.36, 
[410] = 2.89, [411] = 2.69, [412] = 3.97, [413] = 3.34, [414] = 3.99, [415] = 3.04, [416] = 4.42, [417] = 16.01, [418] = 3.32, [419] = 3.45, 
[420] = 3.30, [421] = 3.53, [422] = 3.11, [423] = 3.60, [424] = 2.44, [425] = 9.84, [426] = 3.29, [427] = 4.48, [428] = 3.73, [429] = 2.91, 
[430] = 6.59, [431] = 6.66, [432] = 7.17, [433] = 5.51, [434] = 2.69, [435] = 7.33, [436] = 3.11, [437] = 6.40, [438] = 3.37, [439] = 3.04, 
[440] = 3.29, [441] = 2.00, [442] = 3.71, [443] = 10.38, [444] = 3.85, [445] = 3.30, [446] = 6.73, [447] = 7.58, [448] = 1.33, [449] = 5.29, 
[450] = 7.17, [451] = 3.06, [452] = 5.92, [453] = 6.02, [454] = 9.70, [455] = 5.35, [456] = 5.18, [457] = 2.10, [458] = 3.44, [459] = 3.27, 
[460] = 8.94, [461] = 1.44, [462] = 1.33, [463] = 1.40, [464] = 1.25, [465] = 0.94, [466] = 3.45, [467] = 3.53, [468] = 1.39, [469] = 7.58, 
[470] = 3.24, [471] = 1.49, [472] = 4.58, [473] = 2.61, [474] = 3.37, [475] = 3.26, [476] = 8.19, [477] = 3.36, [478] = 3.23, [479] = 3.39, 
[480] = 2.83, [481] = 1.17, [482] = 3.33, [483] = 3.44, [484] = 9.92, [485] = 2.37, [486] = 4.67, [487] = 7.71, [488] = 6.53, [489] = 3.38, 
[490] = 3.93, [491] = 3.00, [492] = 2.84, [493] = 6.79, [494] = 3.57, [495] = 3.22, [496] = 2.65, [497] = 7.71, [498] = 4.19, [499] = 3.99, 
[500] = 2.90, [501] = 0.94, [502] = 3.35, [503] = 3.40, [504] = 3.39, [505] = 3.38, [506] = 2.94, [507] = 3.60, [508] = 4.62, [509] = 1.21, 
[510] = 1.13, [511] = 15.03, [512] = 6.58, [513] = 6.51, [514] = 5.55, [515] = 5.68, [516] = 3.49, [517] = 3.51, [518] = 3.33, [519] = 13.87, 
[520] = 8.61, [521] = 1.44, [522] = 1.44, [523] = 1.44, [524] = 5.08, [525] = 3.94, [526] = 2.98, [527] = 3.14, [528] = 3.28, [529] = 3.15, 
[530] = 2.63, [531] = 2.31, [532] = 7.38, [533] = 2.53, [534] = 3.40, [535] = 3.15, [536] = 3.54, [537] = 11.06, [538] = 8.26, [539] = 2.61, 
[540] = 3.44, [541] = 2.79, [542] = 3.53, [543] = 3.24, [544] = 6.73, [545] = 2.80, [546] = 3.30, [547] = 3.28, [548] = 12.72, [549] = 3.14, 
[550] = 3.34, [551] = 2.86, [552] = 4.02, [553] = 18.92, [554] = 3.57, [555] = 2.84, [556] = 3.85, [557] = 3.85, [558] = 2.94, [559] = 3.05, 
[560] = 3.05, [561] = 3.28, [562] = 2.98, [563] = 9.65, [564] = 0.93, [565] = 2.72, [566] = 3.58, [567] = 3.71, [568] = 2.75, [569] = 9.41, 
[570] = 9.41, [571] = 1.61, [572] = 1.75, [573] = 4.15, [574] = 2.43, [575] = 3.26, [576] = 3.48, [577] = 45.08, [578] = 6.35, [579] = 3.31, 
[580] = 3.35, [581] = 1.46, [582] = 3.98, [583] = 2.52, [584] = 8.24, [585] = 3.56, [586] = 1.56, [587] = 3.24, [588] = 5.52, [589] = 2.98, 
[590] = 9.67, [591] = 7.38, [592] = 36.34, [593] = 9.36, [594] = 0.58, [595] = 6.34, [596] = 3.30, [597] = 3.31, [598] = 3.25, [599] = 3.57, 
[600] = 3.35, [601] = 4.56, [602] = 3.14, [603] = 3.38, [604] = 3.45, [605] = 3.24, [606] = 2.46, [607] = 2.43, [608] = 4.01, [609] = 4.17, 
[610] = 1.59, [611] = 2.11, 
} 
  
addEvent('Checks',true) 
addEventHandler('Checks',root,function(vx,vy,vz,vehID,vrot) 
    if tonumber(vx and vy and vz and vehID and vrot) then 
        local px,py,pz = getElementPosition(g_Me) 
        local width = vehicleWidth[vehID] or 3 
            if isLineOfSightClear(px,py,pz+1,vx+width,vy+width,vz+1) and isLineOfSightClear(px,py,pz+1,vx+width,vy-width,vz+1) and isLineOfSightClear(px,py,pz+1,vx-width,vy-width,vz+1) and isLineOfSightClear(px,py,pz+1,vx-width,vy+width,vz+1) then 
                triggerServerEvent('SendAndGiveVeh',g_Me,vx,vy,vz,vehID,vrot) 
        else 
                errMsg('Please find a clear location to spawn the vehicle.') 
            end 
        end 
    end 
) 

fr_server.lua : وفي ملف

من سطر 297 الى 348 امسحها كلها , وبدلها بهذا,

function giveMeVehicles(vehicles) 
    if type(vehicles) == 'number' then 
        vehicles = { vehicles } 
    end 
  
    local px, py, pz, prot 
    local radius = 3 
    local playerVehicle = getPedOccupiedVehicle(source) 
    if playerVehicle and isElement(playerVehicle) then 
        px, py, pz = getElementPosition(playerVehicle) 
        prot, prot, prot = getVehicleRotation(playerVehicle) 
    else 
        px, py, pz = getElementPosition(source) 
        prot = getPedRotation(source) 
    end 
    local offsetRot = math.rad(prot) 
    local vx = px + radius * math.cos(offsetRot) 
    local vy = py + radius * math.sin(offsetRot) 
    local vz = pz + 2 
    local vrot = prot 
  
    vehicleList = g_PlayerData[source].vehicles 
    local vehicle 
    if ( not vehicles ) then return end 
    for i,vehID in ipairs(vehicles) do 
        if vehID < 400 or vehID > 611 then 
            errMsg(vehID ..' is incorrect vehicle model', source) 
        elseif not table.find(getOption('vehicles.disallowed'), vehID) then 
            if #vehicleList >= getOption('vehicles.maxperplayer') then 
                unloadVehicle(vehicleList[1]) 
            end 
            triggerClientEvent('Checks',source,vx,vy,vz,vehID,vrot) 
        end 
    end 
end 
  
addEvent('SendAndGiveVeh',true) 
addEventHandler('SendAndGiveVeh',root, 
function(vx,vy,vz,vehID,vrot) 
    vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) 
        if (not isElement(vehicle)) then return end 
            setElementInterior(vehicle, getElementInterior(source)) 
            setElementDimension(vehicle, getElementDimension(source)) 
            table.insert(vehicleList, vehicle) 
            g_VehicleData[vehicle] = { creator = source, timers = {} } 
            if vehID == 464 then 
                warpPedIntoVehicle(source, vehicle) 
            elseif not g_Trailers[vehID] then 
                if getOption('vehicles.idleexplode') then 
                    g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) 
                end 
                g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) 
            end 
            vx = vx + 4 
            vz = vz + 4 
    end 
) 

واذا ما عرفت اطرح اكواد ملفات الفري روم كلنت وسيرفر, واذا كان ما تبي احد يآخذه ارسله لي خآص ,

Solidsnake14 او جرب كود

السلام عليكم ذي بيست المود شغال بس مشكلته اذا حاولت انزل سياره بجنب شخص بينزل سيارتين واذا حاولت انزل بجنب 3 اشخاص ينزل 3 سيارات

تضهر لكل الاعبيه Please find a clear location to spawn the vehicle. وكمان هاذي الرساله

اب

Link to comment
ما ادري اذا عندك الفري روم الاصلي الي مو معدل ,

ولكن التعديل يكون في الوظيفه حق السياره ,

fr_client.lua : Create vehicle window

سطر 926 بعد الوظيفه انزل سطر وحط هذا الكود

local vehicleWidth = { 
[400] = 3.03, [401] = 3.30, [402] = 2.90, [403] = 5.30, [404] = 3.21, [405] = 3.37, [406] = 6.60, [407] = 4.89, [408] = 5.90, [409] = 4.36, 
[410] = 2.89, [411] = 2.69, [412] = 3.97, [413] = 3.34, [414] = 3.99, [415] = 3.04, [416] = 4.42, [417] = 16.01, [418] = 3.32, [419] = 3.45, 
[420] = 3.30, [421] = 3.53, [422] = 3.11, [423] = 3.60, [424] = 2.44, [425] = 9.84, [426] = 3.29, [427] = 4.48, [428] = 3.73, [429] = 2.91, 
[430] = 6.59, [431] = 6.66, [432] = 7.17, [433] = 5.51, [434] = 2.69, [435] = 7.33, [436] = 3.11, [437] = 6.40, [438] = 3.37, [439] = 3.04, 
[440] = 3.29, [441] = 2.00, [442] = 3.71, [443] = 10.38, [444] = 3.85, [445] = 3.30, [446] = 6.73, [447] = 7.58, [448] = 1.33, [449] = 5.29, 
[450] = 7.17, [451] = 3.06, [452] = 5.92, [453] = 6.02, [454] = 9.70, [455] = 5.35, [456] = 5.18, [457] = 2.10, [458] = 3.44, [459] = 3.27, 
[460] = 8.94, [461] = 1.44, [462] = 1.33, [463] = 1.40, [464] = 1.25, [465] = 0.94, [466] = 3.45, [467] = 3.53, [468] = 1.39, [469] = 7.58, 
[470] = 3.24, [471] = 1.49, [472] = 4.58, [473] = 2.61, [474] = 3.37, [475] = 3.26, [476] = 8.19, [477] = 3.36, [478] = 3.23, [479] = 3.39, 
[480] = 2.83, [481] = 1.17, [482] = 3.33, [483] = 3.44, [484] = 9.92, [485] = 2.37, [486] = 4.67, [487] = 7.71, [488] = 6.53, [489] = 3.38, 
[490] = 3.93, [491] = 3.00, [492] = 2.84, [493] = 6.79, [494] = 3.57, [495] = 3.22, [496] = 2.65, [497] = 7.71, [498] = 4.19, [499] = 3.99, 
[500] = 2.90, [501] = 0.94, [502] = 3.35, [503] = 3.40, [504] = 3.39, [505] = 3.38, [506] = 2.94, [507] = 3.60, [508] = 4.62, [509] = 1.21, 
[510] = 1.13, [511] = 15.03, [512] = 6.58, [513] = 6.51, [514] = 5.55, [515] = 5.68, [516] = 3.49, [517] = 3.51, [518] = 3.33, [519] = 13.87, 
[520] = 8.61, [521] = 1.44, [522] = 1.44, [523] = 1.44, [524] = 5.08, [525] = 3.94, [526] = 2.98, [527] = 3.14, [528] = 3.28, [529] = 3.15, 
[530] = 2.63, [531] = 2.31, [532] = 7.38, [533] = 2.53, [534] = 3.40, [535] = 3.15, [536] = 3.54, [537] = 11.06, [538] = 8.26, [539] = 2.61, 
[540] = 3.44, [541] = 2.79, [542] = 3.53, [543] = 3.24, [544] = 6.73, [545] = 2.80, [546] = 3.30, [547] = 3.28, [548] = 12.72, [549] = 3.14, 
[550] = 3.34, [551] = 2.86, [552] = 4.02, [553] = 18.92, [554] = 3.57, [555] = 2.84, [556] = 3.85, [557] = 3.85, [558] = 2.94, [559] = 3.05, 
[560] = 3.05, [561] = 3.28, [562] = 2.98, [563] = 9.65, [564] = 0.93, [565] = 2.72, [566] = 3.58, [567] = 3.71, [568] = 2.75, [569] = 9.41, 
[570] = 9.41, [571] = 1.61, [572] = 1.75, [573] = 4.15, [574] = 2.43, [575] = 3.26, [576] = 3.48, [577] = 45.08, [578] = 6.35, [579] = 3.31, 
[580] = 3.35, [581] = 1.46, [582] = 3.98, [583] = 2.52, [584] = 8.24, [585] = 3.56, [586] = 1.56, [587] = 3.24, [588] = 5.52, [589] = 2.98, 
[590] = 9.67, [591] = 7.38, [592] = 36.34, [593] = 9.36, [594] = 0.58, [595] = 6.34, [596] = 3.30, [597] = 3.31, [598] = 3.25, [599] = 3.57, 
[600] = 3.35, [601] = 4.56, [602] = 3.14, [603] = 3.38, [604] = 3.45, [605] = 3.24, [606] = 2.46, [607] = 2.43, [608] = 4.01, [609] = 4.17, 
[610] = 1.59, [611] = 2.11, 
} 
  
addEvent('Checks',true) 
addEventHandler('Checks',root,function(vx,vy,vz,vehID,vrot) 
    if tonumber(vx and vy and vz and vehID and vrot) then 
        local px,py,pz = getElementPosition(g_Me) 
        local width = vehicleWidth[vehID] or 3 
            if isLineOfSightClear(px,py,pz+1,vx+width,vy+width,vz+1) and isLineOfSightClear(px,py,pz+1,vx+width,vy-width,vz+1) and isLineOfSightClear(px,py,pz+1,vx-width,vy-width,vz+1) and isLineOfSightClear(px,py,pz+1,vx-width,vy+width,vz+1) then 
                triggerServerEvent('SendAndGiveVeh',g_Me,vx,vy,vz,vehID,vrot) 
        else 
                errMsg('Please find a clear location to spawn the vehicle.') 
            end 
        end 
    end 
) 

fr_server.lua : وفي ملف

من سطر 297 الى 348 امسحها كلها , وبدلها بهذا,

function giveMeVehicles(vehicles) 
    if type(vehicles) == 'number' then 
        vehicles = { vehicles } 
    end 
  
    local px, py, pz, prot 
    local radius = 3 
    local playerVehicle = getPedOccupiedVehicle(source) 
    if playerVehicle and isElement(playerVehicle) then 
        px, py, pz = getElementPosition(playerVehicle) 
        prot, prot, prot = getVehicleRotation(playerVehicle) 
    else 
        px, py, pz = getElementPosition(source) 
        prot = getPedRotation(source) 
    end 
    local offsetRot = math.rad(prot) 
    local vx = px + radius * math.cos(offsetRot) 
    local vy = py + radius * math.sin(offsetRot) 
    local vz = pz + 2 
    local vrot = prot 
  
    vehicleList = g_PlayerData[source].vehicles 
    local vehicle 
    if ( not vehicles ) then return end 
    for i,vehID in ipairs(vehicles) do 
        if vehID < 400 or vehID > 611 then 
            errMsg(vehID ..' is incorrect vehicle model', source) 
        elseif not table.find(getOption('vehicles.disallowed'), vehID) then 
            if #vehicleList >= getOption('vehicles.maxperplayer') then 
                unloadVehicle(vehicleList[1]) 
            end 
            triggerClientEvent('Checks',source,vx,vy,vz,vehID,vrot) 
        end 
    end 
end 
  
addEvent('SendAndGiveVeh',true) 
addEventHandler('SendAndGiveVeh',root, 
function(vx,vy,vz,vehID,vrot) 
    vehicle = createVehicle(vehID, vx, vy, vz, 0, 0, vrot) 
        if (not isElement(vehicle)) then return end 
            setElementInterior(vehicle, getElementInterior(source)) 
            setElementDimension(vehicle, getElementDimension(source)) 
            table.insert(vehicleList, vehicle) 
            g_VehicleData[vehicle] = { creator = source, timers = {} } 
            if vehID == 464 then 
                warpPedIntoVehicle(source, vehicle) 
            elseif not g_Trailers[vehID] then 
                if getOption('vehicles.idleexplode') then 
                    g_VehicleData[vehicle].timers.fire = setTimer(commitArsonOnVehicle, getOption('vehicles.maxidletime'), 1, vehicle) 
                end 
                g_VehicleData[vehicle].timers.destroy = setTimer(unloadVehicle, getOption('vehicles.maxidletime') + (getOption('vehicles.idleexplode') and 10000 or 0), 1, vehicle) 
            end 
            vx = vx + 4 
            vz = vz + 4 
    end 
) 

واذا ما عرفت اطرح اكواد ملفات الفري روم كلنت وسيرفر, واذا كان ما تبي احد يآخذه ارسله لي خآص ,

Solidsnake14 او جرب كود

السلام عليكم ذي بيست المود شغال بس مشكلته اذا حاولت انزل سياره بجنب شخص بينزل سيارتين واذا حاولت انزل بجنب 3 اشخاص ينزل 3 سيارات

تضهر لكل الاعبيه Please find a clear location to spawn the vehicle. وكمان هاذي الرساله

اب اب هي كمان رفعت فيديو

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