Jump to content

كود ما يشتغل


Recommended Posts

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

يا شباب انا سويت شوب لكم كود الجيت باك ما اشتغل هذا هو الكود

function jet() 
    if ( not doesPedHaveJetPack(source) ) then 
        givePedJetPack(source) 
    else 
        removePedJetPack(source) 
    end 
end 
  
function je() 
    local m1 = getPlayerMoney(source) 
    if ( m1 >= 1000 ) then 
        takePlayerMoney(source,1000) 
        bindKey(source,"j","down",jet) 
        outputChatBox("#ffff00* [ INFO ] : [#ffffff" .. getPlayerName(source) .. "#ffff00]  Has Bought [ #000fffJetPack #ffff00]",getRootElement(),0,0,0,true) 
        setTimer(unbindKey,120000,1,source,"j") 
    else 
        outputChatBox("* You Don't Have Enough Money",source,255,0,0,true) 
    end 
end 
addEvent("onje",true) 
addEventHandler("onje",getRootElement(),je) 

شدوا الهمه

Link to comment

جرب ذا

-- Server Side --
addEvent("jet", true) 
addEventHandler("jet",root, 
function() 
     if getPlayerMoney(source) >= 1500 then 
          takePlayerMoney(source,1500) 
          givePedJetPack(source) 
          bindKey(source,"j", "down", jetpack) 
          setTimer(unbindKey,120000,1,source,"j","down",jetpack) 
          outputChatBox("* #0099ccSuccessfully bought JetPack #000000[ #ff0000-$1500 #000000]#00ff00 Press 'j' To remove it !",source,0,255,0,true) 
     else 
          outputChatBox("* you Don't have enough Money !",source,255,0,0,true) 
     end 
end) 
  
function jetpack(player) 
     if doesPedHaveJetPack(player) then 
          removePedJetPack(player) 
     else 
          givePedJetPack(player) 
     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...