Jump to content

حاجة بسيطة


Recommended Posts

السلام عليكم بدي انا عندي فكرة اعمل ماركر وهل ماركر اول ماتدخل ليه تنفتح لوحة وفسط لوحة قنبلة يدوية وموقتة والخ

هادا مود عبارة عن تلغيم سيارات اني عملت ملف كلينت ناجح بس ملف سيرفر ابي وش مطلوب فيه مش تتفجر سيارة وقت تصتدم ف جدار او سيارة

وابي وقت معين للسيارة قبل انفجار

وابي سرعة متلا لما توصل لل100 تنفجر سيارة 

مطلوب بدي مساعدة لي اعمل ملف سيرفر 

و شكرا

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 ( 410, -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 ( getElementData(source, "Money") > 20000 ) then
  --      if ( getPlayerMoney ( source ) >= 20000 ) then
       --   takePlayerMoney ( source,20000 ) 
          setElementData(source, "Money", (getElementData(source, "Money") or 0) - 20000)
          MakeVehicles ( source )
exports["guimessages"]:outputServer ( source," تم شراء السيارة الملغمة بمبلغ 20000 ", 252, 0, 0, true )
else
exports["guimessages"]:outputServer(source, " لاتملك المال الكافي لشراء السيارة الملغمة 20000",  252, 0, 0, true )   
     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
)

 ملف سيرفر
Edited by #bazooka
Link to comment
13 hours ago, #bazooka said:

SpecialCar =    {           }
function MakeVehicles ( player )
    if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] )  ) then 
        destroyElement (    SpecialCar [ player ]   )
        SpecialCar [ player ] = nil
    end
        SpecialCar [ player ] = createVehicle ( 410, -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 ( getElementData(source, "Money") > 20000 ) then
  --      if ( getPlayerMoney ( source ) >= 20000 ) then
       --   takePlayerMoney ( source,20000 ) 
          setElementData(source, "Money", (getElementData(source, "Money") or 0) - 20000)
          MakeVehicles ( source )
exports["guimessages"]:outputServer ( source," تم شراء السيارة الملغمة بمبلغ 20000 ", 252, 0, 0, true )
else
exports["guimessages"]:outputServer(source, " لاتملك المال الكافي لشراء السيارة الملغمة 20000",  252, 0, 0, true )   
     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
)

 ملف سيرفر

مشكور اخي الحين بجربها

13 hours ago, #bazooka said:

SpecialCar =    {           }
function MakeVehicles ( player )
    if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] )  ) then 
        destroyElement (    SpecialCar [ player ]   )
        SpecialCar [ player ] = nil
    end
        SpecialCar [ player ] = createVehicle ( 410, -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 ( getElementData(source, "Money") > 20000 ) then
  --      if ( getPlayerMoney ( source ) >= 20000 ) then
       --   takePlayerMoney ( source,20000 ) 
          setElementData(source, "Money", (getElementData(source, "Money") or 0) - 20000)
          MakeVehicles ( source )
exports["guimessages"]:outputServer ( source," تم شراء السيارة الملغمة بمبلغ 20000 ", 252, 0, 0, true )
else
exports["guimessages"]:outputServer(source, " لاتملك المال الكافي لشراء السيارة الملغمة 20000",  252, 0, 0, true )   
     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
)

 ملف سيرفر

 

13 hours ago, #bazooka said:

SpecialCar =    {           }
function MakeVehicles ( player )
    if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] )  ) then 
        destroyElement (    SpecialCar [ player ]   )
        SpecialCar [ player ] = nil
    end
        SpecialCar [ player ] = createVehicle ( 410, -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 ( getElementData(source, "Money") > 20000 ) then
  --      if ( getPlayerMoney ( source ) >= 20000 ) then
       --   takePlayerMoney ( source,20000 ) 
          setElementData(source, "Money", (getElementData(source, "Money") or 0) - 20000)
          MakeVehicles ( source )
exports["guimessages"]:outputServer ( source," تم شراء السيارة الملغمة بمبلغ 20000 ", 252, 0, 0, true )
else
exports["guimessages"]:outputServer(source, " لاتملك المال الكافي لشراء السيارة الملغمة 20000",  252, 0, 0, true )   
     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
)

 ملف سيرفر
SpecialCar =    {           }
function MakeVehicles ( player )
    if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] )  ) then 
        destroyElement (    SpecialCar [ player ]   )
        SpecialCar [ player ] = nil
    end
        SpecialCar [ player ] = createVehicle ( 410, -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 ( getElementData(source, "Money") > 20000 ) then
  --      if ( getPlayerMoney ( source ) >= 20000 ) then
       --   takePlayerMoney ( source,20000 ) 
          setElementData(source, "Money", (getElementData(source, "Money") or 0) - 20000)
          MakeVehicles ( source )
exports["guimessages"]:outputServer ( source," تم شراء السيارة الملغمة بمبلغ 20000 ", 252, 0, 0, true )
else
exports["guimessages"]:outputServer(source, " لاتملك المال الكافي لشراء السيارة الملغمة 20000",  252, 0, 0, true )   
     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
On 11/4/2016 at 11:44 AM, Mohamed_king said:

مشكور اخي الحين بجربها

 


SpecialCar =    {           }
function MakeVehicles ( player )
    if ( SpecialCar [ player ] ) and ( isElement ( SpecialCar [ player ] )  ) then 
        destroyElement (    SpecialCar [ player ]   )
        SpecialCar [ player ] = nil
    end
        SpecialCar [ player ] = createVehicle ( 410, -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 ( getElementData(source, "Money") > 20000 ) then
  --      if ( getPlayerMoney ( source ) >= 20000 ) then
       --   takePlayerMoney ( source,20000 ) 
          setElementData(source, "Money", (getElementData(source, "Money") or 0) - 20000)
          MakeVehicles ( source )
exports["guimessages"]:outputServer ( source," تم شراء السيارة الملغمة بمبلغ 20000 ", 252, 0, 0, true )
else
exports["guimessages"]:outputServer(source, " لاتملك المال الكافي لشراء السيارة الملغمة 20000",  252, 0, 0, true )   
     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
  • 2 weeks later...
On ٥‏/١١‏/٢٠١٦ at 7:43 PM, a7zan said:

لول اصلا لو خليته يحاول كان بيتعلم ع الاقل

ونص الاكواد مب طالبها هو

لان انت مسوي كومند "تفجير"ء

وهو ما طلبه 

:_ اقدر محاولته بس مشتغل

 وسويته مشكور

On ٥‏/١١‏/٢٠١٦ at 2:29 PM, #bazooka said:

العفو :$

ماشتغل

سويت  واحد بنفسي

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