Jump to content

karlis

Members
  • Posts

    1,314
  • Joined

  • Last visited

Everything posted by karlis

  1. oh duh tomorrow still remains tomorrow sorry could you work on other feats until that?i think u had a compromised version that did work in some way.
  2. no, i didnt fix yet what i got broken from the feat side i plan doing only 1 more thing before release(the text for city, street, car name, time and fps), so with polishing and probably some picture adjustment, ill make it within 2weeks(that mean actual ~4work days, and yes im lazy)
  3. karlis

    need help

    swap gate arg and time to move
  4. karlis

    need help

    x is not defined then.
  5. 1)im not sure how mta detects, is it rgb, or color id, kinda think problem is there.try AT LEAST 2sets of rgb. 2)root is defined? 3)getElementsByType 4times a second is very expensive, don't call it that often.
  6. no, what's point of looping trough the table, if you can just get value from the gridlist itself once gridlist is made, u can forget about those tables.
  7. try specifying all 12 color arguments(rgb for 4colors) use serverside if want it synced, clientside, if want unsynced
  8. i edited, re-read it. i failed a bit with the 1st part
  9. you don't need to loop trough the bases to get current one, the reason of failure is that loop are getting kin/pos of last spawn, not current.
  10. its handled, if you look at it... timer has a player argument.
  11. karlis

    Greenzone

    create colshape of greenzone bounds, and green radar area, and cancel onPlayerDamaged if youre inside the colshape.
  12. what is exactly the problem/question?
  13. yep, servers sided-only what you want protected and/or synced. ___ 1) check wiki, theres a gamemode example 3)https://wiki.multitheftauto.com/wiki/ACL 4)you better off first checking some scripts(for instance freeroam) and edit them.
  14. most likeley you will need to edit the .dff too, because most cars don't have texture for the body, and shaders are applied to textures...
  15. u have to specify only 3args in vehicle colors, if u want 1st color rgb, plus syntax error at line 38
  16. gta is such poorly desgined good on low fps: cycling sprint, boats, swim, run, speedtapping, planes(not sure about this 1) good on high fps: car acceleration also high fps gives just ridiculous flashing of hp bar/wanted stars, and silly look of car shaking
  17. somewhy model id was changed to default( its 1337 i think), change it back in options.
  18. viewtopic.php?f=91&t=35778 already discussed there. basically create a .fx file and apply it to paintjob texture.
  19. just fyi laptop like mine, bought it this june: CPU: AMD Turion II X2 P540 2.4ghz dual core, 1.8ghz HyperTransport, 2MB L2 chache RAM: 3gb DDR3 1066mhz GPU: ATI Mobility Radeon HD5650, 25.6gb/s DDR3-VRAM 800mhz 1gb memory, 450-650mhz core clock, shader model5/dx11 HDD: 500gb 5400rpm OS: WIN7 HP 64bit (came with laptop) + wifi b/g/n, 1.3mpx web cam, DVD super multi DL drive, 1366x786 16:9 15.6inch LED screen costed me 285Ls(401.97Euro) runs very smoothly, with highes graphics still solid 50-80fps if not very much ppl around. runs almost any game on mid or midhigh graphics. my advice is: if u go for cheap, go for AMD/ATI, yes theyre bit worse then intel and/or nvidia, but bang for the buck is much better.for example for the ~same cost i could get this cpu in my pc, or like 4-5year old pentium dual core with just 2.0ghz, guess which is better?
  20. tried to make the radar transparent, but besides even more dx functions and breaking 50things it also made this problem: http://bugs.mtasa.com/view.php?id=6547 i see i can premultiply the images, but they look worse when premultiplied and thats even more complicated. so ppl, should i bother with the transparency or leave it opaque?
  21. kind of camera shaking instead of moving? if thats the case try changing the mouse inversion setting to false EDIT: i think that's not, i will give it a test tomorrow, but no gurantee on fixing, i need to fix 2 more broken scripts lol.
  22. error reports? what is wrong? crashes? invalid movement? sorry i really cba starting server myself for now
  23. what you mean by up beyond decision(dont know such a phrase, srry)? PS:you don't have to redefine a table each frame...
  24. local zoom=10 --how far is camera target from ufo local mouseFrameDelay = 0 local ratio = 3 --how many times distance from camera to ufo is smaller then distance from ufo to camera target local mouseSensetivity = 0.25 --ovbious much? local width, height = guiGetScreenSize() local PI = math.pi local hit local zOffset = 3 --how much the camera is higher then ufo itself. -- state variables local speed = 0 local rotX, rotY = 0,0 -- configurable parameters local options = { invertMouseLook = false, normalMaxSpeed = 2, slowMaxSpeed = 0.2, fastMaxSpeed = 12, smoothMovement = true, acceleration = 0.3, decceleration = 0.15, maxYAngle = 188, key_fastMove = "lshift", key_slowMove = "lalt", key_forward = "w", } local rootElement = getRootElement() local getKeyState = getKeyState do local mta_getKeyState = getKeyState function getKeyState(key) if isMTAWindowActive() then return false else return mta_getKeyState(key) end end end --heavily modified freecam resource's core function freecamFrame() local cameraAngleX = rotX local cameraAngleY = rotY local freeModeAngleZ = math.sin(cameraAngleY) local freeModeAngleY = math.cos(cameraAngleY) * math.cos(cameraAngleX) local freeModeAngleX = math.cos(cameraAngleY) * math.sin(cameraAngleX) local camPosX, camPosY, camPosZ = getElementPosition(ufo) local camPosZ = camPosZ + zOffset local mspeed = options.normalMaxSpeed if getKeyState ( options.key_fastMove ) then mspeed = options.fastMaxSpeed elseif getKeyState ( options.key_slowMove ) then mspeed = options.slowMaxSpeed end if options.smoothMovement then local acceleration = options.acceleration local decceleration = options.decceleration -- Check to see if the forwards key are pressed local speedKeyPressed = false if getKeyState ( options.key_forward ) then speed = speed + acceleration speedKeyPressed = true end -- If no forwards key were pressed, then gradually slow down the movement towards 0 if not speedKeyPressed then speed = speed - decceleration end -- Check the ranges of values - set the speed to 0 if its very close to 0 (stops jittering), and limit to the maximum speed if speed < decceleration then speed = 0 elseif speed > mspeed then speed = mspeed end else speed = 0 if getKeyState ( options.key_forward ) then speed = mspeed end end -- Update the camera position based on the forwards/backwards speed camPosX = camPosX + freeModeAngleX * speed camPosY = camPosY + freeModeAngleY * speed -- calculate a target based on the current position and an offset based on the angle local camTargetX = camPosX + freeModeAngleX * zoom local camTargetY = camPosY + freeModeAngleY * zoom local camTargetZ = camPosZ + freeModeAngleZ * zoom camPosX = camPosX - ( camTargetX - camPosX ) / ratio camPosY = camPosY - ( camTargetY - camPosY ) / ratio camPosZ = camPosZ - ( camTargetZ - camPosZ ) / ratio if not isLineOfSightClear(camPosX,camPosY,camPosZ,camPosX,camPosY,camPosZ,true,true,true,true,false,true,false,localPlayer) then _,camPosX,camPosY,camPosZ=processLineOfSight(camPosX,camPosY,camPosZ,camPosX,camPosY,camPosZ,true,true,true,true,false,true,false,false,localPlayer) end -- Set the new camera position and target setElementRotation(ufo,0,0,math.deg(rotX)) setCameraMatrix ( camPosX, camPosY, camPosZ, camTargetRealX, camTargetRealY, camTargetRealZ ) end function freecamMouse(_,_,aX,aY) --ignore mouse movement if the cursor or MTA window is on --and do not resume it until at least 5 frames after it is toggled off --(prevents cursor mousemove data from reaching this handler) if isCursorShowing() or isMTAWindowActive() then mouseFrameDelay = 5 return elseif mouseFrameDelay > 0 then mouseFrameDelay = mouseFrameDelay - 1 return end if options.invertMouseLook then aY = -aY end -- how far have we moved the mouse from the screen center? aX = aX - width / 2 aY = aY - height / 2 rotX = rotX + aX * 0.01745 * mouseSensetivity rotY = rotY - aY * 0.01745 * mouseSensetivity 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 -- limit the camera to stop it going too far up or down - PI/2 is the limit, but we can't let it quite reach that or it will lock up -- and strafeing will break entirely as the camera loses any concept of what is 'up' if rotY < -PI / 3 then rotY = -PI / 3 elseif rotY > PI / 3 then rotY = PI / 3 end -- work out an angle in radians based on the number of pixels the cursor has moved (ever) end report bugs if any. ufo elem is ur ufo btw.
×
×
  • Create New...