Jump to content

طلب كود بسيط جدا جدا


RdX

Recommended Posts

السلام عليكم شباب

انا سويت يوزر بنل لكن موب كامل قاعد اشتغل عليه

وسويت قائمة جنوط

لكن يقدر يحط جنط بدون فلوس

ابيكم تعدلوه لي بس

  
function Change_ (scheck) 
if ( isPedInVehicle ( source ) ) then 
            local theVehicle = getPedOccupiedVehicle ( source ) 
            local success = addVehicleUpgrade ( theVehicle, scheck ) 
            if ( success ) then 
                outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] #ffffffI've been Successfully buying rim", source, 255, 153, 3, true ) 
            else 
                outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] Failed to Add The Wheel.", source, 255, 255, 0, true ) 
            end 
        else 
            outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] You Must Be in a Vehicle!", source, 255, 255, 0, true ) 
        end 
  
end 
addEvent("addWheel",true) 
addEventHandler("addWheel",root,Change_) 

و ابي المبلع لمن يضغط الزر 20000 الف

Link to comment

# اخوي لازم الفنكنشات التالية عشان تاخذ منه فلوس

addEventHandler "onClientGUIClick" ------ نسوي حدث وقت يضغط على الزر 
  
triggerServerEvent --------- نسوي تريقر للسيرفر  
  
Server : 
  
addEvent 
  
addEventHandler 
  
getPlayerMoney 
  
takePlayerMoney 
  
getPedOccupiedVehicle  
  
addVehicleUpgrade  

# اي شي منت فاهمه تفضل اسال عنه

Link to comment
function Change_ ( scheck ) 
          if not isPedInVehicle ( source ) then return outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] You Must Be in a Vehicle!", source, 255, 255, 0, true ) end 
            if getPlayerMoney ( source ) < 20000 then return outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] You Don't Have Money!", source, 255, 255, 0, true ) end 
            takePlayerMoney ( source,20000 ) 
            local success = addVehicleUpgrade ( getPedOccupiedVehicle ( source ), scheck ) 
            if not ( success ) then return outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] Failed to Add The Wheel.", source, 255, 255, 0, true ) end 
            return outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] #ffffffI've been Successfully buying rim", source, 255, 153, 3, true )  
    end 
addEvent("addWheel",true) 
addEventHandler("addWheel",root,Change_) 

لم يتم التجربة ..

Link to comment
function Change_ ( scheck ) 
          if not isPedInVehicle ( source ) then return outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] You Must Be in a Vehicle!", source, 255, 255, 0, true ) end 
            if getPlayerMoney ( source ) < 20000 then return outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] You Don't Have Money!", source, 255, 255, 0, true ) end 
            takePlayerMoney ( source,20000 ) 
            local success = addVehicleUpgrade ( getPedOccupiedVehicle ( source ), scheck ) 
            if not ( success ) then return outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] Failed to Add The Wheel.", source, 255, 255, 0, true ) end 
            return outputChatBox( "#ffffff[#ff9900Userpanel#ffffff] #ffffffI've been Successfully buying rim", source, 255, 153, 3, true )  
    end 
addEvent("addWheel",true) 
addEventHandler("addWheel",root,Change_) 

لم يتم التجربة ..

مشكور تمت الجربة و اشتغل :$

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