Jump to content

[PXG]Blue

Members
  • Posts

    149
  • Joined

  • Last visited

Posts posted by [PXG]Blue

  1. I dont know how to make safe zone on place witch i want

    Tutorial:

    How to Create a Safezone:

    In the newest update i added an export, here is how to use this export:

    Go into your Script File, make sure its server sided.

    The Function is called:

    exports.addon_dayzsafezone:createSafeZone()

    Arguments:

    x,y,z,radius

    x - The x coordinate

    y - the Y coordinate

    z - the Z coordinate

    radius - the Radius, how big the colsphere will be.

    Example:

      
    function createMySafeZones() 
    exports.addon_dayzsafezone:createSafeZone(0,0,0,20) -- Creates a 20 m wide Safezone at the coordinates 0,0,0 
      
      
    end 
    addEventHandler("onResourceStart", getResourceRootElement(getThisResource)), createMySafeZones) 
      
      
      
    

  2. Hello, i'm experiencing a problem with my Script, when i set my Player's dimension and use setCameraMatrix, the vehicle isn't visible, nor is the player, any ideas?

      
      
    setElementInterior(localPlayer, 0) 
    dim = math.random(0,1000) 
      
      
    setElementPosition(hisVeh, vehPosx, vehPosy, vehPosz) -- predefined somewhere else 
    setElementRotation(hisVeh, 0, 0, 120) 
    setElementDimension(localPlayer, dim) 
    setElementDimension(hisVeh, dim) 
    setElementFrozen(hisVeh, true) 
      
      
    

  3. Hello, i'm trying to make my server use MySQL instead of MTA's system, but i'm experiencing a problem, when i try to save the account data it doesnt get saved in the database and the mysql_free_result just says "result expected, got nil"

    Here is my Working code:

         
     result = mysql_query(handler, "INSERT INTO test (Name) VALUES ( 'meh' )") 
         mysql_free_result ( result ) 
      
    

    b5703d7d2a.png

    And this is one doesnt work:

      
         result = mysql_query(handler, "INSERT INTO players (Name, Serial, IP, Last_login, drift_score, drift_best, playtime_m,playtime_h, money, posx, posy, posz, int, dim) VALUES ( 'beh', 'behewahh', 'adgagd', '244sdfa', '0', '0', '0', '0', '0', '0', '0', '0','0','0' )") 
         mysql_free_result ( result ) 
      
    

    488a29a286.png

    Any ideas?

    Greetings!

  4. You can use something like the dynamic vehicle lights resource to re-add them.

    The shine on the Road doesnt get removed, but vehicles use 2 Coronas, 1 Corona thats used globally and 1 Corona thats for cars Specific, for some reason, so car lights dont get affected that much, but they are still not as bright anymore

  5. You can't really replace the original audio, but you could mute all original audio and play your own (will require quite a lot of reverse engineering to get the new audio to work like the original, e.g. skidding on roads etc)

    If you only want Engine sounds and weapons thats not too hard, theres alot of Weapon sound scripts around, and i made a Vehicle sound script wich i might release soon

  6. Hi, i have GTA SA ( 2.0 ) on a Disk, reinstalled it because i had some issues with Shaders,

    Downgraded it using the patcher linked in the forums, installed MTA.

    Everytime i try to join my server, it works fine until i try to spawn a car or car models finish loading ( like they do after the external download )

    I tried to spawn a car, it was partially invisible, my FPS dropped to three until eventually mta crashed, since then it crashes as soon as the car mods finish download, here is the error message:

      
    Version = 1.5.1-release-7618.0.000 
    Time = Fri Nov 13 21:02:25 2015 
    Module = C:\WINDOWS\SYSTEM32\KERNELBASE.dll 
    Code = 0xE06D7363 
    Offset = 0x000B3E28 
      
    EAX=0029E8F8  EBX=6CEF3A00  ECX=00000003  EDX=00000000  ESI=5CF2C7FC 
    EDI=0029E9A4  EBP=0029E954  ESP=0029E8F8  EIP=75423E28  FLG=00200212 
    CS=0023   DS=002B  SS=002B  ES=002B   FS=0053  GS=002B 
      
    

    Logfile.txt:

      
    21:02:25 - [DEBUG] BeginEventLog 
    21:02:25 - [DEBUG] DLL_PROCESS_ATTACH 00000000 
    21:02:25 - [DEBUG] CLocalization::CLocalization Localization set to 'en_US' 
    21:02:25 - [DEBUG] Loader - Finishing 
    21:02:25 - [DEBUG] DLL_PROCESS_DETACH 00000001 
      
    

    EDIT:

    MtaDiag Log:

    http://pastebin.mtasa.com/662613019

    my Specs:

    Win 10 64 Bit

    16 GB RAm

    AMD R7 260x ( 2GB VRam )

    FX- 8320 3.5 Ghz

    1.5tb hard drive ( over 300gb free )

    Processor Temp ~28°C

    Greetings!

  7. Note:

    Two or more lights will apply illumination effects to everything (excluding objects) that is in range of...

    Exactly this, anyways, i now used Dynamic Lights Shader, wich i didnt want to use originally because of Possible performance Problems

    Greetings

  8. You can detect it with:

    local camPosX, camPosY, [color=#FF0000]camPosZ[/color] = getPedBonePosition ( lp, 8 ) 
    

    Line: 46 t/m 69 is for the leaning left and right, you can rip it out < reason why I compile my scripts....

    Thanks for the Help,

    also, i dont get this hate when i ask for help when editing a script thats not mine, thats why many people DONT compile their scripts, so others can be creative.

  9. Hello, i have a script here ( its not made by me nor do i claim ownership of it ) wich enables first person, and i need a little help making it register height changes, because as of yet it only registers changes if i'm going left or right

    EDIT: is it also possible to remove the character leaning to the left / right when steering?

    here my code:

    local rotX, rotY = 0, 0 
    local camVehRot = 0 
    local rot = 0 
      
    local curVehRot = 0 
    local oldVehRot = 0 
      
    local egoEnabled = false 
      
    local mouseSensitivity = 0.1 
      
    local delay = 0 
      
    lp = getLocalPlayer() 
    local PI = math.pi 
      
      
    function vehAlpha() 
    setElementAlpha(lp,0) 
    end 
    addEventHandler("onClientPlayerVehicleEnter",root, vehAlpha ) 
      
    function vehAlpha2() 
    setElementAlpha(lp,255) 
    end 
    addEventHandler("onClientPlayerVehicleExit",root, vehAlpha2 ) 
    local function freecamFrame ( slice ) 
      
      
        local camPosX, camPosY, camPosZ = getPedBonePosition ( lp, 8 ) 
         
        local angleZ = math.sin(rotY) 
        local angleY = math.cos(rotY) * math.cos(rotX) 
        local angleX = math.cos(rotY) * math.sin(rotX) 
         
        local camTargetX = camPosX + ( angleX ) * 100 
        local camTargetY = camPosY + angleY * 100 
        local camTargetZ = camPosZ + angleZ * 100 
         
         
        if isPedInVehicle(lp) then 
        setElementAlpha(lp,0) 
        else 
        setElementAlpha(lp,255) 
        end 
        local veh = getPedOccupiedVehicle ( lp ) 
        if veh then 
             
            local rx, ry, curVehRot = getElementRotation ( veh ) 
            local changedRotation = oldVehRot - curVehRot 
             
            oldVehRot = curVehRot 
             
            if not totalRot then 
                totalRot = curVehRot 
            end 
             
            totalRot = changedRotation * 2 + totalRot 
             
            local rotX = ( ( rotX * 360 / PI ) + totalRot ) / 360 * PI 
            if rotX > PI then 
                rotX = rotX - 2 * PI 
            elseif rotX < -PI then 
                rotX = rotX + 2 * PI 
            end 
             
            camTargetX = camPosX + ( math.cos(rotY) * math.sin(rotX) ) * 100 
            camTargetY = camPosY + ( math.cos(rotY) * math.cos(rotX) ) * 100 
        end 
         
        setCameraMatrix ( camPosX, camPosY, camPosZ, camTargetX, camTargetY, camTargetZ ) 
    end 
      
    local function freecamMouse (cX,cY,aX,aY) 
      
        if isCursorShowing() or isMTAWindowActive() then 
            delay = 5 
            return 
        elseif delay > 0 then 
            delay = delay - 1 
            return 
        end 
         
        local width, height = guiGetScreenSize() 
        aX = aX - width / 2  
        aY = aY - height / 2 
         
        rotX = rotX + aX * mouseSensitivity * 0.01745 
        rotY = rotY - aY * mouseSensitivity * 0.01745 
      
        if rotX > PI then 
            rotX = rotX - 2 * PI 
        elseif rotX < -PI then 
            rotX = rotX + 2 * PI 
        end 
         
        if rotY > PI then 
            rotY = rotY - 2 * PI 
        elseif rotY < -PI then 
            rotY = rotY + 2 * PI 
        end 
         
        if rotY < -PI / 2.05 then 
           rotY = -PI / 2.05 
        elseif rotY > PI / 2.05 then 
            rotY = PI / 2.05 
        end 
    end 
      
    function setEgoEnabled (x, y, z) 
      
        if (x and y and z) then 
            setCameraMatrix ( camPosX, camPosY, camPosZ ) 
        end 
        addEventHandler("onClientPreRender", getRootElement(), freecamFrame) 
        addEventHandler("onClientRender", getRootElement(), freecamFrame) 
        addEventHandler("onClientCursorMove",getRootElement(), freecamMouse) 
    end 
      
    function setEgoDisabled() 
      
        if egoEnabled then 
            egoEnabled = false 
            removeEventHandler("onClientPreRender", getRootElement(), freecamFrame) 
            removeEventHandler("onClientRender", getRootElement(), freecamFrame) 
            removeEventHandler("onClientCursorMove",getRootElement(), freecamMouse) 
            setCameraTarget ( lp ) 
        end 
    end 
    addEventHandler ( "onClientPlayerWasted", getLocalPlayer(), setEgoDisabled ) 
      
    function ego_func () 
      
        if egoEnabled then 
            setEgoDisabled() 
        else 
            egoEnabled = true 
            local x, y, z = getElementPosition ( lp ) 
            setEgoEnabled ( x, y, z ) 
        end 
    end 
    addCommandHandler ( "ego", ego_func ) 
    addCommandHandler ( "fp", ego_func ) 
    addCommandHandler ( "fps", ego_func ) 
    addCommandHandler ( "firstperson", ego_func ) 
    

    thanks in advance

  10. Is there a way yet to increase the Headlights size ( the image that is drawn infront of the car, wich lightenes the road )?

    I tried to use Shaders, but these didnt Increase their size, as their texture is already on almost maximal size, and higher resolutions ( ofc ) don't do anything.

    Greetings

×
×
  • Create New...