
Overkillz
Members-
Posts
545 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Overkillz
-
Some help to remplace getPedOccupiedVehicle(localPlayer) ?
-
Hey everyone, How are u ? I hope u are ok ^^ I will like to about getVehicleOccupants I have made a Info radar, which is using addEventHandler("onClientRender", root, function ( source ) local playerVehicle = getPedOccupiedVehicle(localPlayer) if playerVehicle then dxDrawImage(posx,posy*1.25,height,height2, "data/radar/info.png",0,0,0,tocolor(255,255,255,255)) -- Info Imagen end end) InfoRadar is showed when the player is in vehicle, dat works perfectly with 0 km/h, but When a player has a hight velocity like 221 km/h and press enter, the radar still showing even if he is died. There is some method fix it ? I will like to do it if the player is died, don't show it, and the player is alive or training, then yes. I hope u can help me. Regards.
-
For example, would be like this local maplist = exports.mapmanager:getMaps() function isanexample() code.... code... dxDrawText ("Total Maps:"..maplist.." !",x,y,tocolor ( 0, 0, 0, 255 ), 1.02,255,255,255,true) Should be like this right ?
-
Hey everyone, I hope you can help me with these little things which I need. Actually, I have a DM Server (Race[DM]) Im using a dx to draw how many maps there are in the server, but I don't know the functions and events to use. If you can tell me please. Thanks and Regards ^^
-
Thanks, it works perfectly <3
-
Hey guys, Im here again with a problem, I hope u can help me and tell me why this doesn't work ;( ------------------------------------------------------------ ---------------- Hunter Message -------------------------- ------------------------------------------------------------ local sx,sy = guiGetScreenSize() drawing = false function start_drawing() drawing = true removeEventHandler("onClientRender",getRootElement(),draw_message) addEventHandler("onClientRender",getRootElement(),draw_message) setTimer(stop_drawing,5000,1) getTickStart = getTickCount () end function stop_drawing() removeEventHandler("onClientRender",getRootElement(),draw_message) drawing = false end function draw_message() local getTickNow = getTickCount () - getTickStart if getTickNow <= 1000 then alfa = getTickNow/1000 elseif getTickNow >= 4000 then alfa = (5000-getTickNow)/1000 else alfa = 1 end alfa = alfa * alfa * alfa dxDrawColorText("#ff0000Hunter #00ff00Reached",0,sy/3,sx,sy,tocolor(255,255,255,alfa*255),(2.5*sx/1920)*alfa*1.6,"default-bold","center","center",true) end addEvent("onHunterEvent",true) addEventHandler("onHunterEvent",getRootElement(),start_drawing) DebugScript 3: - http://puu.sh/bdbFP/53119d8f26.jpg Regards.
-
Thanks for ur help guys, I could fix it with somethings. Regards.
-
Ops, I had forgotten add dxSetAspectRatioAdjustmentEnabled , but It doesn't work too It is showing the same problem fro 1440 x 900
-
Fixed, copy again. Thanks IYAMA. Thanks, but its similar to my code, why ? I tested it in 2 resolutions: Script: local sx,sy = guiGetScreenSize() addEventHandler("onClientRender",root, function () if isPedInVehicle(localPlayer) then local veh = getPedOccupiedVehicle(localPlayer) if veh and isElement(veh) then local ch,tw = getElementHealth(veh)-250, sx*(170/1920) local ch = ch / 750 * 50 --dxDrawRectangle(sx*(844/1920), sy*(10/1080), tw, sy*(24/1080), tocolor(0, 255, 0, 150), true) if ch >= 0 then ------------------------- HEALTH ------------------------- dxDrawRectangle(sx*(57/1920), sy*(994/1080), ch*tw/100, sy*(7/1080), tocolor(0, 255, 0, 255), true) end end end end ) ---------------------------- Regards.
-
Thanks but I can't see any rectangle. Its something wrong ?
-
I put a position in 1920x1080 and after I change to 1440x900 and it has a different size.
-
If Im using this dxDrawRectangle(sx*0.9, sy*0.9, sx*83/1000*vehicleHealth, sy*4, tocolor(100, 254, 46, 255), true) -- Health dxSetAspectRatioAdjustmentEnabled( true ) I cant put a right position
-
Doesn't work, Now I can't see the bar
-
Hello dear community, I have a problem with a health using dxDrawRectangle, there isn't in the same position in all resolutions, how I can do it ? local sx,sy = guiGetScreenSize() local px,py = 1920,1080 local x,y = (sx/px), (sy/py) addEventHandler("onClientRender", root, function ( source ) local playerVehicle = getPedOccupiedVehicle ( getLocalPlayer() ) if playerVehicle then local vehicleHealth = getElementHealth ( playerVehicle ) dxDrawRectangle(x*58, y*997, x*83/1000*vehicleHealth, y*4, tocolor(100, 254, 46, 255), true) -- Health end end) I hope u can help me, thanks
-
I mean that for the color red be 5 seconds and after change to a random color, the random color be 2 seconds and after back to red color and be for 5 seconds again in red color, after it change to random color and be on it 2 seconds (on the random color) and back to red ....etc Infinite times. If u can't, isn't a problem, this helped me a lot of. Thanks <3
-
Thanks newly, but as I told u, it doesnt take the right seconds on x color Red color : 5 seconds being Random Color: 1 second being and change to red again (5 seconds in red) and 1 second in random color for infinite times.
-
Thanks so much, I made a modification of seconds local colors = { {r=255,g=0,b=0}, -- SYNTAX: {r=rValue, g=gValue, b=bValue}, } times = nil team = createTeam ( "Team Name" ) function idkname () for k,v in ipairs(colors) do if times == "random" then setTeamColor(team, math.random(0,255), math.random(0,255), math.random(0,255)) times = "rgbcolor" return end if isTimer(timer) then killTimer(timer) timer = setTimer(idkname, 1000, 0) end times = "random" setTeamColor(team, v.r, v.g, v.b) end end timer = setTimer(idkname , 5000, 0) But it doesn't work, for example, every seconds is changin of color, doesnt take 5 seconds in red, always is 1 second
-
It is working perfectly, a lot of thanks, now u can do the last thing, Con u set 2 setTimer, for example, for Primary Color: 255,0,0 (When we are on this color, take 5 seconds to change) Second Color : Random (When we are on this, take 2 seconds to change) Thanks newly ^^ <3
-
Huston, we have a problem line: 10
-
But I wont if R get 255 set that color, I want First color : 255,0,0 Second Color: random First color, after a second random color, after a second red color, after a second a new random color.... Infinite times Did u understand me ?
-
It doesnt work, It still giving a random color.
-
Any suggestion to research about it ?
-
A lot of thanks, to the rest of person too ^^, Now I will like use "else" For example, a color will be 255,0,0 and the other a random color, I will like to change it every second to a random, and after a second back to the red color, after a second a new random color and after a second back to the red color ....etc It is possible ?
-
Doesnt work too, and Already tried ;( Thanks for try to help me.