Jump to content

الزر ما يضغط


Recommended Posts

مرحبا كيفكم

الزر ما يضغط هنا وش الحل

--------------------------- Server Side ------------------------------------ 
addEvent("getPing",true) 
addEventHandler("getPing",root, 
function() 
    local ip=getPlayerIP(client) 
    triggerClientEvent(client,"settingText",client,ip) 
end) 
  
addEvent("getIP",true) 
addEventHandler("getIP",root, 
function() 
    local ip=getPlayerIP(client) 
    triggerClientEvent(client,"settingText",client,ip) 
end) 
  
addEvent("getplayerskin",true) 
addEventHandler("getplayerskin",root, 
function() 
    local ip=getplayerskin(client) 
    triggerClientEvent(client,"settingText",client,ip) 
end) 
  
local rootElement = getRootElement() 
  
function qq() 
    local playername = getPlayerName ( source ) 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 3000 ) then 
        takePlayerMoney(source, 3000) 
        addVehicleUpgrade(getPedOccupiedVehicle(source),1010) 
        outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFNitro #ffffff]  ", source, 255, 20, 50, true) 
  
      else 
        outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true) 
  
  
      end      
    else 
      outputChatBox("You are not in a vehicle", source, 25, 200, 200, true) 
    end 
  end 
addEvent("buyNitro", true) 
addEventHandler( "buyNitro",getRootElement(),qq ) 
  
function fix() 
    local playername = getPlayerName ( source ) 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 3000 ) then 
        takePlayerMoney(source, 3000) 
        fixVehicle(getPedOccupiedVehicle(source)) 
        outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFRepair #ffffff]  ", source, 255, 255, 0, true) 
      else 
        outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true) 
      end      
    else 
      outputChatBox("You are not in a vehicle", source, 255, 50, 200, true) 
    end 
  end 
addEvent("buyRepair", true) 
addEventHandler( "buyRepair",getRootElement(),fix ) 
  
function flip() 
    local playername = getPlayerName ( source ) 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 3000 ) then 
        takePlayerMoney(source, 3000) 
        rx, ry, rz = getVehicleRotation (getPedOccupiedVehicle(source))      
        setVehicleRotation (getPedOccupiedVehicle(source), rx +180, ry, rz +180) 
        outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFflip #ffffff]    ", source, 255, 255, 0, true) 
      else 
        outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true) 
      end      
    else 
      outputChatBox("You are not in a vehicle", source, 255, 0, 200, true) 
    end 
  end 
addEvent("buyFlip", true) 
addEventHandler( "buyFlip",getRootElement(),flip ) 
  
addEvent("buyInvisible", true) 
addEventHandler("buyInvisible", rootElement, 
function() 
      if ( getPlayerMoney (source) >= 15000 ) then 
        takePlayerMoney(source, 15000) 
        outputChatBox("#ffffff[#ffffff  #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFInvisible #ffffff]", source, 255, 255, 0, true) 
        setElementAlpha(getPedOccupiedVehicle(source),0) 
        setElementAlpha(source,0) 
        setPlayerNametagShowing(source, false) 
        setTimer( setElementAlpha, 60000, 1, source, 500, true) 
        setTimer( setElementAlpha, 60000, 1, getPedOccupiedVehicle(source), 500, true) 
        setTimer( setPlayerNametagShowing, 60000, 1, source, true, true) 
      else 
        outputChatBox("You Dont Have [ #f0000015,000 #ffffff]", source, 255, 255, 255, true) 
    end 
  end 
) 
addCommandHandler ( "buy", 
    function ( player, cmd, what ) 
        if what == "nitro" then 
            if getPlayerMoney ( player ) >= 3000 then 
                if isPedInVehicle ( player ) then 
                    takePlayerMoney ( player, 3000 ) 
                    addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 ) 
                    outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00Nitro #007fff]", root, 255, 255, 255, true ) 
                else 
                    outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true ) 
                end 
            else 
                outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )     
            end 
        end 
    end 
) 
addCommandHandler ( "buy", 
    function ( player, cmd, what ) 
        if what == "flip" then 
            if getPlayerMoney ( player ) >= 3000 then 
                if isPedInVehicle ( player ) then 
                    takePlayerMoney ( player, 3000 ) 
                    addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 ) 
                    outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. "#1E90FF has bought a #ffffff[ #1E90FFflip #ffffff]    ", root, 255, 255, 255, true ) 
                else 
                    outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true ) 
                end 
            else 
                outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )     
            end 
        end 
    end 
) 
addCommandHandler ( "buy", 
    function ( player, cmd, what ) 
        if what == "repair" then 
            if getPlayerMoney ( player ) >= 3000 then 
                if isPedInVehicle ( player ) then 
                    takePlayerMoney ( player, 3000 ) 
                    addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 ) 
                    outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00repair #007fff]", root, 255, 255, 255, true ) 
                else 
                    outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true ) 
                end 
            else 
                outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )     
            end 
        end 
    end 
) 
addCommandHandler ( "buy", 
    function ( player, cmd, what ) 
        if what == "invisible" then 
            if getPlayerMoney ( player ) >= 3000 then 
                if isPedInVehicle ( player ) then 
                    takePlayerMoney ( player, 3000 ) 
                    addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 ) 
                    outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00invisible #007fff]", root, 255, 255, 255, true ) 
                else 
                    outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true ) 
                end 
            else 
                outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )     
            end 
        end 
    end 
) 

