Jump to content

طلب 3 اكواد


Recommended Posts

مثال على زر /

isOn = true 
  
addEventHandler( "onClientGUIClick", root, 
 function () 
        if ( source == Button ) then 
            local vehicle = getPedOccupiedVehicle (localPlayer) 
            if vehicle then 
         if isOn then 
             isOn = false 
                setVehicleEngineState ( vehicle, false ) 
       else 
                           isOn = true 
                setVehicleEngineState ( vehicle, true ) 
                 end 
          end 
     end 
end 
) 
Link to comment
مثال على زر /

isOn = true 
  
addEventHandler( "onClientGUIClick", root, 
 function () 
        if ( source == Button ) then 
            local vehicle = getPedOccupiedVehicle (localPlayer) 
            if vehicle then 
         if isOn then 
             isOn = false 
                setVehicleEngineState ( vehicle, false ) 
       else 
                           isOn = true 
                setVehicleEngineState ( vehicle, true ) 
                 end 
          end 
     end 
end 
) 

تسلم بحاول اسوي الحذف

Link to comment

هذا كود مختصر

  
addEventHandler( "onClientGUIClick", root, 
    function () 
        if ( source == Button ) then 
            local vehicle = getPedOccupiedVehicle (localPlayer) 
            if vehicle then 
                setVehicleEngineState ( vehicle, not getVehicleEngineState ( vehicle ) ) 
            end 
        end 
    end 
) 
  

Link to comment
هذا كود مختصر
  
addEventHandler( "onClientGUIClick", root, 
    function () 
        if ( source == Button ) then 
            local vehicle = getPedOccupiedVehicle (localPlayer) 
            if vehicle then 
                setVehicleEngineState ( vehicle, not getVehicleEngineState ( vehicle ) ) 
            end 
        end 
    end 
) 
  

Client side?

Link to comment
addEventHandler("onClientGUIClick", root, 
    function () 
        if (source == إسمـ الزر) then 
            local vehicle = getPedOccupiedVehicle(localPlayer) 
            destroyElement(vehicle) 
        end 
    end 
) 

تسلمـــــــ

في مشكلة ماتفتح النافدة

ويش المشكلة هذه

هذه كلنت مو كامل ذذ

GUIEditor = { 
    button = {}, 
    label = {}, 
    window = {}, 
} 
GUIEditor.window[1] = guiCreateWindow(520, 86, 298, 263, "Car System By Alhajarii", false) 
guiWindowSetSizable(GUIEditor.window[1], false) 
  
Repair = guiCreateButton(18, 45, 109, 50, "Repair", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[1], "clear-normal") 
On-Off = guiCreateButton(169, 45, 109, 50, "On-Off", false, GUIEditor.window[1]) 
Flip = guiCreateButton(23, 148, 109, 50, "Flip", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.button[3], "clear-normal") 
Destroy = guiCreateButton(173, 148, 105, 50, "Destroy", false, GUIEditor.window[1]) 
GUIEditor.label[1] = guiCreateLabel(7, 206, 226, 42, "By Alhajarii", false, GUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "sa-header") 
 guiSetVisible (GUIEditor.window[1], false)  
  
  
function OpenWin() 
    if guiGetVisible ( GUIEditor.window[1] ) then    
       guiSetVisible ( GUIEditor.window[1], false )     
       showCursor(false)   
       guiSetInputEnabled(false) 
    else 
        guiSetVisible ( GUIEditor.window[1], true )   
        showCursor(true)   
        guiSetInputEnabled(true) 
  
    end   
end    
bindKey("F5", "down", OpenWin)  

و السيرفر لين فيه اغلاط

addEvent("Repair",true) 
  
addEventHandler("Repair",root, 
  
function() 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 0) then 
    takePlayerMoney(source,0) 
        fixVehicle(getPedOccupiedVehicle(source))  
end 
  
end 
  
) 
  
addEvent("Flip",true) 
  
addEventHandler("Flip",root, 
  
function() 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 0) then 
    takePlayerMoney(source,0) 
        rx, ry, rz = getVehicleRotation (getPedOccupiedVehicle(source))  
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...