Jump to content

King12

Members
  • Posts

    437
  • Joined

  • Last visited

Posts posted by King12

  1. function checkboxSong() 
        if(source == songcheckbox) then 
            if(guiCheckBoxGetSelected(songcheckbox)) then 
                stopSound(song) 
            elseif not (guiCheckBoxGetSelected(songcheckbox)) then 
                playSound(song) 
            end 
        end 
    end 
    addEventHandler("onClientGUIClick", root, checkboxSong) 
    

    but?

    song = playSound("http://example.com/song.mp3") 
    

    how is that going to work if you already wrote playSound inside your function?

    it should be

    song = "http://example.com/song.mp3" 
    

  2. I think it's possible f.e :
      
    local vModLoader = { 
          { 'txd','cars/infernus.txd','411'}, 
          { 'dff','cars/infernus.dff','411'}, 
          { 'dff','cars/hunter.dff','425'} 
    } 
      
    

    That's what i meant by 'spamming over and over', and it wont help

    How do you want it then?

    Like this?

      
    local cars = { 
        filePath = "txd/", 
        txdFiles = {425,411,214}, 
        ids = {425,411,214}, 
    } 
    function () 
    for i,value in pairs(cars.txdFiles) do 
    local txd = engineLoadTXD ( cars.filePath..value..".txd" ) 
    for i,value1 in pairs(cars.ids) do 
    engineImportTXD ( txd, value1 ) 
    end 
      
    

    It must have alot of debugs problems, but I'm just trying to get your idea.

    Let's say i have 20 mod in a folder, txd and dff, which makes them 40 file, I have to spam
    { 'txd','cars/infernus.txd','411'}, 
          { 'dff','cars/infernus.dff','411'}, 
          { 'txd','cars/name.txd','id'}, 
          { 'dff','cars/name.txd','id'}, 
          { 'txd','cars/name.txd','id'}, 
          { 'dff','cars/name.txd','id'}, 
    

    all the time?

    Is there any to get automatically the files from 'cars' folder and insert in a table etc...

    I don't know actually, but mine could be helpful and less spam.

    Edit : I searched for a script and I found this example :

      
        for i = 0, 3 do 
            local tex = dxCreateTexture ( "stopbord/right/rframe"..i..".png" ) 
      
    

    0, 3 will be the files name.

  3. I think it's possible f.e :

      
    local vModLoader = { 
          { 'txd','cars/infernus.txd','411'}, 
          { 'dff','cars/infernus.dff','411'}, 
          { 'dff','cars/hunter.dff','425'} 
    } 
    for index,value in ipairs ( vCommandLoader ) do 
    outputChatBox (value[ 3 ],source,255,255,255,true ) 
    -- This will output the 3rd value into the chat. 
      
    

  4. السسلام عليكم,

    آول شي الكار هايد عباره عن سكربت يخفي السيارات اللي حولك ويطلعها طبعاً ينفع للريس آكثر شي

    آمس سويت سكربت خفيف كذا اللي هو كار هايد بس بالصور وتقدر تفعل آنه يطلع نفس الكلام بالشات

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

    +

    تعدل الزر اللي يعطل ويفعل الكار هايد

    الرابط :

    https://community.multitheftauto.com/in ... s&id=10179

    طبعاً هذا آول سكربت آسويه للحين..

    والجاي آحسن وآفضل بإذن الله

  5.   
     function Hit(weapon, _, _, _, _, _, hitElement) 
        if weapon == 31 then 
            if ( getElementType ( hitElement ) == "object" ) and ( getElementModel ( hitElement ) == 2021 ) then 
            destroyElement(hitElement) 
            end 
        end 
    end 
    addEventHandler("onClientPlayerWeaponFire", localPlayer, Hit) 
      
    

    or

      
    function Hit(weapon, _, _, _, _, _, hitElement) 
    if weapon == 31 and getElementType ( hitElement ) == "object" ) and ( getElementModel ( hitElement ) == 2021 ) then 
        destroyElement(hitElement) 
    end 
    addEventHandler("onClientPlayerWeaponFire", localPlayer, Hit) 
      
    

    not sure of them.

  6. Client Side

      
    addEvent("MarkerHit", true) 
    addEventHandler( "MarkerHit", localPlayer, 
    function () 
            window = guiCreateWindow (237, 146, 149, 206, "Aeroporto Las Venturas", false) 
            guiWindowSetSizable(window, false) 
            guiSetVisible(window, true) 
            outputChatBox('Object Created !',255,255,0) 
            button1 = guiCreateButton(9, 29, 130, 28, "Ilha Perdida", false, window) 
            guiSetFont(button1, "default-bold-small") 
            showCursor ( true )       
        end 
    end) 
      
    function click1 () 
        button2 = guiCreateButton(9, 72, 130, 28, "New City", false, window) 
        guiSetFont(button2, "default-bold-small") 
    end 
    addEventHandler ( "onClientGUIClick", button1, click1, true ) 
      
    

    Server Side

      
    local myMarker = createMarker(1358.8127441406,1679.6812744141,9.8203125, 'cylinder', 2.0, 255, 0, 0, 150) 
    local myBlip = createBlip( 1358.8127441406,1679.6812744141,9.8203125 ) 
    function HitMarker ( hitElement ) 
        if getElementType ( hitElement ) == "player" then 
            triggerClientEvent( source, "MarkerHit", source) 
        else 
            outputChatBox("Get out of the car", hitElement, 255,255,255,true) 
        end 
    end 
    addEventHandler("onMarkerHit", myMarker, HitMarker) 
      
    

×
×
  • Create New...