Jump to content

تعريف السورس


Recommended Posts

addEventHandler('onClientGUIClick',root, function ( ) 
    if ( source == pex ) then 
        local veh = getPedOccupiedVehicle (localPlayer) 
        if (veh) then 
        if ( getVehicleOverrideLights(veh) ~= 2 ) then 
                setVehicleOverrideLights(veh,2) 
                outputChatBox("* تم تشغيل النور",0,255,0) 
            else 
                setVehicleOverrideLights(veh,1) 
                outputChatBox("* تم إطفاء النور",255,0,0) 
            end 
            end 
        end 
end 
) 

Link to comment
  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

مشكوور والله ,,

تقدر اخوي تشوف ذا الكود

ذا لو ضغط على الخريطه يوديني المكان اللي ضغط عليه

لما اضغط يوديني على البحر ليه ؟؟

addEventHandler("onClientGUIDoubleClick", resourceRoot, function( ) 
    if source == map then 
        local x, y = getCursorPosition( ) 
        x, y = x*6000, y*6000 
        setElementPosition(localPlayer, x, y, getGroundPosition(x, y, 500)+1) 
    end 
end) 

Link to comment

شوف هاذا الكود بجانب سيرفر

addEvent("spawnOnPosition", true) 
addEventHandler('spawnOnPosition', root,  
function (x, y, z) 
    if getElementHealth ( source ) > 1 then 
        if getPedOccupiedVehicle(source) then 
            setElementPosition(getPedOccupiedVehicle(source), x, y, 0) 
            setElementPosition(getPedOccupiedVehicle(source), x, y, z+3) 
        else 
            setElementPosition(source, x, y, 0) 
            setElementPosition(source, x, y, z+3) 
        end 
        fadeCamera(source, true) 
    else         
        spawnPlayer(source, 0, 0, 3 ) 
        setElementPosition(source, x, y, z+3) 
        setCameraTarget (source, source) 
        toggleAllControls(source, true, true, true) 
        setPedStat(source, 160, 1000) 
        setPedStat(source, 229, 1000) 
        setPedStat(source, 230, 1000) 
        fadeCamera(source, true) 
    end  
end 
) 
  

Link to comment

في الديبوق يقولي عرف في جانب السيرفر

x,y,z

addEventHandler("onClientGUIDoubleClick", resourceRoot, function( ) 
    if source == map then 
        local x, y = getCursorPosition( ) 
        x, y = x*6000, y*6000 
        triggerServerEvent ( "spawnOnPosition", localPlayer) 
         
    end 
end) 

  
            addEvent("spawnOnPosition", true) 
addEventHandler('spawnOnPosition', root, 
function (x, y, z) 
    if getElementHealth ( source ) > 1 then 
        if getPedOccupiedVehicle(source) then 
            setElementPosition(getPedOccupiedVehicle(source), x, y, 0) 
            setElementPosition(getPedOccupiedVehicle(source), x, y, z+3) 
        else 
            setElementPosition(source, x, y, 0) 
            setElementPosition(source, x, y, z+3) 
        end 
        fadeCamera(source, true) 
    else        
        spawnPlayer(source, 0, 0, 3 ) 
        setElementPosition(source, x, y, z+3) 
        setCameraTarget (source, source) 
        toggleAllControls(source, true, true, true) 
        setPedStat(source, 160, 1000) 
        setPedStat(source, 229, 1000) 
        setPedStat(source, 230, 1000) 
        fadeCamera(source, true) 
    end  
end 
) 
  

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