Jump to content

طلب كود او اختصار


Ahmad94

Recommended Posts

function ( ) 
  bindKey ( source,"1","down", 
    function( ) 
        local m = getPlayerMoney ( source ) 
        local o = getPedOccupiedVehicle ( source ) 
          if o and m >= المبلغ then 
            takePlayerMoney( source, المبلغ ) 
            addVehicleUpgrade ( o, 1010 ) 
            outputChatBox( "[" .. getPlayerName(source) .. " ] #FF0000Has Bought A Nitro" ) 
    else 
      outputChatBox( "* You Don't Have Enough Money", source, 255, 0, 0 ) 
    end 
  else 
    outputChatBox( "* You Are Not in Vehicle", source, 255, 0, 0 ) 
        end 
    ) 
end 
  
  
function ( ) 
  bindKey (source,"2","down", 
    function( ) 
        local m = getPlayerMoney ( source ) 
        local o = getPedOccupiedVehicle ( source ) 
          if o and m >= المبلغ then 
      takePlayerMoney( source, المبلغ ) 
        rx, ry, rz = getVehicleRotation ( getPedOccupiedVehicle( source ) )         
        setVehicleRotation ( getPedOccupiedVehicle( source ), rx +180, ry, rz +180 ) 
            outputChatBox( "[" .. getPlayerName( source ) .. " ] #FF0000Has Bought A Flip" ) 
    else 
      outputChatBox( "* You Don't Have Enough Money", source, 255, 0, 0 ) 
    end 
  else 
    outputChatBox( "* You Are Not in Vehicle", source, 255, 0, 0 ) 
        end 
    ) 
end 
  
  
function ( ) 
  bindKey (source,"3","down", 
    function( ) 
  local m = getPlayerMoney ( source ) 
  local o = getPedOccupiedVehicle ( source ) 
  if o and m >= المبلغ then 
      takePlayerMoney( source, المبلغ ) 
      fixVehicle( o ) 
      outputChatBox( "[" .. getPlayerName( source ) .. " ] #FF0000Has Bought A Repair" ) 
    else 
      outputChatBox( "* You Don't Have Enough Money", source, 255, 0, 0 ) 
    end 
  else 
    outputChatBox( "* You Are Not in Vehicle", source, 255, 0, 0 ) 
        end 
    ) 
end 

جرب هذا :roll:

Link to comment
function ( ) 
  bindKey ( source,"1","down", 
    function( ) 
        local m = getPlayerMoney ( source ) 
        local o = getPedOccupiedVehicle ( source ) 
          if o and m >= المبلغ then 
            takePlayerMoney( source, المبلغ ) 
            addVehicleUpgrade ( o, 1010 ) 
            outputChatBox( "[" .. getPlayerName(source) .. " ] #FF0000Has Bought A Nitro" ) 
    else 
      outputChatBox( "* You Don't Have Enough Money", source, 255, 0, 0 ) 
    end 
  else 
    outputChatBox( "* You Are Not in Vehicle", source, 255, 0, 0 ) 
        end 
    ) 
end 
  
  
function ( ) 
  bindKey (source,"2","down", 
    function( ) 
        local m = getPlayerMoney ( source ) 
        local o = getPedOccupiedVehicle ( source ) 
          if o and m >= المبلغ then 
      takePlayerMoney( source, المبلغ ) 
        rx, ry, rz = getVehicleRotation ( getPedOccupiedVehicle( source ) )         
        setVehicleRotation ( getPedOccupiedVehicle( source ), rx +180, ry, rz +180 ) 
            outputChatBox( "[" .. getPlayerName( source ) .. " ] #FF0000Has Bought A Flip" ) 
    else 
      outputChatBox( "* You Don't Have Enough Money", source, 255, 0, 0 ) 
    end 
  else 
    outputChatBox( "* You Are Not in Vehicle", source, 255, 0, 0 ) 
        end 
    ) 
end 
  
  
function ( ) 
  bindKey (source,"3","down", 
    function( ) 
  local m = getPlayerMoney ( source ) 
  local o = getPedOccupiedVehicle ( source ) 
  if o and m >= المبلغ then 
      takePlayerMoney( source, المبلغ ) 
      fixVehicle( o ) 
      outputChatBox( "[" .. getPlayerName( source ) .. " ] #FF0000Has Bought A Repair" ) 
    else 
      outputChatBox( "* You Don't Have Enough Money", source, 255, 0, 0 ) 
    end 
  else 
    outputChatBox( "* You Are Not in Vehicle", source, 255, 0, 0 ) 
        end 
    ) 
end 

جرب هذا :roll:

متاكد انه ذا كود ؟؟

ججرب ..

amountFix = سعر الأصصلأح

amountNitro = سعر النيترو

amountFlip = سعر الأنقلأب

local amountFix = 1000 
local amountNitro = 2000 
local amountFlip = 3000 
  
addEventHandler( "onResourceStart", resourceRoot, function ( )    
  for _,plrs in ipairs( getElementsByType("player") ) do 
       bindKey( plrs, "1", "Down", Fix) 
       bindKey( plrs, "2", "Down", Flip) 
       bindKey( plrs, "3", "Down", Nitro) 
     end 
end ) 
  
addEventHandler( "onPlayerJoin", root, function ( ) 
  bindKey( source, "1", "Down", Fix) 
  bindKey( source, "2", "Down", Flip) 
  bindKey( source, "3", "Down", Nitro) 
end ) 
  
function Fix ( plr ) 
      if ( isPedInVehicle( plr ) ) then 
          if ( getPlayerMoney( plr ) >= tonumber( amountFix ) ) then 
            takePlayerMoney( plr, tonumber( amountFix ) ) 
            fixVehicle( getPedOccupiedVehicle( plr ) ) 
            outputChatBox("#FF0000 ** You've bought Fix !", plr,255,255,255,true) 
      else 
            outputChatBox("#FF0000 ** You Don't Have enough Money.", plr,255,255,255,true) 
            end 
       else 
            outputChatBox("#FF0000 ** You Are not in The Vehicle", plr,255,0,0,true) 
          end 
end 
  
function Flip ( plr ) 
        if ( isPedInVehicle( plr ) ) then 
          if ( getPlayerMoney( plr ) >= tonumber( amountFlip ) ) then 
            takePlayerMoney( plr, tonumber( amountFlip ) ) 
            local rx, ry, rz = getElementRotation(getPedOccupiedVehicle( plr )) 
            setElementRotation ( getPedOccupiedVehicle( plr ), 0, 0, rx > 90 and rx < 279 and rz + 180 or rz ) 
            outputChatBox("#FF0000 ** You've bought Flip !", plr,255,255,255,true) 
       else 
            outputChatBox("#FF0000 ** You Don't Have enough Money.", plr,255,255,255,true) 
            end 
       else 
            outputChatBox("#FF0000 ** You Are not in The Vehicle", plr,255,0,0,true) 
           end 
end 
     
function Nitro ( plr ) 
        if ( isPedInVehicle( plr ) ) then 
          if ( getPlayerMoney( plr ) >= tonumber( amountNitro ) ) then 
            takePlayerMoney( plr, tonumber( amountNitro ) ) 
            addVehicleUpgrade( getPedOccupiedVehicle( plr ), 1010 ) 
            outputChatBox("#FF0000 ** You've bought a nitro !", plr,255,255,255,true) 
       else 
            outputChatBox("#FF0000 ** You Don't Have enough Money.", plr,255,255,255,true) 
            end 
       else 
            outputChatBox("#FF0000 ** You Are not in The Vehicle", plr,255,0,0,true) 
         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...