Jump to content

OrbTanT

Members
  • Posts

    226
  • Joined

  • Last visited

Everything posted by OrbTanT

  1. OrbTanT

    countdown

    More on the timer will be showing 3:00?
  2. OrbTanT

    countdown

    I don't understand very well, I was trying to do something as soon as you open the dxdrawtectangle, start to count down from 3 minutes(3:00).
  3. OrbTanT

    countdown

    Anyone has any idea of how to create a countdown in dxdrawtectangle?
  4. OrbTanT

    countdown

    I tried to use missiontimer more I don't understand very well how it works, or how adds in a dxdraw
  5. OrbTanT

    countdown

    I was trying to do a count down in minutes, and in the case GetTickCount creates an account of 0 up to the time determined
  6. OrbTanT

    countdown

    How to create a countdown within a dxdrawrectagle addEventHandler("onClientResourceStart", resourceRoot, function() end ) addEventHandler("onClientRender", root, function() dxDrawRectangle(60, 320, 250, 175, tocolor(0, 0, 0, 175), true) dxDrawText("Score", 200, 325, 112, 356, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawText("Mortes:", 70, 365, 73, 340, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawText("Mortes:", 70, 405, 73, 340, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) dxDrawText("TEMPO:", 70, 450, 73, 340, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, true, false, false) end ) To operate in front of dxtext "Time"
  7. Please, someone help me?
  8. Then the problem is that I do not know if I concert the event of territory or the script in progress. In any case thank you for having helped me =)
  9. ET win, you that create the script, could concert for me, I found the error, was the system of the territory that I use territory local pArea = createRadarArea(2163.524169,2031.388061 , 150, 60, 255, 255, 255, 225 ) local pCuboid = createColCuboid (2163.524169,2031.388061 , 10, 197.5, 92, 30 ) addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("Gz Banco", 3, 0, 255, 0) end ) addEventHandler( 'onColShapeHit', pCuboid, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea, true ) outputChatBox( "#F08080[GANGZONES] #F8F8FFA gang ".. getTeamName(getPlayerTeam(player)).." esta atacando a gang / na #ff0000 GangZone Banco!",getRootElement(),255,255,255,true); triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 999); givePlayerMoney( player, 4000 ); outputChatBox( "#F08080[GANGZONES] #F8F8FFA gang ".. getTeamName(getPlayerTeam(player)).." dominou o #ff0000 A GangZona Banco #F8F8FFA da gang / ! ",getRootElement(),255,255,255,true); setRadarAreaFlashing( pArea, false ) end, 5000, 1 ) end else triggerClientEvent(player, 'group', player) end end ) If you want of course, you have already helped me a lot =)
  10. I have this territory well before that script, I thought it would be able to use, I think that I have to redo the territory to use the script, could help me?
  11. I found where the problem is, is in my territory, I don't know how to resolve local pArea = createRadarArea(2163.524169,2031.388061 , 150, 60, 255, 255, 255, 225 ) local pCuboid = createColCuboid (2163.524169,2031.388061 , 10, 197.5, 92, 30 ) addEventHandler("onResourceStart", resourceRoot, function() outputDebugString("Gz Banco", 3, 0, 255, 0) end ) addEventHandler( 'onColShapeHit', pCuboid, function( player ) if (getPlayerTeam( player )) then local pTeam = getPlayerTeam( player ) local iR, iG, iB = getTeamColor( pTeam ) local rR, gG, bB = getRadarAreaColor( pArea ) if ( iR == rR ) and ( iG == gG ) and ( iB == bB ) then triggerClientEvent(player, 'friendly', player) else setRadarAreaFlashing( pArea, true ) outputChatBox( "#F08080[GANGZONES] #F8F8FFA gang ".. getTeamName(getPlayerTeam(player)).." esta atacando a gang / na #ff0000 GangZone Banco!",getRootElement(),255,255,255,true); triggerClientEvent(player, 'time', player) triggerClientEvent(player, 'countdown', player) pArea1Timer = setTimer( function() setRadarAreaColor (pArea, iR, iG, iB, 999); givePlayerMoney( player, 4000 ); outputChatBox( "#F08080[GANGZONES] #F8F8FFA gang ".. getTeamName(getPlayerTeam(player)).." dominou o #ff0000 A GangZona Banco #F8F8FFA da gang / ! ",getRootElement(),255,255,255,true); setRadarAreaFlashing( pArea, false ) end, 5000, 1 ) end else triggerClientEvent(player, 'group', player) end end )
  12. Sure, I'm going to check again and see if I find the problem.
  13. I want not cause confusion
  14. There appears no error orange, only the last 2 errors which I quoted the top
  15. How can I fix this problem with the server is sending data before the client load?
  16. How can I fix this problem with the server is sending data before the client load?
  17. The error only occurs when I am within an area to dominate
  18. Help me, How can I correct the following errors Client: --Client --Remember you need to have 2 progressbars, because both teams can go and enter opposites area's. For more teams add more of course. local cProgressBar1 = guiCreateProgressBar(1, 1, 250, 50, false) local cProgressBar2 = guiCreateProgressBar(1, 50, 250, 50, false) local isRendering1 = false local isRendering2 = false function startFilling() if (isRendering1 == true) then if (guiProgressBarGetProgress(cProgressBar1) < 100) then --If the progress is less than 100, then... local gTime, g2, g3 = getTimerDetails(warTimer1) local gFormattedProgress = math.abs(math.floor((100/10000*gTime))) --Get the correct progress. A progressbar can be from 0 to 100, so do some math. (Mine sucks so this can be wrong... (A)) guiProgressBarSetProgress(cProgressBar1, gFormattedProgress) --After doing some math, set the progress. end end if (isRendering2 == true) then if (guiProgressBarGetProgress(cProgressBar2) < 100) then --If the progress is less than 100, then... local gTime, g2, g3 = getTimerDetails(warTimer2) local gFormattedProgress = math.abs(math.floor((100/10000*gTime))) --Get the correct progress. A progressbar can be from 0 to 100, so do some math. (Mine sucks so this can be wrong... (A)) guiProgressBarSetProgress(cProgressBar2, gFormattedProgress) --After doing some math, set the progress. end end end addEventHandler("onClientRender", getRootElement(), startFilling) function startTimer(gType) if (gType == "timer1") then warTimer1 = setTimer(function() startWar("Team1") end, 10000, 1) --Start the timer, start filling the progressbar isRendering1 = true elseif (gType == "timer2") then warTimer2 = setTimer(function() startWar("Team1") end, 10000, 1) --Start the timer, start filling the progressbar isRendering2 = true end end addEvent("onStartWarTimer", true) addEventHandler("onStartWarTimer", getRootElement(), startTimer) function stopTimer(gType) if (gType == "timer1") then if (isTimer(warTimer1)) then killTimer(warTimer1) end isRendering1 = false elseif (gType == "timer2") then if (isTimer(warTimer2)) then killTimer(warTimer2) end isRendering2 = false end end addEvent("onKillWarTimer", true) addEventHandler("onKillWarTimer", getRootElement(), stopTimer) server: --Server local marker1 = createMarker(1, 1, 1) local marker2 = createMarker(-1, -1, -1) local team1 = createTeam("Team1", 255, 0, 0) local team2 = createTeam("Team2", 0, 255, 0) function startWar(gType) if (gType == "Team1") then outputChatBox("'"..getTeamName(team1).."' is in the area of '"..getTeamName(team2).."' for too long, war time!") elseif (gType == "Team2") then outputChatBox("'"..getTeamName(team2).."' is in the area of '"..getTeamName(team1).."' for too long, war time!") end end function startWarTimer(tElement) if (source == marker1) then --Marker of Team1 was hitted if (getElementType(tElement) == "player") then --Check or the element is a player if (getPlayerTeam(tElement) == team2) then --Check or he is in the opposite team warTimer1 = setTimer(function() startWar("Team2") end, 10000, 1) --Start the timer (For Team2), if he is longer than 10 seconds in the marker, then start the war! triggerClientEvent("onStartWarTimer", getRootElement(), "timer1") --Start the time on the client's too (Will have more time than the timer on the server because of time between triggering) end end elseif (source == marker2) then if (getElementType(tElement) == "player") then --Check or the element is a player if (getPlayerTeam(tElement) == team1) then --Check or he is in the opposite team warTimer2 = setTimer(function() startWar("Team1") end, 10000, 1) --Start the timer (For Team1), if he is longer than 10 seconds in the marker, then start the war! triggerClientEvent("onStartWarTimer", getRootElement(), "timer2") --Start the time on the client's too (Will have more time than the timer on the server because of time between triggering) end end end end function stopWarTimer(tElement) if (source == marker1) then if (isTimer(warTimer1)) then --If the timer exists killTimer(warTimer1) --Kill it and kill it at the client's too triggerClientEvent("onKillWarTimer", getRootElement(), "timer1") end elseif (source == marker2) then if (isTimer(warTimer2)) then --If the timer exists killTimer(warTimer2) --Kill it and kill it at the client's too triggerClientEvent("onKillWarTimer", getRootElement(), "timer2") end end end addEventHandler("onMarkerHit", getRootElement(), startWarTimer) addEventHandler("onMarkerLeave", getRootElement(), stopWarTimer)
  19. As soon as you start the attack the following error appears:
  20. I didn't quite understand, could give me an example, I have to use a translator, my language is Brazilian.
  21. Will that someone could help?
  22. Resolved, thanks for the help of all =)
  23. This marker in server was a test, which I am using same is the client, knows the resource of interiors of the mta, that is what I want to do. This script of a marker1 up to the marker7 only I am using to test, if you recommend a script of marker that allows you to enter and exit within a interior of mta
×
×
  • Create New...