Link to comment
اطرح كلنت الاي بي !
addEvent("settingText",true) 
addEventHandler("settingText",root, 
function(ip) 
    guiSetText(GUIEditor_Label[6],"Your IP :" .. ip) 

addEvent("settingText",true) 
addEventHandler("settingText",root, 
function(ip) 
    guiSetText(GUIEditor_Label[6],"Your IP :" .. ip) 
end) 

Link to comment

الكود اللي استعمله انا للحصول على الاي بي

 سيرفر ---  
  
  
addEvent("update",true) 
addEventHandler("update",root, 
function(client) 
local ip = getPlayerIP(client) 
triggerClientEvent(client,"update",client,ip) 
end) 
  
  

كلنت

  
addEvent("update",true) 
addEventHandler("update",root, 
function(ip) 
guiSetText(GUIEditor_Label[6],"Your Ip: " .. ip .. "") 
end) 

Link to comment

--------------------------- Server Side ------------------------------------

  
addEvent("getPing",true) 
addEventHandler("getPing",root, 
function() 
local ip = getPlayerIP(client) 
    triggerClientEvent(client,"settingText",client,ip) 
end) 
  
addEvent("update",true) 
addEventHandler("update",root, 
function(client) 
local ip = getPlayerIP(client) 
triggerClientEvent(client,"update",client,ip) 
end) 
  
addEvent("getplayerskin",true) 
addEventHandler("getplayerskin",root, 
function() 
    local ip=getplayerskin(client) 
    triggerClientEvent(client,"settingText",client,ip) 
end) 
  
local rootElement = getRootElement() 
  
function qq() 
    local playername = getPlayerName ( source ) 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 3000 ) then 
        takePlayerMoney(source, 3000) 
        addVehicleUpgrade(getPedOccupiedVehicle(source),1010) 
        outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFNitro #ffffff]  ", source, 255, 20, 50, true) 
  
      else 
        outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true) 
  
  
      end      
    else 
      outputChatBox("You are not in a vehicle", source, 25, 200, 200, true) 
    end 
  end 
addEvent("buyNitro", true) 
addEventHandler( "buyNitro",getRootElement(),qq ) 
  
function fix() 
    local playername = getPlayerName ( source ) 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 3000 ) then 
        takePlayerMoney(source, 3000) 
        fixVehicle(getPedOccupiedVehicle(source)) 
        outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFRepair #ffffff]  ", source, 255, 255, 0, true) 
      else 
        outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true) 
      end      
    else 
      outputChatBox("You are not in a vehicle", source, 255, 50, 200, true) 
    end 
  end 
addEvent("buyRepair", true) 
addEventHandler( "buyRepair",getRootElement(),fix ) 
  
