Jump to content

طلب كود


HomeBoy

Recommended Posts

هذا مثال, وإنت كمل عليه ~

addCommandHandler ( "fix",  
    function ( plr ) 
        local rPlayer = getRandomPlayer (  ); 
        local rVehicle = getPedOccupiedVehicle ( rPlayer ); 
        if rVehicle then 
            if getElementHealth ( rVehicle ) < 1000 then 
                fixVehicle ( rVehicle ); 
                givePlayerMoney ( plr, 500 ); 
            end 
        end 
    end 
); 

Link to comment

صح ؟؟

كلنت

  GUIEditor = { 
    button = {}, 
    edit = {} 
} 
  
  
هنا لوحه حقتي 
  
  
        
    
  
addEventHandler( "onClientGUIClick", resourceRoot, function( ) 
  if ( source == GUIEditor.button[1] ) then 
     setElementData( localPlayer, 'Datafix',  
    end 
end ) 

سيرفر

function fix ( player ) 
 if ( getElementData(player,'Datafix') ) then 
addCommandHandler ( "fix", 
    function ( plr ) 
        local rPlayer = getRandomPlayer (  ); 
        local rVehicle = getPedOccupiedVehicle ( rPlayer ); 
        if rVehicle then 
            if getElementHealth ( rVehicle ) < 1000 then 
                fixVehicle ( rVehicle ); 
                givePlayerMoney ( plr, 500 ); 
            end 
        end 
    end 
); 

Link to comment
ابي كود اذا ضاف امر من اف 8

اسمه

fx

يصلح سياره

ويعطيه 500

ابي يصلح بس اذا كانت سياره خربانه

:arrowdown:

  
    addEventHandler( "onClientGUIClick", resourceRoot, function( ) 
      if ( source == GUIEditor.button[1] ) then 
         setElementData( localPlayer, 'Datafix', 
        end 
    end ) 

if ( source == GUIEditor.button[1] ) then 

:lol::lol:

Edited by Guest
Link to comment
صح ؟؟

كلنت

  GUIEditor = { 
    button = {}, 
    edit = {} 
} 
  
  
هنا لوحه حقتي 
  
  
        
    
  
addEventHandler( "onClientGUIClick", resourceRoot, function( ) 
  if ( source == GUIEditor.button[1] ) then 
     setElementData( localPlayer, 'Datafix',  
    end 
end ) 

سيرفر

function fix ( player ) 
 if ( getElementData(player,'Datafix') ) then 
addCommandHandler ( "fix", 
    function ( plr ) 
        local rPlayer = getRandomPlayer (  ); 
        local rVehicle = getPedOccupiedVehicle ( rPlayer ); 
        if rVehicle then 
            if getElementHealth ( rVehicle ) < 1000 then 
                fixVehicle ( rVehicle ); 
                givePlayerMoney ( plr, 500 ); 
            end 
        end 
    end 
); 

Client Side !

addEventHandler( "onClientGUIClick", resourceRoot, function( ) 
  if ( source == GUIEditor.button[1] ) then 
      setElementData( localPlayer, 'Datafix', true ) 
    end 
end ) 

Server Side !

addCommandHandler ( "fix", function ( player ) 
   if ( getElementData( player, 'Datafix' ) ) then 
        local vehicle = getPedOccupiedVehicle ( player ) 
         if ( vehicle ) then 
              if ( getElementHealth ( vehicle ) < 1000 ) then 
                  fixVehicle ( vehicle ) 
                  givePlayerMoney ( player, 500 ) 
                 end 
            end 
       end 
end ) 
Link to comment
addCommandHandler 
getPedOccupiedVehicle 
getVehicleController 
getElementHealth 
fixVehicle 
givePlayerMoney 

  • givePlayerMoney
takePlayerMoney 

ابي كود اذا ضاف امر من اف 8

اسمه

fx

يصلح سياره

ويعطيه 500

ابي يصلح بس اذا كانت سياره خربانه

وشكراا

--

صح ؟؟

كلنت

  GUIEditor = { 
    button = {}, 
    edit = {} 
} 
  
  
هنا لوحه حقتي 
  
  
        
    
  
addEventHandler( "onClientGUIClick", resourceRoot, function( ) 
  if ( source == GUIEditor.button[1] ) then 
     setElementData( localPlayer, 'Datafix',  
    end 
end ) 

سيرفر

function fix ( player ) 
 if ( getElementData(player,'Datafix') ) then 
addCommandHandler ( "fix", 
    function ( plr ) 
        local rPlayer = getRandomPlayer (  ); 
        local rVehicle = getPedOccupiedVehicle ( rPlayer ); 
        if rVehicle then 
            if getElementHealth ( rVehicle ) < 1000 then 
                fixVehicle ( rVehicle ); 
                givePlayerMoney ( plr, 500 ); 
            end 
        end 
    end 
); 

* Client Side:

GUIEditor = { 
    button = {}, 
    edit = {} 
} 
  
-- اكوادك :\ 
  
  
addEventHandler ( "onClientGUIClick", GUIEditor.button[1], 
    function ( ) 
        setElementData ( localPlayer, "Datafix", true ) 
    end, false 
) 

* Server Side:

addCommandHandler ( "fx", 
    function ( player ) 
        local vehicle = getPedOccupiedVehicle ( player ) 
        if ( getElementData ( player, "Datafix" ) ) and ( vehicle ) and ( player == getVehicleController ( vehicle ) ) and ( getElementHealth ( vehicle ) < 1000 ) then 
            fixVehicle ( vehicle ) 
            givePlayerMoney ( player, 500 ) 
        end 
    end 
) 

Link to comment
ابي كود اذا ضاف امر من اف 8

اسمه

fx

يصلح سياره

ويعطيه 500

ابي يصلح بس اذا كانت سياره خربانه

:arrowdown:

  
    addEventHandler( "onClientGUIClick", resourceRoot, function( ) 
      if ( source == GUIEditor.button[1] ) then 
         setElementData( localPlayer, 'Datafix', 
        end 
    end ) 

if ( source == GUIEditor.button[1] ) then 

:lol::lol:

هذا الكود عشان ياخذ الوظيفه له

والكود الا يبغيه اذا كان ماخذ وظيفه يصلح

Link to comment

انا ابي لما يوخد وظيفه ويكبس زر

يروح اي سياره خربانه

ويكتب امر

وهو كذا يا زاحف ؟ وكنق

+

بوز زهرا

انا ابي وظيفه

مثل ار بي جي

لما يكبس زر

يوخد وظيفه

ويسوي اكواد

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...