Jump to content

GTX

Members
  • Posts

    1,273
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by GTX

  1. If you want to crash your game, go ahead:

      
    local n = 0 
    local h1, h2, h3 = debug.gethook() 
    debug.sethook(nil) 
    while (n <= 10) do 
        if not (isTimer(timer)) then 
            timer = setTimer(function() 
                outputChatBox("Number: "..n) 
                n = n + 1 
            end, 1000, 1) 
        end 
    end 
    debug.sethook(_, h1, h2, h3) 
      
    

    This should stop the error but will lag your client lol.

    EDIT: I suppose you want to run timer 10 times? Use it like:

      
    local n = 0 
    timer = setTimer(function() 
        outputChatBox("Number: "..n) 
        n = n + 1 
    end, 1000, 10) 
      
    

    • Like 1
  2. First, work from the start. Make one vehicle and apply tinted windows for it.

      
    local shader = dxCreateShader("tint.fx", 1, 0, true) -- Create a shader 
    local vehicle = createVehicle(411, 0, 0, 4) -- This will create a vehicle on that GTA farm - in center of GTA map 
    -- Apply that shader we created to vehicle(s) 
    engineApplyShaderToWorldTexture(shader, "vehiclegeneric256", vehicle) -- Apply shader to windows of vehicle 
      
    

      
    technique tint { 
        pass P0 { 
            DepthBias = 0.0000; 
            AlphaBlendEnable = FALSE; // Disable alpha blending 
            SrcBlend = SRCALPHA; // Source blend factor 
            DestBlend = INVSRCALPHA; // Destination blend factor 
        } 
    } 
      
    // Fallback method 
    technique fallback { 
        pass P0 { 
            // Normal drawing 
        } 
    } 
      
    

    Note: You don't need to load shaders for each vehicle. Only 1 is required, then you can apply that to many elements.

  3. With HTTP username and password you can call functions in MTA server via PHP. That needs an account on MTA server which must have special privileges. It is all explained on wiki. You don't need to fill those variables, but if you want to call function on server, you can just put username and password as arguments of SDK call function.

  4. Any errors in debugscript? Is the script server sided?

    Try:

    function onQuit() 
        local acc = getPlayerAccount(source) 
        if not isGuestAccount(acc) then 
            local walk = getPedWalkingStyle (source) 
            setAccountData(acc, "wstyle", tonumber(walk)) 
        end 
    end 
    addEventHandler("onPlayerQuit", getRootElement(), onQuit) 
      
    function onLogin(_, acc) 
        local walk = getAccountData(acc, "wstyle") or 0 
        setPedWalkingStyle(source, tonumber(walk)) 
    end 
    addEventHandler("onPlayerLogin", getRootElement(), onLogin) 
    

×
×
  • Create New...