Jump to content

تصحيح كود


Recommended Posts

ممكن تصحيح هذا الكود و هو عند الضغط علي الزر يعطي درع 100 واذا لديه يكتب له

   addEventHandler ("onClientGUIClick", getRootElement(), 
function () 
if source == armour then 
    setPedArmor ( player, 100 ) 
outputChatBox("تم تعبئة درعك")  
if getPedArmor(player) == 100 then 
        return 
        outputChatBox("تم تعبئة درعك من قبل", player, 220, 0, 0 ) 

Link to comment
  
--Client 
 addEventHandler ("onClientGUIClick", root, 
function () 
if source == armour then 
if getPedArmor(localPlayer) == 100 then 
outputChatBox("تم تعبئة درعك من قبل يزم -_-",25,255,0 ) 
else 
triggerServerEvent('Mezo',localPlayer) 
outputChatBox("تم تعبئة درعك",source)  
end 
end 
end) 
  

  
--Server 
addEvent('Mezo',true) 
addEventHandler('Mezo',root, 
function() 
setPedArmor ( source, 100 ) 
end) 
  

Link to comment
addEventHandler ("onClientGUIClick", resourceRoot, 
function () 
if source == armour then 
if getPedArmor(localPlayer) == 100 then 
outputChatBox("تم تعبئة درعك من قبل يزم -_-",25,255,0 ) 
else 
triggerServerEvent('Mezo',localPlayer) 
outputChatBox("تم تعبئة درعك") 
end 
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...