Jump to content

karlis

Members
  • Posts

    1,314
  • Joined

  • Last visited

Everything posted by karlis

  1. i like it, sometimes drawing with dx and .png(only standard format that have transparency) causes problems, need alternative(not sure, does .dds work better, didn't test yet)
  2. setPlayerFOV serverside setFOV clientside i suppose
  3. karlis

    _G

    everything that is variable and is not local is stored in _G
  4. GTAIV style hud >>>DOWNLOAD<<< I'm making a new hud, iv style heres current progress(the border is now changed, watch screens from community page): FEATURES Radar -full rotation support -velocity change zoom, just like in original hud -possibility to put own map files on it -controllable additional, smooth zoom (hold keys: - and = ) -round shape -correctly handling being out of world bounds -altimeter Blips -all ingame blips supported -blip size, color support -blips is drawn in getBlipOrdering() order -standart blip(id 0) shows up or down -blips with id 2 and 3 support rotation, in case they are attached to someone/something -by default north and player blip is added -possibility for loading custom blip icon, by doing following: setElementData(yourBlip,"customBlipPath","your_path_here.png") heres list of other blips included, that are not standard(do the code shown above, with filepath as described below) "images/blips/vehicle.png" --romb shape blip with another romb inside "images/blips/pedvehicle.png" --romb shaped blip "images/blips/ped.png" --small round blip "images/blips/pickup0.png" --small hearth, used for hp pickup representation "images/blips/pickup1.png" --armor icon, used for armor pickup representation "images/blips/pickup2.png" --small pistol icon, used for weapon pickup representation -tagging blips with text by default text shows for vehicle and player attached blips, showing vehicle name or nick(nick is colored appropriate) you can color-code the text with #RRGGBB code. can be changed by setElementData(theBlip,"blipText",text) --3rd arg: nil/false=default, true=don't draw, string=your text -HD(32*32)blips, no more ugly blurry blips from default SA(thanks to Aiboforcen) Radio HUD -animated -with cool icons -fading when not used [future]ability to connect to custom audio stream with it HP and Armor bar -round shape hp and armor bar around the radar -precision of bar: +/- 1%(basically full precision) -in case there's no armor full ring is used for drawing hp -if you have hp under 10% hp bar is red and flashing -damage showing on radar like a blurred red section, when getting hit(like in shooter games, all around red if just damage, right rotation if got hit by gun) -in RACE gamemode hp & armor replaced with vehicle hp and speed(not implemented yet) Round and Rectangular radar Areas -full support for all rectangular radar area features -brand new (!) circular radar areas functions(use exports.IVhud:functionName(args) ): they works both clientside and serverside element/boolean createRoundRadarArea(float x,float y,float radius,int r,int g,int b,int a) --[[ x and y: pos on the world radius: radius of area on the world r,g,b and a:4last args optional, the color of radar area(default:white, 150alpha) returns false if invalid args, element of "roundradararea" type if sucessful ]] boolean/float float float roundRadarAreaDimensions(element area,float x,float y,float radius) --[[ sets and gets position and radius of specified area call it with only 1st argument to return pos and radius of area, call with all 4 to set them boolean/int int int int roundRadarAreaColor(element area,int r,int g,int b,int a) --[[ sets and gets radar area color call it with only 1st argument to return color, call with all 5 to set the color boolean isElementInRoundRadarArea(element theElement,element area) --[[checks is particular element inside the round radar area returns boolean boolean/table getElementsInRoundRadarArea(element area,string elemType) --[[ gets all elements in particula round radar area, filters them by type, if elemType specified. returns table(may be empty) or false if invalid arguments boolean/int int int int int string float float float roundRadarAreaFlashing(element area,int interval,int r2,int g2,int b2,int a2,sting easetype,float easeperiod,float easeamplitude,float easeovershoot) --[[ makes round radar area flash. interval: how long will the flash/interpolation go before reaching the edge r2,g2,b2,a2: second color for the flash, first being the normal one. easetype: any type of easing used for interpolation of colors NOTE: "Binary" is aviable aswell-it just switches from color1 to color2 and back without easing. easeperiod,easeamplitude,easeovershoot: arguments for the easing, OPTIONAL to turn flashing off call it with only first 2 arguments. to return all arguments specified before(except area itself ofc) call it only with first argument. weapon/wanted/money hud: -each weapon has own gtaIV style icon, and ammo displayed -both money and weapon fades out if not used, just like in GTAIV -"show all" key, shows all information and weapon even when they normally would be hidden -money hud IV style, showing only when changing, also showing income/outcome(eg. -10000$) -wanted stars, flashing if just changed, hidden if no wanted level information hud(show it with num+ key): -shows vehicle name -shows zone name -shows city name -shows fps -shows time settings: -resize/drag corresponding windows to change pos and size of components -F3 to enter the settings mode -resetting to default setting -colour change tab for almost all colours in game -tab to turn off particular parts help needed: info about: 1)rate of oxygen decreasing 2)rate of oxygen increasing 3)effect with full oxygen skill 4)vehicle oxygen degrease rate CREDITS: 32*32pixel very cool blips,few weapon icons,higher quality rings for the radar and many tips : Aibo function for getting correct camera rotation and velocity effect on zoom : Talidan (customblips resource) other weapon icons : Dre-+- (new_hud resource), el_motoblock, and Alexander Blade
  5. karlis

    Circular Radar

    already making correct topic
  6. karlis

    Circular Radar

    made blips support, but more features added, more problems appeared. hp and armor looks blocky, dunno can i fix that, seems that when dxdraw gets an angle it blurs out the borders of pic making it lighter on sides. EDIT:oh lol, you cant see the hp and armor being blocky on pics, only ingame.thats strange... ill make a WIP topic soon, keep an eye in resources section.
  7. so, i am making new IVhud resource, and i need to add blip support to it. how could i get visibleDistance for a blip?i cant find such a function.
  8. karlis

    Circular Radar

    Omg, this looks awesome! Will you release it to public when you are done? yes, but long way to go, need fix very many bugs, plus need add blip rendering, and wanted lvl/weapon/money/time hud. i also have problem that rotated dximage has light border, when the color itself is darker, therefore making hp and armor look not that good.
  9. local colorcode=nick:sub(nick:find("#%x%x%x%x%x%x")) ?
  10. karlis

    Circular Radar

    heres updated version: got the zoom working, made IVstyle hp and armor bar, and almost fixed the inaccuracy(its now a bit notable only on small resolutions) (the white borders around dx drawings is from printscreen, theyre not there in real.) as you propably got, it will be my next resource
  11. so the matching fails.strange try nick:match("#%x%x%x%x%x%x")
  12. check, do you have it in folder, show full meta
  13. you have to wait for 1.1 to release. most likely mapmanager will have handling option added then.
  14. nice, also you could add attachObject support this way: when player choose object you make it setElementCollisionsEnabled(object,false) then you check for vehicle and object sizes(getElementBoundingBox) , and, if object is bigger then vehicle, scale down the object(setObjectScale) on the sizes of vehicle then attach the object, and allow to change attach offset(propably also scaling down the object further would be nice) lots of scripting, but would add another dimension into tuning also don't forget handling functions will be on 1.1, so make spoilers/sideskirts/etc actually change grip/axeleration and add something like turbo
  15. thats ped health, not zombie use setElementHealth
  16. karlis

    Circular Radar

    srry for doublepost again, but mayor update! yes, it is lil inacurate atm(dunno will i be able to fix that), but it works!(rotation too) (yes, this is made by many dxDrawImageSection, not just 1 image)
  17. karlis

    Circular Radar

    ill still try it with those rectangles, did write too much to stop now. and suggestion of that is already made(check topic by me)
  18. karlis

    findPlayer

    returns false if more then 1 player found, player, if 1 found, nil, if none found function findPlayer(nickpart) local players=getElementsByType("player") local matches={} for _,v in pairs(players) do if string.find(string.lower(getPlayerName(v)),string.lower(nickpart)) then table.insert(matches,v) end end if #mathces>1 then return false else return mathces[1] end end
  19. you need to see image when zombie is behind wall or when it is not? if when not you need to put "if not hit then "
  20. have to be serverside function mp() n1 = math.random(1,3) n2 = math.random(1,3) na = n1*n2 outputChatBox("The Math Problem Is "..n1.." X "..n2.." = ?") end setTimer(mp,60000,0) --u don't want every 5sec, do you?i put 1minute function onChat ( message, messageType ) if tonumber(message) == na then outputChatBox("Good Job") end end addEventHandler ("onPlayerChat",getRootElement(),onChat)
×
×
  • Create New...