function flip() 
    local playername = getPlayerName ( source ) 
    if isPedInVehicle(source) then 
      if ( getPlayerMoney (source) >= 3000 ) then 
        takePlayerMoney(source, 3000) 
        rx, ry, rz = getVehicleRotation (getPedOccupiedVehicle(source))      
        setVehicleRotation (getPedOccupiedVehicle(source), rx +180, ry, rz +180) 
        outputChatBox("#ffffff[#ffffff ".. playername .." #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFflip #ffffff]    ", source, 255, 255, 0, true) 
      else 
        outputChatBox("You Dont Have [ #f000003,000 #ffffff]", source, 255, 255, 255, true) 
      end      
    else 
      outputChatBox("You are not in a vehicle", source, 255, 0, 200, true) 
    end 
  end 
addEvent("buyFlip", true) 
addEventHandler( "buyFlip",getRootElement(),flip ) 
  
addEvent("buyInvisible", true) 
addEventHandler("buyInvisible", rootElement, 
function() 
      if ( getPlayerMoney (source) >= 15000 ) then 
        takePlayerMoney(source, 15000) 
        outputChatBox("#ffffff[#ffffff  #ffffff]:#1E90FF has bought a #ffffff[ #1E90FFInvisible #ffffff]", source, 255, 255, 0, true) 
        setElementAlpha(getPedOccupiedVehicle(source),0) 
        setElementAlpha(source,0) 
        setPlayerNametagShowing(source, false) 
        setTimer( setElementAlpha, 60000, 1, source, 500, true) 
        setTimer( setElementAlpha, 60000, 1, getPedOccupiedVehicle(source), 500, true) 
        setTimer( setPlayerNametagShowing, 60000, 1, source, true, true) 
      else 
        outputChatBox("You Dont Have [ #f0000015,000 #ffffff]", source, 255, 255, 255, true) 
    end 
  end 
) 
addCommandHandler ( "buy", 
    function ( player, cmd, what ) 
        if what == "nitro" then 
            if getPlayerMoney ( player ) >= 3000 then 
                if isPedInVehicle ( player ) then 
                    takePlayerMoney ( player, 3000 ) 
                    addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 ) 
                    outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00Nitro #007fff]", root, 255, 255, 255, true ) 
                else 
                    outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true ) 
                end 
            else 
                outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )     
            end 
        end 
    end 
) 
addCommandHandler ( "buy", 
    function ( player, cmd, what ) 
        if what == "flip" then 
            if getPlayerMoney ( player ) >= 3000 then 
                if isPedInVehicle ( player ) then 
                    takePlayerMoney ( player, 3000 ) 
                    addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 ) 
                    outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. "#1E90FF has bought a #ffffff[ #1E90FFflip #ffffff]    ", root, 255, 255, 255, true ) 
                else 
                    outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true ) 
                end 
            else 
                outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )     
            end 
        end 
    end 
) 
addCommandHandler ( "buy", 
    function ( player, cmd, what ) 
        if what == "repair" then 
            if getPlayerMoney ( player ) >= 3000 then 
                if isPedInVehicle ( player ) then 
                    takePlayerMoney ( player, 3000 ) 
                    addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 ) 
                    outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00repair #007fff]", root, 255, 255, 255, true ) 
                else 
                    outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true ) 
                end 
            else 
                outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )     
            end 
        end 
    end 
) 
addCommandHandler ( "buy", 
    function ( player, cmd, what ) 
        if what == "invisible" then 
            if getPlayerMoney ( player ) >= 3000 then 
                if isPedInVehicle ( player ) then 
                    takePlayerMoney ( player, 3000 ) 
                    addVehicleUpgrade ( getPedOccupiedVehicle ( player ), 1010 ) 
                    outputChatBox ( "* [ #0000ff" .. getPlayerName ( player ) .. " #ffffff] #007fffhas bought [ #ffff00invisible #007fff]", root, 255, 255, 255, true ) 
                else 
                    outputChatBox ( "* You aren't in vehicle!", player, 255, 0, 0, true ) 
                end 
            else 
                outputChatBox ( "* You Dont Have [#999999 3,000 #007fff]", player, 0, 127, 255, true )     
            end 
        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...