Jump to content

تعديل


Recommended Posts

طبعا كل شيءواضح بالكود

مشكلتي بعد مايتشريها ابغى يروح لها وراب سويته مانفع

وابغى اذا كتبت في اف 8 تفجير تنفجر

سويته وما انفجرت

  
function CreateAll (  ) 
SpeacialCar = createVehicle ( 557, -68.67147064209,-1119.7764892578,1.078125 ) 
warpPedIntoVehicle ( SpeacialCar, true ) 
end 
addCommandHandler ( "تفجير", 
    function ( player ) 
         if ( getElementData( player, "canUse" ) == true ) then 
          blowVehicle ( player, true ) 
        end 
end )        
addEvent("ttt",true) 
addEventHandler("ttt",root, 
function ( ) 
        if ( getPlayerMoney ( source ) >= 20000 ) then 
          takePlayerMoney ( source, 20000 ) 
          setElementData( source, "canUse", true ) 
          CreateAll (  ) 
     end 
  end 
) 

Link to comment
SpecialCar =    {           } 
  
function MakeVehicles ( player ) 
    if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] )  ) then  
        destroyElement (    SpecialCar [ player ]   ) 
        SpecialCar [ player ] = nil 
    end 
        SpecialCar [ player ] = createVehicle ( 557, -68.67147064209,-1119.7764892578,1.078125 ) 
        warpPedIntoVehicle ( player,SpecialCar [ player ] ) 
end 
  
  
addCommandHandler ( 'تفجير', 
    function ( player ) 
        if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] )  ) then  
            blowVehicle ( SpecialCar [ player ] )  
            SpecialCar [ player ] = nil 
        end 
    end 
) 
  
addEvent('ttt',true) 
addEventHandler('ttt',root, 
function (  ) 
        if ( getPlayerMoney ( source ) >= 20000 ) then 
          takePlayerMoney ( source,20000 ) 
          MakeVehicles ( source ) 
     end 
  end 
) 
  
addEventHandler ( 'onVehicleExplode',resourceRoot, 
    function (      ) 
        setTimer ( destroyElement,3000,1,source ) 
    end 
) 
  
addEventHandler ( 'onPlayerQuit',root, 
    function (      ) 
            if ( SpecialCar [ source ] ) and ( isElement ( SpecialCar [ source ] )  ) then  
                destroyElement ( SpecialCar [ source ] ) 
                SpecialCar [ source ] = nil 
        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...