Jump to content

كوود


Recommended Posts

#Client Side

addEventHandler ( "onClientGUIClick", root, function (    ) 
        if ( source == اسم الزر ) then  
            triggerServerEvent ( "Minigun", localPlayer ) -- ترايقر لسيرفر عشان لايكون السلاح وهمي 
    end  
end ) 

#Server Side

addEvent( "Minigun", true )  
addEventHandler ( "Minigun", root, function (    ) 
        if ( getPlayerMoney ( source ) >= 4000 ) then  
        takePlayerMoney ( source, 4000 ) -- يأخذ منه 4 الاف سعر السلاح 
        giveWeapon ( source , 38, 10000 ) -- العشر الاف الرصاص الي يجي بالسلاح والـ38 ايدي السلاح 
        setPedWeaponSlot ( source, getSlotFromWeapon ( 38 ) ) -- ايدي السلاح 
        outputChatBox ( "* " .. getPlayerName ( source ) .. " Has Bought Weapon [ Minigun ]", root, 255, 255, 255, true )-- مخرج شات 
            else 
        outputChatBox ( "* You don't have $4000 to buy [ Minigun ]", source, 255, 255, 255, true )-- مخرج شات 
    end  
end ) 
Link to comment
#Client Side

addEventHandler ( "onClientGUIClick", root, function (    ) 
        if ( source == اسم الزر ) then  
            triggerServerEvent ( "Minigun", localPlayer ) -- ترايقر لسيرفر عشان لايكون السلاح وهمي 
    end  
end ) 

#Server Side

addEvent( "Minigun", true )  
addEventHandler ( "Minigun", root, function (    ) 
        if ( getPlayerMoney ( source ) >= 4000 ) then  
        takePlayerMoney ( source, 4000 ) -- يأخذ منه 4 الاف سعر السلاح 
        giveWeapon ( source , 38, 10000 ) -- العشر الاف الرصاص الي يجي بالسلاح والـ38 ايدي السلاح 
        setPedWeaponSlot ( source, getSlotFromWeapon ( 38 ) ) -- ايدي السلاح 
        outputChatBox ( "* " .. getPlayerName ( source ) .. " Has Bought Weapon [ Minigun ]", root, 255, 255, 255, true )-- مخرج شات 
            else 
        outputChatBox ( "* You don't have $4000 to buy [ Minigun ]", source, 255, 255, 255, true )-- مخرج شات 
    end  
end ) 

السطر ذا

if ( getPlayerMoney ( source ) >= 4000 ) then 

يتحقق لو معه المبلغ او لا عشان ماتكون الفلوس سالب ولا؟

Link to comment
السطر ذا
if ( getPlayerMoney ( source ) >= 4000 ) then 

يتحقق لو معه المبلغ او لا عشان ماتكون الفلوس سالب ولا؟

يتحقق منها كلها

راح يتحقق انه الفلوس مو سالب وراح يتحقق ان فلوسه اكثر من 4000

Link to comment

شباب وين الخطأ انا لما اضغط الزر ما اشتغل

addEvent( "Usi", true ) 
addEventHandler ( "Usi", root, function (    ) 
        if ( getPlayerMoney ( source ) >= 100 ) then 
        takePlayerMoney ( source, 100 )  
        giveWeapon ( source , 28, 10000 )  
        setPedWeaponSlot ( source, getSlotFromWeapon ( 28) ) 
        outputChatBox ( "* " .. getPlayerName ( source ) .. " Has Bought Weapon [ Usi ]", root, 255, 255, 255, true ) 
            else 
        outputChatBox ( "* You don't have $4000 to buy [ Usi ]", source, 255, 255, 255, true ) 
    end 
end ) 
  

Link to comment
شباب وين الخطأ انا لما اضغط الزر ما اشتغل
addEvent( "Usi", true ) 
addEventHandler ( "Usi", root, function (    ) 
        if ( getPlayerMoney ( source ) >= 100 ) then 
        takePlayerMoney ( source, 100 )  
        giveWeapon ( source , 28, 10000 )  
        setPedWeaponSlot ( source, getSlotFromWeapon ( 28) ) 
        outputChatBox ( "* " .. getPlayerName ( source ) .. " Has Bought Weapon [ Usi ]", root, 255, 255, 255, true ) 
            else 
        outputChatBox ( "* You don't have $4000 to buy [ Usi ]", source, 255, 255, 255, true ) 
    end 
end ) 
  

مافيه خطأ , اطرح الكلينت

Link to comment
client
addEventHandler ( "onClientGUIClick", root, function (    ) 
        if ( source == GUIEditor.button[2]) then 
            triggerServerEvent ( "Usi", localPlayer ) 
    end 
end ) 

+اعطيني سكايبك

ماشوف فيه اي خطأ + تأكد من اسم الزر

ادخل فالوكيند بس Httttt7.Ksa وبالنسبه للسكايب تفضل : )

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