Jump to content

تصحيح كود


Recommended Posts

GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,158,415,320,"food panel",false) 
GUIEditor_Button[1] = guiCreateButton(149,125,112,64,"+20",false,GUIEditor_Window[1]) 
      
      
      
         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("F3", "down", OpenWin) 
      
      
    addEventHandler ("onClientGUIClick", getRootElement(), 
    function () 
    if source == GUIEditor_Window[1] then 
     
function setCash(thePlayer, amount)        
setPlayerMoney(thePlayer,(100))     
end 
     
    outputChatBox("+100") 
    end 
     end 
) 
      
  

Link to comment

وظيفة سحب الفلوس ماتضبط كلينت لانه ماراح تتغير الفلوس , حولها لسيرفر وسوي تريقر يعني افضل شي تحوله كل الوظيفة الى سيرفر ,

GUIEditor_Window = {} 
GUIEditor_Button = {} 
GUIEditor_Window[1] = guiCreateWindow(195,158,415,320,"food panel",false) 
GUIEditor_Button[1] = guiCreateButton(149,125,112,64,"+20",false,GUIEditor_Window[1]) 
guiSetVisible (GUIEditor_Window[1], false) 
  
bindKey ( "f3", "down", 
    function ( ) 
        local guiStatus = not guiGetVisible ( GUIEditor_Window[1] ) 
        guiSetVisible ( GUIEditor_Window[1], guiStatus ) 
        showCursor ( guiStatus )  
        guiSetInputEnabled(guiStatus)       
    end 
) 
  
addEventHandler('onClientGUIClick', root, 
  function ( ) 
  if ( source == GUIEditor_Button[1] ) then 
  triggerServerEvent('Take', localPlayer ) 
  end 
 end 
) 
  
---------ServerSide , 
addEvent ( 'Take ' , true ) 
addEventHandler('Take' , root, 
function ( ) 
if getPlayerMoney ( source ) >= 100  then 
takePlayerMoney ( source , 100 ) 
setElementHealth ( source, 100 ) 
outputChatBox ( ' * we have take $ 100 as an bayment for the Food and you have gained Extra Health * ', source, 255, 255, 0 ) 
else 
 outputChatBox( "(( You don't have enough cash! ))", source, 255, 0, 0 ) 
 end 
end 
) 
Link to comment

GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,158,415,320,"food panel",false) 
GUIEditor_Button[1] = guiCreateButton(149,125,112,64,"+20",false,GUIEditor_Window[1]) 
  
bindKey( "F3", "down", function (   ) 
   guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) )   
   showCursor( guiGetVisible ( GUIEditor_Window[1] ) ) 
   guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) )  
end )    
      
addEventHandler ( "onClientGUIClick", resourceRoot, function(    ) 
   if ( source == GUIEditor_Window[1] ) then 
       triggerServerEvent( "giveMoney", localPlayer ) 
    end 
end ) 

addEvent( "giveMoney", true ) 
addEventHandler( "giveMoney", root, function(  ) 
   givePlayerMoney( client, 100 ) 
end )    
Link to comment
GUIEditor_Window = {} 
GUIEditor_Button = {} 
  
GUIEditor_Window[1] = guiCreateWindow(195,158,415,320,"food panel",false) 
GUIEditor_Button[1] = guiCreateButton(149,125,112,64,"+20",false,GUIEditor_Window[1]) 
  
bindKey( "F3", "down", function (   ) 
   guiSetVisible ( GUIEditor_Window[1], not guiGetVisible ( GUIEditor_Window[1] ) )   
   showCursor( guiGetVisible ( GUIEditor_Window[1] ) ) 
   guiSetInputEnabled( guiGetVisible ( GUIEditor_Window[1] ) )  
end )    
      
addEventHandler ( "onClientGUIClick", resourceRoot, function(    ) 
   if ( source == GUIEditor_Window[1] ) then 
       triggerServerEvent( "giveMoney", localPlayer ) 
    end 
end ) 

addEvent( "giveMoney", true ) 
addEventHandler( "giveMoney", root, function(  ) 
   givePlayerMoney( client, 100 ) 
end )    

Food Panel

تشتري اكل تاخذ دم =

takePlayerMoney - setElementHealth 

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