Jump to content

Mefisto_PL

Members
  • Posts

    460
  • Joined

  • Last visited

Posts posted by Mefisto_PL

  1. Hi, I have a problem with my script to show time. The script shows the time, but unfortunately that was the only time when the script has been included. For example, the script turned on 21:17 and this time shows me all the time. Please help me.

    local time = getRealTime() 
        local hours = time.hour 
        local minutes = time.minute 
      
    addEventHandler("onClientPreRender", getRootElement(), 
        function() 
            local screenWidth, screenHeight = guiGetScreenSize() 
            dxDrawText(hours..":"..minutes, screenWidth - 1160, 920, screenWidth - 110, 200, tocolor(0, 159, 255, 255), 1.5, "Arial", "center", "top", false, false, false) 
            end 
    ) 
      
    

  2. Hmm... Can you repair this too?

    addEventHandler("onPlayerJoin",root, 
    function () 
        bindKey(source,"z","down",fix) 
    end) 
      
    addEventHandler("onResourceStart",resourceRoot, 
    function () 
        for index, player in ipairs(getElementsByType("player")) do 
            bindKey(player,"z","down",fix) 
        end 
    end) 
      
    function fix (playerSource) 
        local theVehicle = getPedOccupiedVehicle (playerSource) 
        if (theVehicle and getVehicleController ( theVehicle ) == playerSource) then 
            fixVehicle (theVehicle) 
                            local rx, ry, rz = getVehicleRotation ( vehicle ) 
                                            if ( rx > 110 ) and ( rx < 250 ) then 
                                                local x, y, z = getElementPosition ( vehicle ) 
                                                setVehicleRotation ( vehicle, rx + 180, ry, rz ) 
                                                setElementPosition ( vehicle, x, y, z + 2 ) 
        end 
    end 
    addCommandHandler ("fix" , fix) 
    

    I want add flip to this function. :D

  3. no to mówię.. musisz dodać opcję mySQL i podzielić to na grupy tak jak powiedziałem.. zrób najpierw zapisywanie danych w bazie MySQL a potem podziel to na grupy .

    I say .. you must add the mySQL and divide it into groups of like I said .. make a first write data in the MySQL database and then divide it into groups.

  4. I wrote a script to fix the car through the Z button, but it shows me the error "Bad argument @'bindkey' "and I have no clue what to do. Please help, and here is the code:

    function fix (playerSource) 
        local theVehicle = getPedOccupiedVehicle (playerSource) 
        if theVehicle and getVehicleController ( theVehicle ) == playerSource then 
             fixVehicle (theVehicle) 
        end 
    end 
    addCommandHandler ("fix" , fix) 
    bindKey(source,"z","down",fix) 
    

×
×
  • Create New...