Jump to content

مشكله في كود النيترو واصلاح السياره


Recommended Posts

عندي مشكله في كود النيترو واصلاح السياره تفضلو الكود

addEvent("buyNitro", true) 
addEventHandler("buyNitro", rootElement, 
  function() 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 7000 ) then 
        takePlayerMoney(source, 7000) 
        addVehicleUpgrade(getPedOccupiedVehicle(source),1010) 
        outputChatBox("Nitro Successfully added", source, 255, 255, 0, true) 
      else 
        outputChatBox("Not enough money.", source, 255, 0, 0, true) 
      end      
    else 
      outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) 
    end 
  end 
) 

addEvent("buyRepair", true) 
addEventHandler("buyRepair", rootElement, 
  function() 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 5000 ) then 
        takePlayerMoney(source, 5000) 
        fixVehicle(getPedOccupiedVehicle(source)) 
        outputChatBox("Vehicle Successfully Fixed", source, 255, 255, 0, true) 
      else 
        outputChatBox("Not enough money.", source, 255, 0, 0, true) 
      end      
    else 
      outputChatBox("You are not in a vehicle", source, 255, 0, 0, true) 
    end 
  end 
) 

Link to comment

ذا الكود في مشكله سوبر دم

addEvent("buySuperHealth", true) 
addEventHandler("buySuperHealth",root, 
function() 
      if ( getPlayerMoney (source) >= price.shealth ) then 
        takePlayerMoney(source, price.shealth) 
        outputChatBox("You Bought Super Health By : "..price.shealth.."", source, 255, 255, 0, true) 
        local name = getPlayerName(source) 
        outputChatBox ( "#FFFF1A*** [ #FFFFFF" .. name .. " #FFFF1A] Has Bought Super Health By : "..price.shealth.."$   ***", getRootElement(), 255, 0, 0, true ) 
        setPedStat(source,24,999) 
        setElementHealth(source,200) 
        addEventHandler("onPlayerWasted",getRootElement(), 
            function() 
            setPedStat(source,24,569) 
            end 
        ) 
      else 
        outputChatBox("You don't have $"..price.shealth.." to buy Super Health ", source, 255, 0, 0, true) 
        end 
    end ) 
  
------- 

Link to comment
وش يقول

debugscript 3 ?

او وش مشكلتك ؟

..

انا حاس انك مطلع

5%

من الكود ...

ووين ال

client side

من ال

server side

...

؟ تحس 5% من الكود ؟ -.-

انت وش سالفتك ماغير تنتقد وتتتكبر؟

Link to comment
ذا الكود في مشكله سوبر دم
addEvent("buySuperHealth", true) 
addEventHandler("buySuperHealth",root, 
function() 
      if ( getPlayerMoney (source) >= price.shealth ) then 
        takePlayerMoney(source, price.shealth) 
        outputChatBox("You Bought Super Health By : "..price.shealth.."", source, 255, 255, 0, true) 
        local name = getPlayerName(source) 
        outputChatBox ( "#FFFF1A*** [ #FFFFFF" .. name .. " #FFFF1A] Has Bought Super Health By : "..price.shealth.."$   ***", getRootElement(), 255, 0, 0, true ) 
        setPedStat(source,24,999) 
        setElementHealth(source,200) 
        addEventHandler("onPlayerWasted",getRootElement(), 
            function() 
            setPedStat(source,24,569) 
            end 
        ) 
      else 
        outputChatBox("You don't have $"..price.shealth.." to buy Super Health ", source, 255, 0, 0, true) 
        end 
    end ) 
  
------- 

جرب ذا

    price.shealth = 3000 
     
    addEvent("buySuperHealth", true) 
    addEventHandler("buySuperHealth",root, 
    function() 
          if ( getPlayerMoney (source) >= price.shealth ) then 
            takePlayerMoney(source, price.shealth) 
            outputChatBox("You Bought Super Health By : "..price.shealth.."", source, 255, 255, 0, true) 
            local name = getPlayerName(source) 
            outputChatBox ( "#FFFF1A*** [ #FFFFFF" .. name .. " #FFFF1A] Has Bought Super Health By : "..price.shealth.."$   ***", getRootElement(), 255, 0, 0, true ) 
            setPedStat(source,24,999) 
            setElementHealth(source,200) 
            addEventHandler("onPlayerWasted",getRootElement(), 
                function() 
                setPedStat(source,24,569) 
                end 
            ) 
          else 
            outputChatBox("You don't have $"..price.shealth.." to buy Super Health ", source, 255, 0, 0, true) 
            end 
        end ) 
      
    ------- 

ملاحظة بياخذ 3 آلاف من الاعب اذا تبي تزود او تنقص رح ل

price.shealth = 3000

غير ال رقم

ملاحظة أخرى , انا مو متطمن ل

.

ذي

بعض الاوقات تعطيك اخطاء

price.shealth

..

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