Jump to content

Fabioxps

Members
  • Posts

    229
  • Joined

  • Last visited

Everything posted by Fabioxps

  1. function updateTournamentLeaders() << does not work
  2. podiumDisplay = textCreateDisplay () tournamentText = textCreateTextItem ( "Tournament Leaders", 0.45, 0.04, "high", 255, 127, 0, 255, 1.5 ) firstText = textCreateTextItem ( "1st:", 0.45, 0.08, "high", 255, 127, 0, 255, 1.5 ) secondText = textCreateTextItem ( "2nd:", 0.45, 0.12, "high", 255, 127, 0, 255, 1.5 ) thirdText = textCreateTextItem ( "3rd:", 0.45, 0.16, "high", 255, 127, 0, 255, 1.5 ) textDisplayAddText ( podiumDisplay, tournamentText ) textDisplayAddText ( podiumDisplay, firstText ) textDisplayAddText ( podiumDisplay, secondText ) textDisplayAddText ( podiumDisplay, thirdText ) ----------- --/DISPLAYS ----------- newTournament = true --Setup scoreboard and podium scores players = getElementsByType ( "player" ) gameOver = false for k,v in pairs(players) do textDisplayAddObserver ( podiumDisplay, v ) end --------------------------------------------------------------------------------------------- -- /END FALLING BOARD SCRIPT -- --------------------------------------------------------------------------------------------- function getPlayerPos(player) return exports.Race:getPlayerRank(player) end function updateTournamentLeaders() local top3 = {} -- { {player=p, ratio=r}, ... } for k,v in ipairs(players) do playerRank = getPlayerPos(source) wasAdded = false for i=1,#top3 do if playerRank > top3[i] then table.insert(top3,i,{player = v, pos = playerRank}) if #top3 > 3 then table.remove(top3) end wasAdded = true break end end if not wasAdded and #top3 < 3 then table.insert(top3,{player = v, pos = playerRank}) --end end end if ( top3[1] ) then textItemSetText ( firstText, "1st: " .. getPlayerName(top3[1].player) .. " " .. top3[1] ) else textItemSetText ( firstText, "1st:" ) end if ( top3[2] ) then textItemSetText ( secondText, "2nd: " .. getPlayerName(top3[2].player) .. " " .. top3[2] ) else textItemSetText ( secondText, "2nd:" ) end if ( top3[3] ) then textItemSetText ( thirdText, "3rd: "..getPlayerName (top3[3].player).." ".. top3[3] ) else textItemSetText ( thirdText, "3rd:" ) end end function PlayerJoin ( ) updateTournamentLeaders() end addEventHandler ( "onPlayerWasted", getRootElement(), PlayerJoin ) function PlayerQuit ( ) players = getElementsByType ( "player" ) -- Remove the player that is disconnecting for k, player in pairs(players) do if (player == source) then players[k] = nil break end end end addEventHandler ( "onPlayerQuit", root, PlayerQuit ) --function clientStoredBoardInformation () function emptyPodium () textItemSetText ( firstText, "1st:" ) --Avoid double entries on podium textItemSetText ( secondText, "2nd:" ) textItemSetText ( thirdText, "3rd:" ) firstScore = -1 secondScore = -1 thirdScore = -1 end
  3. because it does not work? 39 line dxLoadingText = function(vartext, target, speed, ldo) if not smoothers[vartext] then smoothers[vartext] = "" end if not ldo then smoothers[vartext] = "" end if smoothers[vartext] == target then return false end smoothers[vartext] = string.sub(target, 1, tonumber(string.len(smoothers[vartext])) + 1) g_dxGUI[vartext]:text(tostring(smoothers[vartext])) return setTimer(dxLoadingText, speed, 1, vartext, target, speed, true) end function initRace(vehicle, checkpoints, objects, pickups, mapoptions, ranked, duration, gameoptions, mapinfo, playerInfo) outputDebug( 'MISC', 'initRace start' ) unloadAll() g_Players = getElementsByType('player') g_MapOptions = mapoptions g_GameOptions = gameoptions g_MapInfo = mapinfo g_PlayerInfo = playerInfo triggerEvent('onClientMapStarting', g_Me, mapinfo ) removeEventHandler("onClientPreRender",root, boladona) setWaveHeight ( 0 ) setHeatHaze ( 0 ) nextMapSet(false) --addEventHandler("onClientRender",getRootElement(),drawRadarS) showPlayerHudComponent ("radar",true) showPlayerHudComponent ("crosshair",true) fadeCamera(true) showHUD(false) g_Vehicle = vehicle setVehicleDamageProof(g_Vehicle, true) OverrideClient.updateVars(g_Vehicle) --local x, y, z = getElementPosition(g_Vehicle) setCameraBehindVehicle(vehicle) --alignVehicleToGround(vehicle) updateVehicleWeapons() setCloudsEnabled(g_GameOptions.cloudsenable) setBlurLevel(g_GameOptions.blurlevel) g_dxGUI.mapdisplay:visible(g_GameOptions.showmapname) if engineSetAsynchronousLoading then engineSetAsynchronousLoading( g_GameOptions.asyncloading ) end dxLoadingText("mapdisplay", "#a0ff00Map: #ffffff" .. g_MapInfo.name, 130)
  4. that's right? function initRace(vehicle, checkpoints, objects, pickups, mapoptions, ranked, duration, gameoptions, mapinfo, playerInfo) outputDebug( 'MISC', 'initRace start' ) unloadAll() g_Players = getElementsByType('player') g_MapOptions = mapoptions g_GameOptions = gameoptions g_MapInfo = mapinfo g_PlayerInfo = playerInfo triggerEvent('onClientMapStarting', g_Me, mapinfo ) removeEventHandler("onClientPreRender",root, boladona) setWaveHeight ( 0 ) setHeatHaze ( 0 ) nextMapSet(false) --addEventHandler("onClientRender",getRootElement(),drawRadarS) showPlayerHudComponent ("radar",true) showPlayerHudComponent ("crosshair",true) fadeCamera(true) showHUD(false) g_Vehicle = vehicle setVehicleDamageProof(g_Vehicle, true) OverrideClient.updateVars(g_Vehicle) --local x, y, z = getElementPosition(g_Vehicle) setCameraBehindVehicle(vehicle) --alignVehicleToGround(vehicle) updateVehicleWeapons() setCloudsEnabled(g_GameOptions.cloudsenable) setBlurLevel(g_GameOptions.blurlevel) g_dxGUI.mapdisplay:visible(g_GameOptions.showmapname) if engineSetAsynchronousLoading then engineSetAsynchronousLoading( g_GameOptions.asyncloading ) end string.gsub(mapName, "[old]", "[OLDS]") g_dxGUI.mapdisplay:text("#a0ff00Map: #ffffff"..g_MapInfo.name)
  5. if the name of the map and [old] to rename [OLDS] function ismapDM(isim) if string.find(isim, "[old]", 1, true) then return string.find(isim, "[OLDS]", 1, true) end end ?
  6. Fabioxps

    hit

    local oulDNick = getElementData( "dono" );
  7. Fabioxps

    hit

    ?? poblem function onHitGangZone ( player ) --if ( isPedInVehicle ( player ) ) then outputChatBox ( 'You cannot get this area with a vehicle!', player, 255, 255, 255, false ); return end if ( not getPlayerTeam ( player ) ) then return end local oulDNick = getElementData( "dono" ); outputChatBox('A GANG #123456"'..getTeamName ( getPlayerTeam ( player ) )..'" #ffffffESTA ATACANDO GANGZONA #ff4500'..oulDNick..' | Area: '..zone,getRootElement(),255,255,255,true); i = 20 timer = setTimer ( function ( ) i = i - 1 triggerClientEvent ( 'onAnnChange', root, i .. ' seconds to done! Attacker: ' .. getPlayerName ( player ) .. ' | Area: ' .. zone ); if ( i == 0 ) then killTimer ( timer ) outputChatBox('A GANG #123456"'..getTeamName ( getPlayerTeam ( player ) )..'" #ffffffDOMINOU A GANGZONA #ff4500'..zone,getRootElement(),255,255,255,true); = setElementData ( "dono", getTeamName ( getPlayerTeam ( player ) ) ); = end end, 1000, 0 ) --end end end
  8. setTimer(function() slothbot1 = exports [ "slothbot" ]:spawnBot ( 168.3, 1409.7, 10.6, 90, skin, 0, 0, ex, 38, "hunting", true ) end,3000,1)
  9. Fabioxps

    got Area

    the area is dominated by the same team several times
  10. Fabioxps

    got Area

    What did this going on here I already tried everything but the radar blinks same pair who owns the area function onHitGangZone ( player ) if ( isPedInVehicle ( player ) ) then outputChatBox ( 'You cannot get this area with a vehicle!', player, 255, 255, 255, false ); return end if ( not getPlayerTeam ( player ) ) then return end local x, y, z = getElementPosition ( player ); local zone = getZoneName ( x, y, z, false ); zon = zone:gsub ( ' ', '-' ) list = xmlLoadFile ( "list.xml" ); node = xmlFindChild ( list, zon, 0 ); triggerClientEvent ( 'onAnnChange', root, getPlayerName ( player ) .. ' is attacking zone: ' .. zone ); setRadarAreaFlashing ( area[zone], true ); colorTimer = setTimer ( function ( ) setRadarAreaColor ( area[zone], math.random ( 0, 255 ), math.random ( 0, 255 ), math.random ( 0, 255 ) ); end, 950, 0 ) if ( getTeamName ( getPlayerTeam ( player ) ) ~= tostring ( xmlNodeGetValue ( node ) ) ) then i = 180 outputChatBox ( 'In 3 minutes, the area will be yours. If you get killed, try again.', player, 255, 255, 255 ); timer = setTimer ( function ( ) i = i - 1 triggerClientEvent ( 'onAnnChange', root, i .. ' seconds to done! Attacker: ' .. getPlayerName ( player ) .. ' | Area: ' .. zone ); if ( i == 0 ) then killTimer ( timer ) triggerClientEvent ( 'onAnnChange', root, getPlayerName ( player ) .. " has got the area '" .. zone .. "'" ); local r, g, b = getTeamColor ( getPlayerTeam ( player )) killTimer ( colorTimer ); setRadarAreaFlashing ( area[zone], false ); setRadarAreaColor ( area[zone], r, g, b, 200 ); gotArea = true xmlNodeSetValue ( node, getTeamName ( getPlayerTeam ( player ) ) ); xmlSaveFile ( list ) end end, 1000, 0 ) end --end end function onLeaveGangZone ( player ) if ( isTimer ( colorTimer ) ) then killTimer ( colorTimer ); end if ( isTimer ( timer ) ) then killTimer ( timer ) end if ( not gotArea ) then local x, y, z = getElementPosition ( player ) local c = getZoneName ( x, y, z, false ); setRadarAreaColor ( area[c], gangZones[c].r, gangZones[c].g, gangZones[c].b, gangZones[c].a ); setRadarAreaFlashing ( area[c], false ); triggerClientEvent ( 'onAnnChange', root, 'No new announcements' ); gotArea = false else setRadarAreaFlashing ( area[c], false ); triggerClientEvent ( 'onAnnChange', root, 'No new announcements' ); end end tried mecher on line 18
  11. EXEMPLE local gotArea = false local area = { } local theArea = { } local gangZones = { ['Idlewood'] = { lx = '2082.80542', by = '-1680.55737', x = '100', y = '100', r = '0', g = '0', b = '0', a = '180', visible = root }; } local areas = { ['Idlewood'] = { x = '2082.80542', y = '-1680.55737', width = '100', height = '100', visible = root }; } addEventHandler ( 'onResourceStart', resourceRoot, function ( ) for _, zone in pairs ( gangZones ) do area[_] = createRadarArea ( zone.lx, zone.by, zone.x, zone.y, zone.r, zone.g, zone.b, zone.a, zone.visible ); end for _, area in pairs ( areas ) do theArea[_] = createColRectangle ( area.x, area.y, area.width, area.height ); addEventHandler ( 'onColShapeHit', theArea[_], onHitGangZone ); addEventHandler ( 'onColShapeLeave', theArea[_], onLeaveGangZone ); end end )
  12. SQLite is a very complicated procedure but I think this site takes your questions does that can help you? http://www.vivaolinux.com.br/dica/Como-migrar-da-plataforma-Windows-para-Linux-Oracle-RAC
  13. Fabioxps

    text anime

    Animation.presets.guiFadeIn(800)) = decrease text Animation.presets.guiPulse(1000)) = enlarge text I want this in dxDrawText
  14. Fabioxps

    text anime

    local sX,sY = guiGetScreenSize(); function DxAnime() text = ("infernus") dxDrawText(text,0,sY-20,sX,0,tocolor(200,200,200,255),1,"default-bold","center"); end addEventHandler("onClientRender",root,DxAnime); how can I make this animation in a dxDrawText Animation.createAndPlay(text, Animation.presets.guiFadeIn(800)) Animation.createAndPlay(text, Animation.presets.guiPulse(1000))
  15. the hunter can not be frozen?
  16. pedcar7 = createVehicle ( 425,-2227.5,2327.5, 8.3999996185303, 0,0,0) setElementFrozen(pedcar7 ,true); I can not use the set elements Frozen hunter?
×
×
  • Create New...