Jump to content

طـلب تصحيح كــود


AboFaisal

Recommended Posts

السلام عليكم ورحمه الله وبركاته ,

شبآب كيف حآلكم أنشاء الله بخيـر

الكــود عبآره على انك تضغط الزر وتشتري ويجيك صوت كمثـل

القرآن , النشيـد , الإذاعة

والكـود لـن أضع بـه محرمات , أو شئ لايحب الله عز وجل ,

والأن الكـود تفضلو

  
  
  
  
  
addEvent("BuySound",true)  
  
addEventHandler("BuySound",root,  
  
function() 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 100) then 
  
    takePlayerMoney(source,100)  
     
  
     local name = getPlayerName(source) 
     playSound("nshed.mp3") 
  
        outputChatBox ( "#FFF000*" .. name .. " Buy Sound On Shop Panel !", getRootElement(), 255, 0, 0, true ) 
  
  
      
    else 
  
  
        outputChatBox("Your Not Have Money To Sound", source, 255, 0, 0, true) 
end  
  
end  
  
)  

أرجـو التصحيح وجزآكم الله خيــر :arrowleft:

Link to comment

-- Server Side --

addEvent("BuySound",true) 
addEventHandler("BuySound", root, 
function() 
     if (getPlayerMoney(source) >= 100) then 
          takePlayerMoney(source,100) 
          local name = getPlayerName(source) 
          triggerClientEvent(source, "xxx", source) 
          outputChatBox("#FFF000*"..name.." Buy Sound On Shop Panel !", root, 255,0,0,true) 
     else 
          outputChatBox("Your Not Have Money To Sound", source, 255,0,0,true) 
     end 
end) 

-- Client Side --

addEvent("xxx",true) 
addEventHandler("xxx", root, 
function() 
     playSound("nshed.mp3") 
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...