Jump to content

مساعده


nony

Recommended Posts

السلام عليكم

جمعه مباركه على كل المسلمين

يا شباب ابي اغير نوع الخط

مثال

ss1 = guiCreateLabel(100,300,700,20,'Welcome to server',false,GUIEditor_Tab[1]) 

ابي

'Welcome to server'

ينغير الخط واكبره كيف؟

وشكرا ^^ :mrgreen:

Link to comment

انا ابيه مثل الشوب مثلا يضغط على زر تجيه السياره

:wink:

الكودين الي أنا حطيتهم هم الي تحتاجهم

و طبعاً لما يضغط على الزر لازم تسوي ترقير للسيرفر و تستخدم الكود الأول عشان تطلع السيارة و تستخدم الكود الثاني عشان تركب اللاعب داخل السيارة

Link to comment

اعرف اني قلبت ام الكود ههه

بس مابخسر شي اذا جربت

--سيرفر--

addEvent("NRG",true) 
addEventHandler("NRG", root, 
function() 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 1500) then  
    takePlayerMoney(source,1500)  
function consoleCreateVehicle ( sourcePlayer, commandName, ... ) 
   if ( sourcePlayer ) then 
      local vehicleID = getVehicleModelFromName ( vehicleName ) 
      if vehicleID then 
    local RacerPed = createPed ( 252, 0, 0, 3 ) 
    local RaceVehicle = createVehicle ( 411, 4, 0, 3 )     
    warpPedIntoVehicle ( RacerPed, RaceVehicle )         
end 
            local newVehicle = createVehicle ( vehicleID, x, y, z, 0, 0, rotZ ) 
            if not newVehicle then 
               outputConsole ( "Failed to create vehicle.", sourcePlayer ) 
            end 
      end 
   end 
end 
        local name = getPlayerName(source) 
        outputChatBox ( "#00ff00" .. name .. "* #0099ccSuccessfully bought #00ff00[NRG-500] #000000[ #ff0000-$150 #000000]#00ff00 !", getRootElement(), 255, 0, 0, true ) 
    else 
          outputChatBox("you Don't have enough Money", source, 255, 0, 0, true) 
end  
  
end  
  
) 

--كلنت--

addEventHandler ("onClientGUIClick", getRootElement(), 
function() 
if ( source ==  ss1) then  
triggerServerEvent("NRG",getLocalPlayer())  
  
end  
  
end  
) 

Link to comment

جرب ذا :/

سيرفر --

    addEvent("NRG",true) 
    addEventHandler("NRG", root, 
    function() 
    local PlayerMoney = getPlayerMoney(source) 
     if ( PlayerMoney >= 1500) then 
        takePlayerMoney(source,1500) 
       if ( sourcePlayer ) then 
          local vehicleID = getVehicleModelFromName ( vehicleName ) 
          if vehicleID then 
        local RacerPed = createPed ( 252, 0, 0, 3 ) 
        local RaceVehicle = createVehicle ( 411, 4, 0, 3 )     
        warpPedIntoVehicle ( RacerPed, RaceVehicle )         
    end 
                local newVehicle = createVehicle ( vehicleID, x, y, z, 0, 0, rotZ ) 
                if newVehicle then 
                local name = getPlayerName(source) 
                   outputConsole ( "#00ff00" .. name .. "* #0099ccSuccessfully bought #00ff00[NRG-500] #000000[ #ff0000-$150 #000000]#00ff00 !", sourcePlayer ) 
          else 
           
            outputChatBox ( "Filed to create vehicle", getRootElement(), 255, 0, 0, true ) 
        else 
              outputChatBox("you Don't have enough Money", source, 255, 0, 0, true) 
    end 
    end 
    end 
    end 
      
    ) 

Link to comment

server-side

  addEvent ( 'NRG', true ) 
 addEventHandler ( 'NRG', getRootElement(), 
function ( ) 
    if ( getPlayerMoney ( source ) ) >= ( 1500 ) then 
        takePlayerMoney ( source, tonumber ( 1500 ) ) 
        local x, y, z =  getElementPosition ( source ) 
        local vehicle = createVehicle ( 411, x, y, z ) 
        warpPedIntoVehicle ( source, vehicle ) 
    end 
end ) 

client-side

addEventHandler(  
    'onClientGUIClick', getRootElement(), 
 function( ) 
    if ( source == GUIEditor_Button[1] ) then 
        triggerServerEvent ( 'NRG', getLocalPlayer()) 
    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...