Jump to content

كوود


Recommended Posts

Posted

#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 ) 
Posted
#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 

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

Posted
السطر ذا
if ( getPlayerMoney ( source ) >= 4000 ) then 

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

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

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

Posted

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

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 ) 
  

Posted
شباب وين الخطأ انا لما اضغط الزر ما اشتغل
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 ) 
  

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

Posted

client

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

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

Posted

في سطر "2" اتأكد انك حاط اسم الزر صح

Edit :

و بطريقة احسن :mrgreen:

function Give() 
triggerServerEvent ( "Usi",localPlayer)  
end 
addEventHandler ( "onClientGUIClick",الأسم, Give, false ) 
Posted
client
addEventHandler ( "onClientGUIClick", root, function (    ) 
        if ( source == GUIEditor.button[2]) then 
            triggerServerEvent ( "Usi", localPlayer ) 
    end 
end ) 

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

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

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

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