Jump to content

طلب كود


Fox501

Recommended Posts

client:

addEventHandler ("onClientGUIClick", getRootElement(), 
  
function(button, state, absoluteX, absoluteY) 
  
if ( source ==  GUIEditor_Button[1] ) then ---GUIEditor_Button[1]  اسم الزر 
  
  
  
  
triggerServerEvent("1",getLocalPlayer()) --الايفينت 1 يتغير مع كل زر 
  
end  
 end 
) 

server:

addEvent("1", true)--1 رقم اليفينت الي في الكلنت 
addEventHandler("1", getRootElement(),--1 رقم الايفينت الي في الكلنت 
  function() 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 1000) then--التاكد من ان معه 1000 
        takePlayerMoney(source, 1000)--سحب منه 1000 
        addVehicleUpgrade(getPedOccupiedVehicle(source),1074)--1074 رقم الجنط 
        outputChatBox("~| تـم تركيب آلجنـط بنجـآح |~", source, 255, 255, 0, true)-اذا تمت العمليه يظهر نص في الشات 
      else 
        outputChatBox("Not enough money.", source, 255, 0, 0, true)-- اذا ما معه فوس يظهر نص في الشات 
      end      
    else 
      outputChatBox("~| خطأ : يجب ان تكون رآكب سيارة |~", source, 255, 0, 0, true)--اذا لم يكن في السيارة يظهر نص في الشات 
    end 
  end 
) 

Link to comment
addEvent("1", true)--1 رقم اليفينت الي في الكلنت 
addEventHandler("1", getRootElement(),--1 رقم الايفينت الي في الكلنت 
  function() 
account = getPlayerAccount(thePlayer) 
if (account) and not ( isGuestAccount(account)) then 
setAccountData(account,"theWheel") 
end 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 1000) then--التاكد من ان معه 1000 
        takePlayerMoney(source, 1000)--سحب منه 1000 
        addVehicleUpgrade(getPedOccupiedVehicle(source),1074)--1074 رقم الجنط 
        outputChatBox("~| تـم تركيب آلجنـط بنجـآح |~", source, 255, 255, 0, true)-اذا تمت العمليه يظهر نص في الشات 
      else 
        outputChatBox("Not enough money.", source, 255, 0, 0, true)-- اذا ما معه فوس يظهر نص في الشات 
      end     
    else 
      outputChatBox("~| خطأ : يجب ان تكون رآكب سيارة |~", source, 255, 0, 0, true)--اذا لم يكن في السيارة يظهر نص في الشات 
    end 
  end 
) 

بهذا الككود الي حطيته يسير يحفظ ؟؟

Link to comment
addEvent("1", true) 
addEventHandler("1", root, 
function() 
     if isPedInVehicle(source) then 
          if (getPlayerMoney (source) >= 1000) then 
               takePlayerMoney(source, 1000) 
               addVehicleUpgrade(getPedOccupiedVehicle(source),1074) 
               outputChatBox("~| تـم تركيب آلجنـط بنجـآح |~", source, 255, 255, 0, true) 
               account = getPlayerAccount(source) 
               if (account) and not (isGuestAccount(account)) then 
                    setAccountData(account,"theWheel",1074) 
               end 
          else 
               outputChatBox("Not enough money.", source, 255, 0, 0, true) 
          end     
     else 
          outputChatBox("~| خطأ : يجب ان تكون رآكب سيارة |~", source, 255, 0, 0, true) 
     end 
end) 
  
addEventHandler("onPlayerVehicleEnter", root, 
function(veh,seat) 
     account = getPlayerAccount(source) 
     if seat == 0 and (account) and not (isGuestAccount(account)) then 
          addVehicleUpgrade(veh,getAccountData(account,"theWheel")) 
     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...