Jump to content

djharbi2

Members
  • Posts

    80
  • Joined

  • Last visited

Posts posted by djharbi2

  1. 16 hours ago, jakson said:

     

    Belki işe yaramaz bir konu verdi 

    Bu yüzden, mta web sitesinde bu sistemi aramanız gerekir, çünkü u için yayınladığı konu, oyuncuyu bir araca çarpıtmak veya oynatıcıyı araçtan kaldırmak gibi bir çok şeyi özlüyor 

    (U bunu herhangi bir tutuklama sisteminde bulabilir)

    Bunu bulmaya çalışın 

    https://community.multitheftauto.com/index.php?p=resources

    Ya da kendin yapabilirsen 

    Söyle bana ve işe yaraması için ne kullanman gerektiğini sana söyleyeceğim 

    thank you 

  2. Hi,

    the player I chose, i want him to follow me

    I mean, wherever I go it will come automatically, when I get in the car, it will also get on my car. When I get off, it will go down.

    Thank you in advance for your help.

  3. 2 hours ago, The_GTA said:

    Hello djharbi2,

    did you know that you can use shaders to replace ingame textures? With shaders you can write text into a DX render-target and then attach it to a shader that would replace your license plate texture! With this technique you can create a custom license plate GUI like in your picture above. Here are some hints to lead you in the right direction:

    Have you already looked at the resource community for sample scripts? It is always a good idea to learn from already existing code :) 

    • customvehplate - seems to do what you want; you just have to adjust it to fit your style + extend for GUI!

    Feel free to post any questions.

    - Martin

    Thank you for your answer, this adds pictures on the existing plate. but I want to add a picture separately. Think like a sticker.

  4. Hi, I want to print the matching value but I can't 

    Can you help, thank you ...

    server.Lua

    local vehDB = dbConnect( 'sqlite', 'vehicle.db' )
    dbExec(vehDB,' CREATE TABLE IF NOT EXISTS `vehicle_base` (pAcc, vehicleID, vehicleName, vehiclePrice, vehicleStatus, vehicleHP)')
    
    function dategetV()
    local results = dbPoll(dbQuery(vehDB, "SELECT * FROM `vehicle_base` WHERE vehicleID=? AND pAcc=?",520,getAccountName(getPlayerAccount(source))), -1) 
     if results then 
                for k,v in ipairs ( results ) do 
                outputDebugString(tostring(v['vehicleHP']))
            end 
        end 
    end
    addEvent("dategetV", true)
    addEventHandler("dategetV", getRootElement(getThisResource()), dategetV)
  5. 5 minutes ago, stPatrick said:

     

    Try, like this:

    
    dbExec(b_data, "INSERT INTO bank (bank_username,bank_pass,bank_ques,bank_answ,bank_money) VALUES (?,?,?,?,?)", b_username, b_pass, b_ques, b_answ, b_money)
    

    problem persists

  6. Hi, saving datebase. But does not record the question properly


    entered: your favorite writer?
    saved: your favorite writer'

    (? instead  '  is happening)

    database charset: utf-8

    how can I solve this problem?

    local username = "root"
    local password = "123456"
    local b_data = dbConnect("mysql","dbname=mtaserver;host=localhost;charset=utf8;port=3311", username, password, "autoreconnect=1"),
    
    local b_username = "admin"
    local b_pass = "1234"
    local b_ques = "your favorite writer?"
    local b_answ = "T. Well"
    local b_money = "0"
    
    local bank = dbExec(b_data, "INSERT INTO bank (bank_username,bank_pass,bank_ques,bank_answ,bank_money) VALUES('"..b_username.."','"..b_pass.."','"..b_ques.."','"..b_answ.."','"..b_money.."')")

     

  7. Hi, 

    mysql connection falls after some time

    databasen = setting.mysql
    
    function chac1()
    local acc = getPlayerAccount (client)
    local username = getAccountName ( acc )
    local slot = getAccountData (acc,"characterslot") or "no"
    local veriable2s = mysql_query(databasen, "SELECT * FROM skinshop WHERE skinshop_username='"..username.."'")
    
    if veriable2s then
    local okey2 = mysql_fetch_assoc(veriable2s)
    
     for okey,row in mysql_rows(veriable2s) do
    	c1 = row[3]
    	c2 = row[4]
      end
    end
    mysql_free_result(veriable2s)
    end

     

     

    the first time it works, there is no problem, but then disconnects the database

     

    How can I solve

     

     

  8. Hi,

     

    lang.lua

    fr = {
     a1 = "sortie",
    }
    
    
    
    eng = {
     a1 = "Exit",
    }

     

     

     

    client.lua

    guiSetText(lbl,""..eng.a1)

     

    Error: attempt to index global 'eng' (a nil value)

     

     

    how can i call?
    

     

     

  9. 8 hours ago, Keiichi1 said:

    Client:

    
    local sx, sy = guiGetScreenSize()
    
    function renderText()
        dxDrawText(timeText, sx/2, sy/2, 0, 0, tocolor(255, 255, 255), 2, "default-bold")
    end
    
    function updateTime()
        if isTimer(timer) then
            timeText = formatTime(getTimerDetails(timer))
        end
    end
    
    addCommandHandler("timer", function(cmd, min)
        if tonumber(min) then
            if not isTimer(timer) then
                local time = tonumber(min) * 60000
                timer = setTimer(function()
                    removeEventHandler("onClientRender", getRootElement(), renderText)
                end, time, 1)
                setTimer(updateTime, 1000, 0)
                timeText = formatTime(getTimerDetails(timer))
                addEventHandler("onClientRender", getRootElement(), renderText)
            end
        else
            outputChatBox("SYNTAX: /timer [minutes]")
        end
    end)
    
    function formatTime(ms)
        local totalseconds = math.floor(ms / 1000)
        local ms = ms % 1000
        local seconds = totalseconds % 60
        local minutes = math.floor(totalseconds / 60) % 60
        return string.format("%02d:%02d", minutes, seconds)
    end
    

     

    thanks bro

  10. 1 minute ago, ViRuZGamiing said:

    Just create a variable that represents the timer in seconds (since thats the smallest time you'd want to show) so if you'd want a timer of 10 min you'd have:

    timer = 600

    You'd draw that timer variable as a dxtext on render and decrement the timer by 1. You'd want to convert the 600s to min and seconds tho but thats just some simple math.

    do you make an example

×
×
  • Create New...