Jump to content

تصحيح كود


Recommended Posts

السلام عليكم

ابي اصحح الكود

function onMarkerHit5(playerEnd) 
local account1 = getPlayerAccount(root) 
    if getElementHealth(car) <= 700 then  
    destroyElement(car) 
    outputChatBox("Your vehicle health is 70 you are deposited", root, 255, 0, 0) return end 
    if getElementData(root, "driverTestMarker4") == false then return end 
    if (getElementType (playerEnd) == "vehicle") then 
    if (source == markerEnd) then 
    destroyElement(markerEnd) 
    outputChatBox("Welcome", root, 255, 0, 0) 
    if account1 then 
    if getElementData(root, "driverTestMarker4") == true then 
     setAccountData(account1, "Name", true) 
                end 
             end 
          end 
       end 
    end 
addEventHandler("onMarkerHit", getResourceRootElement(), onMarkerHit5) 

انا مسوي ماركر لما تكون الداتا Name موجودة

يظهر في الشات Yes

لو مو موجوده

no

علي طول تظهر no

وانا اكون لامس الماركر markerEnd

اللي يعطي الداتا

والسلام خير ختام

Link to comment

local marker = createMarker(x,y,z, "cylinder", 0.7, 0, 100, 0, 150) -- ضع ماركر هنل

function onMarkerHit5(player,matchDim) 
if (matchDim and isElement(player) and getElementType(player) == "player") then  
    local account = getPlayerAccount(player) 
        if not isGuestAccount(account) then  
        if isPedInVehicle(player) then  
        local vehicle = getPedOccupiedVehicle(player) 
            if getElementHealth(vehicle) <= 700 then 
            destroyElement(vehicle) 
            outputChatBox("Your vehicle health is 70 you are deposited",player, 255, 0, 0)  
            end  
            if getElementData(player, "driverTestMarker4") == true then 
                setAccountData(account, "Name", true) 
            end 
            end 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, onMarkerHit5) 

-- كودك كامل خطأ

read lua language here

Link to comment
local marker = createMarker(x,y,z, "cylinder", 0.7, 0, 100, 0, 150) -- ضع ماركر هنل
function onMarkerHit5(player,matchDim) 
if (matchDim and isElement(player) and getElementType(player) == "player") then  
    local account = getPlayerAccount(player) 
        if not isGuestAccount(account) then  
        if isPedInVehicle(player) then  
        local vehicle = getPedOccupiedVehicle(player) 
            if getElementHealth(vehicle) <= 700 then 
            destroyElement(vehicle) 
            outputChatBox("Your vehicle health is 70 you are deposited",player, 255, 0, 0)  
            end  
            if getElementData(player, "driverTestMarker4") == true then 
                setAccountData(account, "Name", true) 
            end 
            end 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, onMarkerHit5) 

-- كودك كامل خطأ

read lua language here

ايش كودك كامل خطأ

الكود كله شغال مجربة وتمام الا بس الاكونت داتا اللي ما ظبطط معي

Link to comment
local marker = createMarker(x,y,z, "cylinder", 0.7, 0, 100, 0, 150) -- ضع ماركر هنل
function onMarkerHit5(player,matchDim) 
if (matchDim and isElement(player) and getElementType(player) == "player") then  
    local account = getPlayerAccount(player) 
        if not isGuestAccount(account) then  
        if isPedInVehicle(player) then  
        local vehicle = getPedOccupiedVehicle(player) 
            if getElementHealth(vehicle) <= 700 then 
            destroyElement(vehicle) 
            outputChatBox("Your vehicle health is 70 you are deposited",player, 255, 0, 0)  
            end  
            if getElementData(player, "driverTestMarker4") == true then 
                setAccountData(account, "Name", true) 
            end 
            end 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, onMarkerHit5) 

-- كودك كامل خطأ

read lua language here

كودك مو شغال -_-

Link to comment

جرب

function onMarkerHit5(player) 
local account1 = getPlayerAccount(player) 
    if getElementHealth(car) <= 700 then 
    destroyElement(car) 
    outputChatBox("Your vehicle health is 70 you are deposited", player, 255, 0, 0) return end 
    if getElementData(player, "driverTestMarker4") == false then return end 
    if (getElementType (player) == "vehicle") then 
    if (source == markerEnd) then 
    destroyElement(markerEnd) 
    outputChatBox("Welcome", player, 255, 0, 0) 
    if account1 then 
    if getElementData(player, "driverTestMarker4") == true then 
     setAccountData(account1, "Name", true) 
                end 
             end 
          end 
       end 
    end 
addEventHandler("onMarkerHit", getResourceRootElement(), onMarkerHit5) 

Link to comment
جرب
function onMarkerHit5(player) 
local account1 = getPlayerAccount(player) 
    if getElementHealth(car) <= 700 then 
    destroyElement(car) 
    outputChatBox("Your vehicle health is 70 you are deposited", player, 255, 0, 0) return end 
    if getElementData(player, "driverTestMarker4") == false then return end 
    if (getElementType (player) == "vehicle") then 
    if (source == markerEnd) then 
    destroyElement(markerEnd) 
    outputChatBox("Welcome", player, 255, 0, 0) 
    if account1 then 
    if getElementData(player, "driverTestMarker4") == true then 
     setAccountData(account1, "Name", true) 
                end 
             end 
          end 
       end 
    end 
addEventHandler("onMarkerHit", getResourceRootElement(), onMarkerHit5) 

لسه مو شغال :(

Link to comment
local marker = createMarker(x,y,z, "cylinder", 0.7, 0, 100, 0, 150) -- ضع ماركر هنل
function onMarkerHit5(player,matchDim) 
if (matchDim and isElement(player) and getElementType(player) == "player") then  
    local account = getPlayerAccount(player) 
        if not isGuestAccount(account) then  
        if isPedInVehicle(player) then  
        local vehicle = getPedOccupiedVehicle(player) 
            if getElementHealth(vehicle) <= 700 then 
            destroyElement(vehicle) 
            outputChatBox("Your vehicle health is 70 you are deposited",player, 255, 0, 0)  
            end  
            if getElementData(player, "driverTestMarker4") == true then 
                setAccountData(account, "Name", true) 
            end 
            end 
        end 
    end 
end 
addEventHandler("onMarkerHit", marker, onMarkerHit5) 

اخلي انا اسف كودك طلع مظبوط اقسم بالله نسيت ان الداتا driverTestMarker ما كانت عندي عشان كذا خربت المود اسف

-- كودك كامل خطأ

read lua language here

Link to comment
جرب
function onMarkerHit5(player) 
local account1 = getPlayerAccount(player) 
    if getElementHealth(car) <= 700 then 
    destroyElement(car) 
    outputChatBox("Your vehicle health is 70 you are deposited", player, 255, 0, 0) return end 
    if getElementData(player, "driverTestMarker4") == false then return end 
    if (getElementType (player) == "vehicle") then 
    if (source == markerEnd) then 
    destroyElement(markerEnd) 
    outputChatBox("Welcome", player, 255, 0, 0) 
    if account1 then 
    if getElementData(player, "driverTestMarker4") == true then 
     setAccountData(account1, "Name", true) 
                end 
             end 
          end 
       end 
    end 
addEventHandler("onMarkerHit", getResourceRootElement(), onMarkerHit5) 

لسه مو شغال :(

مشكووووور جدا علي مساعدتك

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