xBladex Posted October 25, 2011 Share Posted October 25, 2011 ok ok The problem is this I'm trying to create a script to grab the helicopter on the screen they found out the hunter but I do not work: (here it is!: S function someoneReachedHunter(number, sort, model) if sort == "vehiclechange" and model == 425 then 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 if mes_ID == 1 then dxDrawText("Hunter Reached!",-1,sy/3,sx-1,sy,tocolor(0,0,0,alfa*200),(2.5*sx/1920)*alfa*0.2,ffsfont,"center","center",true) dxDrawText("Hunter Reached!",0,sy/3,sx,sy,tocolor(255,0,0,alfa*255),(2.5*sx/1920)*alfa*0.2,ffsfont,"center","center",true) elseif mes_ID == 2 then dxDrawText("Hunters Fight!",-1,sy/3,sx-1,sy,tocolor(0,0,0,alfa*200),(2.5*sx/1920)*alfa*0.2,ffsfont,"center","center",true) dxDrawText("Hunters Fight!",0,sy/3,sx,sy,tocolor(255,0,0,alfa*255),(2.5*sx/1920)*alfa*0.2,ffsfont,"center","center",true) addEvent("onHunterEvent",true) addEventHandler("onHunterEvent",getRootElement(),start_drawing) end end addEvent("onPlayerPickUpRacePickup",true) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),someoneReachedHunter) --end forgive a mistake if I'm bad at this Link to comment
Castillo Posted October 26, 2011 Share Posted October 26, 2011 (edited) -- client side: local mes_ID = 0 local enabled = false local sx, sy = guiGetScreenSize() local getTickStart = getTickCount() function someoneReachedHunter(ID) mes_ID = tonumber(ID) if enabled then removeEventHandler("onClientRender",root,drawHunterReached) enabled = false else addEventHandler("onClientRender",root,drawHunterReached) enabled = true end end addEvent("onHunterEvent",true) addEventHandler("onHunterEvent",getRootElement(),someoneReachedHunter) function drawHunterReached() 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 if mes_ID == 1 then dxDrawText("Hunter Reached!",-1,sy/3,sx-1,sy,tocolor(0,0,0,alfa*200),(2.5*sx/1920)*alfa*0.2,ffsfont,"center","center",true) dxDrawText("Hunter Reached!",0,sy/3,sx,sy,tocolor(255,0,0,alfa*255),(2.5*sx/1920)*alfa*0.2,ffsfont,"center","center",true) elseif mes_ID == 2 then dxDrawText("Hunters Fight!",-1,sy/3,sx-1,sy,tocolor(0,0,0,alfa*200),(2.5*sx/1920)*alfa*0.2,ffsfont,"center","center",true) dxDrawText("Hunters Fight!",0,sy/3,sx,sy,tocolor(255,0,0,alfa*255),(2.5*sx/1920)*alfa*0.2,ffsfont,"center","center",true) end end -- server side: function vehicleDetector(pickupID, pickupType, vehicleModel) if (pickupType == "vehiclechange") then if (vehicleModel == 425) then triggerClientEvent(source,"onHunterEvent",source,1) end end end addEventHandler("onPlayerPickUpRacePickup",getRootElement(),vehicleDetector) Edited October 26, 2011 by Guest Link to comment
karlis Posted October 26, 2011 Share Posted October 26, 2011 is getTickStart defined? Link to comment
Castillo Posted October 26, 2011 Share Posted October 26, 2011 I defined it now, as it wasn't in his script I forgot to. Link to comment
xBladex Posted October 27, 2011 Author Share Posted October 27, 2011 Ok now the problem is in the goal I have everything ready but now these files and ffs_font font_ffs as devo put in goal? Help me please thanks Link to comment
Castillo Posted October 27, 2011 Share Posted October 27, 2011 Excuse me, what? was this even your script? becuase it doesn't look like it was. ffsfont seems to be a font file, but you didn't had it in the script. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now